Example: sapgui_get_ok_code

The following example uses sapgui_get_ok_code to retrieve the command into "CommandBoxText".

//Insert the command "/ndwdm" into the Command field.
sapgui_set_ok_code("/ndwdm", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui1011", 
        END_OPTIONAL);
sapgui_get_ok_code("CommandBoxText", LAST );
// Output is "Command String = /ndwdm"
lr_output_message(
    "Command String = %s",lr_eval_string("{CommandBoxText}"));    
sapgui_send_vkey(ENTER, LAST );
sapgui_get_ok_code("CommandBoxText", LAST );
// Output is empty string: "Command String = "
lr_output_message(
    "Command String = %s",lr_eval_string("{CommandBoxText}"));