Example: sapgui_calendar_select_interval

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);