Menus

Creating Menus

Description: The application which owns the application object creates a menu for the application object. The application object menu BUPA (Business Partner) may be used as a template. The statuses of this menu (program SAPLBUDO ) should be copied into the function group of the application which owns the application object, and adjusted there. The OK codes for the control functions (function code BUS*) may not be changed. You generally need the following statuses:

  • INITDATF Initial screen of main screen sequence as full screen

  • INITDATP Initial screen of main screen sequence as dialog box

  • STNDDATF Data screen of a screen sequence as full screen

  • STNDDATP Data screen of a screen sequence as dialog box

  • EXTRDATF Individual data screen (extra screen) as full screen

  • EXTRDATP Individual data screen (extra screen) as dialog box

Important: The central control functions (function code BUS*) are defined by the BDT. You should include these in your menu. The function codes may not be changed as these are used as a basis for programming by the BDT. The following central functions are defined by the BDT.

Code

Function text

Menu

Explanations

BUS1

Create

<Object>

On initial screen only, for changing the activity.

BUS2

Change

<Object>

On initial screen only, for changing the activity.

BUS3

Display

<Object>

On initial screen only, for changing the activity.

BUSA

<Changing instance>

Extras

Display change documents for current instance

BUSB

Back

Goto

 

BUSC

Cancel

Edit

 

BUSE

<Enter> key

None

Enter

BUSF

Exit

<Object>

 

BUSH

Check input

Edit

Data is checked and the current screen is called up again

BUSI

Changes to fields

Extras

Display change documents for current instance (for current cursor field only)

BUSL

Deselect all

Edit

For screen selection on initial screen

BUSM

Select all

Edit

For screen selection on initial screen

BUSS

Save

<Object>

 

BUSV

Other functions

<Object>

Display additional functions for the <Object> menu

BUSW

Further editing

Edit

Display additional functions for the Edit menu

BUSX

Additional goto destinations

Goto

Display additional functions for the Goto menu

BUSY

Additional extras

Extras

Display additional functions for the Extras menu

BUSZ

Expanded environment

Environment

Display additional functions for the Environment menu

Standard functions

All menu options defined within the menu created by the application which owns the application object should be entered as standard functions. When defining a standard function, you determine when it is to be active or inactive. This can be done on the basis of:

  • The activity

  • The editing mode (save or transfer)

  • The views of the current screen

  • The combination view/screen sequence category

There are three tables which can be used for setting:

  • Standard functions

  • Standard functions: Active per view

  • Standard functions: Active per view/screen sequence category

Menu path: Start of the navigation path Control Next navigation step <Object Next navigation step > Next navigation step menu options Next navigation step Standard functions End of the navigation path

Examples: Different requirements can be met using these tables:

  • The function Save (function code BUSS ) is active only

  • for activity types Create and Change and

  • in save mode.

  • The function Delete bank details in Business Partner (function code BUPI ) is active only

  • if the view Bank details is in the current screen and

  • for activity types Create and Change.

  • The function Address overview in Business Partner (function code BUAO ) is active only

  • if the view Address data is in the current screen

  • in the screen sequence category Main screen sequence , not in the screen sequence category Address details.

Naming convention: <Application><Function>

Application area: Application which owns the application object

Additional Functions

All menu options not fixed in the menu can be included in this menu through additional functions. These additional functions can be reached through the following submenus:

  • Further object functions (<Object> menu)

  • Further editing (editing menu)

  • Additional goto destinations (Goto menu)

  • Additional extras (Extras menu)

Each of these submenus is active only if at least one additional function is active for the menu bar option. When defining an additional function you determine when it is to be active or inactive. The table settings available for this correspond to those for the standard functions (see Standard Functions)

Menu path: Start of the navigation path Control Next navigation step <Object Next navigation step > Next navigation step menu options Next navigation step Additional functions End of the navigation path

Naming convention: <Application><Function>

Application area: All applications

Events DCUAD and DCUAC

The menu is set in events DCUAD and DCUAC. Menu options can also be set to active or inactive here if the rule which applies to this function cannot be represented using the settings in the control table.

  • Event DCUAD (setting the menu)

Description: The application determines the GUI status and sends it to the BDT. The BDT also receives the name of the function module which sets the GUI status (command SET PFSTATUS...). This function module must be included in the function group of the application which owns the application object. The naming convention for this function module is <Application>_<Application object>_PFSTATUS_SET.

Application area: Application which owns the application object.

Naming convention: <Application>_<Application object>_EVENT_DCUAD

(Customer: Function module name has the prefix Y_ or Z_).

Example: BUP_BUPA_EVENT_DCUAD.

Action required:

  • Determine GUI status for the screen and send to the BDT.

  • Send the name of the function module for setting the GUI status to the BDT.

  • Event DCUAC (changing the menu)

Description: Menu options may be set to active or inactive at runtime. This is done here for the menu options whose active/inactive rule cannot be fully represented in the control tables.

Application area: All applications.

Naming convention: <Application>_<Application object>_EVENT_DCAUC

(Customer: Function module name has the prefix Y_ or Z_).

Example: BUP_BUPA_EVENT_DCUAC

Action required:

  • Determine current GUI status with the function module BUS_CUA_STATUS_GET

  • Include inactive standard functions or active additional functions in the relevant tables

  • Return current GUI status to the control with the function module BUS_CUA_STATUS_SET