11-07-2012 12:16 PM
Hello experts,
I am using a input field to take date
which has automatic input help mode
CALENDER - Determined Input Help
I want to take days from current month only,, ie the Other than a specified date range the rest should be disabled How can i do this is there a function module ?.
11-07-2012 1:08 PM
Hi Abdul,
I don't know if your date field is on a selection-screen or a normal screen, however, I'm guessing the user can also choose to manually type in a date rather than use the calendar search help. If this is the case, then whatever you might do to modify the calendar, you would still need to validate the field after user input since the user may not use the calendar help.
Since you would need to validate anyway, my suggestion is to simply control this by validation. If on a selection-screen for example, you could do...
AT SELECTION-SCREEN ON date_field.
PERFORM validate_date USING date_field.
Cheers,
Amy
11-07-2012 1:21 PM
Hi,
Check demo program SAPCALENDAR_DEMO1. There are some examples on how you can call your own calendar using CL_GUI_CALENDAR class.
Maybe you can write your own Input Help code and restrict the date interval displayed in the calendar.
If the Date field is a Parameter in a selection screen use the AT SELECTION-SCREEN ON VALUE-REQUEST event
If the Date field is in a screen, use the POV section of the screen flow logic.
Let me know if this helps,
Andrei.
11-07-2012 1:56 PM
hi Andrei,
K, I will try the above , I am using this in a web-dynpro component .