!--a11y-->
Adding a Menu Entry using JavaScript 
Use
You can add new entries to the context menu either using the Web template property or with a JavaScript call.
Functions
|
JavaScript Function |
SAPBWAddToMenu |
|
Parameter |
Description |
|
label |
Labeling text in the menu |
|
func |
JavaScript function for processing the command You implement this function in JavaScript and use it to execute commands after you have selected the menu entry. |
|
parameter |
Free parameter This parameter is passed to the JavaScript function ‘func’ and you can evaluate it there as required. The parameter allows you to use a function ‘func’ for more than one menu entry. |
|
cell_type ‘ ’ = No restriction ‘CHARACTERISTIC’ = Characteristic ‘CHARACTERISTIC_VALUE’ = Characteristic value ‘STRUCTURE’ = Structure ‘STRUCTURE_MEMBER = Structural component ‘DATA’ = Data cell ‘EXCEPTIONS’ = Exceptions item ‘CONDITIONS’ = Conditions item ‘DOCUMENT_LIST’ = Document list item |
Context of the entry If you want the menu entry to appear only in certain contexts and not in all context menus, you can define this with ‘cell_type’ and ‘filter’. |
|
filter |
Context of the entry Different values are relevant here, depending on the value of ‘cell_type’: ‘CHARACTERISTIC’, ‘CHARACTERISTIC_VALUE’, ‘STRUCTURE’, ‘STRUCTURE_VALUE’: Iobjnm ‘EXCEPTIONS’: Exception ID ‘CONDITIONS’: Condition ID ‘DOCUMENT_LIST’: Document ID See Examples. |
|
visibility ‘ ’= Not displayed ‘X’= Displayed in the "basic menu" ‘E’= Displayed in the "enhanced menu" |
Visibility of the entry Here you define if the entry is to appear in the basic menu or in the enhanced menu. |
|
position ‘TOP’ = Before the "normal" entries ‘BOTTOM’ = After the "normal" entries |
Position of the entry The entries are inserted in the order in which they were called. You can choose if the entry is to appear before the "normal" entries or after them in the menu. You cannot position the entries in between the "normal" entries. |
|
Data_provider |
Name of the data provider Name of the data provider (if the entry is to be made only for a specific data provider). |
|
Item |
Name of the Web item Name of the Web item (if the entry is to be made only for a specific Web item). |
Example
See the examples under
Command Processing