sapgui_calendar_scroll_to_date

Calendar Functions

Makes a date visible on a calendar.

int sapgui_calendar_scroll_to_date( const char *description, const char *calendarID, const char *date, [args,] LAST ) ;
description User entered text to aid in understanding script
calendarIDObject ID Strings
date A date string of format "YYYYMMDD"
argsOptional Arguments
LAST A marker indicating the end of the argument list. Not required if Optional Arguments are used.

sapgui_calendar_scroll_to_date emulates using the scroll bar to make a date visible. It does not set the focus to the date or select it.

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_scroll_to_date.

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