Example: sapgui_get_text

The following example uses sapgui_get_text to retrieve the text written to a text box.

// Enter the text "Escort"
sapgui_set_text("",
        "Escort",
        "usr/txtF2", 
        BEGIN_OPTIONAL, 
            "AdditionalInfo=sapgui1025", 
        END_OPTIONAL);
// Retrieve the text
sapgui_get_text("Read back the entry", 
        "usr/txtF2", // Control ID
        "TextReadBack", 
        LAST );
// Output is "Escort"
lr_output_message("%s", lr_eval_string("{TextReadBack}"));