Go to list of all Commands
Syntax: Activate(<target>);
The Activate command allows you to activate Menuitems, UserTables or UDOs so they open a screen for you to perform actions on. An Activate(); command with no arguments also exists you can use to tell the system that a new window is now open and this window should be the active window to perform subsequent macro commands on.
Command variants
|
Description
|
Activate(<menuUid>);
|
Activate a menu Uid to open a new window or do a specific task on the current window (Switch mode, Go to last Line and so on.)
Sample: Activate(2050); will open a new “A/R Sales order” window.
Sample: Activate(1281); will switch current screen into Find Mode.
Sample: Activate(1282); will switch current screen into Add Mode.
|
Activate(<@userTable>);
|
Open an User Defined Table (under Tools > User-defined windows). The reason you should use the Tablename instead of the Menu-uid is that SAP randomly generate the related Menu-uids so the menu.uid change between logins.
Sample: Activate(@ABC_MYUDT); will open the default window for user table ABC_MYUDT.
|
Activate(<@defaultForm>);
|
Open an UDO (from the Main Menu or under Tools > Default Forms)
Sample: Activate(@MYUDO); will open the default window for UDO MYUDO.
See this article for more information if you have trouble with changing menu-uids
|
Activate();
|
You also have the option not to pass along a menu Uid/user Table (This is useful when you want to use a command (transfer, set, etc.) on the active window, but that window was not opened by a menu item (Example: if you open the Activity window using the “New activity” button from BP Master Data, you need an Activate(); after the click of the button before you can set data this new window)).
|
Video: Click here to watch more information on how to find menu-uids.
Similar/Related Commands:
- Close
- CloseParent
- OpenForm
- PopFormStack
- SwitchToUpdateMode
|