sapgui_set_ok_code
| General Object Functions |
Enters a command.
int sapgui_set_ok_code( const char *text, [args,] LAST );
| text | The command to enter |
| args | Optional Arguments |
| LAST | A marker indicating the end of the argument list. Not required if Optional Arguments are used. |
sapgui_set_ok_code enters the text in the Command field. The Command field is the box at the left of the first toolbar of the main window. The text must be a SAP command.
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_set_ok_code to enter the command me51n.
// Enter the Command
sapgui_set_ok_code(
"me51n", // the command
BEGIN_OPTIONAL,
"AdditionalInfo=info1022",
END_OPTIONAL);
//Press ENTER to run the command
sapgui_send_vkey("0", BEGIN_OPTIONAL,
"AdditionalInfo=info1023",
END_OPTIONAL);

