sapgui_calendar_select_interval
| Calendar Functions |
Selects a date or range of dates.
int sapgui_calendar_select_interval( const char *description, const char *calendarID, const char *interval, [args,] LAST );
| description | User entered text to aid in understanding script |
| calendarID | Calendar Identifier |
| interval | A string consisting of two dates separated by a comma: "YYYYMMDD,YYYYMMDD" |
| args | Optional Arguments |
| LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used. |
sapgui_calendar_select_interval returns an interval of dates from a calendar to the control that had focus when the calendar pop-up was called. It is equivalent to setting the text of the control to a date string without showing the calendar.
If a single date is selected the two dates in interval are the same.
Return Values
This function returns LR_PASS (0) on success or LR_FAIL (1) on failure.
Parameterization
You can parameterize all string (char type) arguments.
Example
The following example uses sapgui_calendar_select_interval.
// Run sample program
sapgui_set_ok_code("/nVA01", LAST );
sapgui_send_vkey(ENTER, LAST );// Enter order type
sapgui_set_text("", "or", "usr/ctxtVBAK-AUART", LAST );
sapgui_send_vkey(ENTER, LAST );// Purchase Order date
sapgui_set_focus("usr/subSUBSCREEN_HEADER:SAPMV45A:4021/ctxtVBKD-BSTDK", LAST );//Get possible values: shows calendar
sapgui_send_vkey(F4, LAST );
sapgui_select_active_window("wnd[1]");/* Scroll to April 30. Makes date visible in window but does not select */
sapgui_calendar_scroll_to_date("04/28/03",
"usr/cntlCONTAINER/shellcont/shell",
"20030428",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1024",
END_OPTIONAL);/* Click on a May 28, 2003 This function is recorded but not required if enhancing script */
sapgui_calendar_focus_date("05/28/03",
"usr/cntlCONTAINER/shellcont/shell",
"20030528",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1023",
END_OPTIONAL);/* Selection of May 28. If enhancing script, this call is sufficient without the "focus". */
sapgui_calendar_select_interval("05/28/03-05/28/03",
"usr/cntlCONTAINER/shellcont/shell",
"20030528,20030528",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1025",
END_OPTIONAL);

