Share this page

# sapgui_calendar_focus_date

Calendar Functions

Sets focus to a date on a calendar.

    int sapgui_calendar_focus_date( const char *description, const char *calendarID, const char *date, [args,] LAST ) ;

description | User entered text to aid in understanding script
calendarID | Object ID Strings
date | A date string of format "YYYYMMDD"
outParamName | Parameter to store output
args | Optional Arguments
LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used.

sapgui_calendar_focus_date sets focus to a date on a calendar. This function is automatically recorded when selecting a date from a calendar. However, the function that actually returns the date is sapgui_calendar_select_interval.

If the date used in the call to sapgui_calendar_focus_date is different from the date in the call to sapgui_calendar_select_interval, the value used in sapgui_calendar_select_interval is returned to the object from which the calendar was called and the date used in the call to sapgui_calendar_focus_date is discarded.

## 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 shows how sapgui_calendar_focus_date can be recorded.

Copy code

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

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: