!--a11y-->
Command Processing 
When you enhance the context menu with customer-specific entries (with Web template properties or JavaScript function 'SAPBWAddToMenu'), you must define a JavaScript function that is executed when a customer-specific entry is selected. This function is responsible for processing the command.
The function must support the following interface:
JavaScript Function |
JavaScript function for processing the command |
Parameter |
Description |
parameter |
Free parameter The parameter makes it possible to process more than one menu entry with one function. See Examples. |
cell_type ' ' = No special ‘CHARACTERISTIC’ = Characteristic ‘CHARACTERISTIC_VALUE’ = Characteristic value ‘STRUCTURE’ = Structure ‘STRUCTURE_VALUE’ = Structure component value ‘DATA’ = Data cell 'EXCEPTIONS' = Web Item List of Exceptions 'CONDITIONS' = Web Item List of Conditions 'DOCUMENT_LIST' = Web Item List of Documents |
Context of cell |
Filters |
Context of cell Different values are suitable, 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. |
parameter1 |
Exact definition of the context of the cell cell_type = 'CHARACTERISTIC_VALUE': Key for characteristic value cell_type = 'STRUCTURE_VALUE': STRUCTURE_MEMBER_ID_1 |
parameter2 |
Exact definition of the context of the cell cell_type = 'CHARACTERISTIC_VALUE': Node type for a hierarchy node cell_type = 'STRUCTURE_VALUE': STRUCTURE_MEMBER_ID_2 |
item |
Name of the Web item on which the menu is called |
dataprovider |
Name of the data provider for which the menu is called up |
x |
Cell is on data column x This parameter is needed especially for the report/report interface. |
Y |
Cell is on data row y This parameter is needed especially for the report/report interface. |
You can use all the JavaScript functions that were listed for processing.
<SCRIPT
language="JavaScript">
<!--
// menu entry at start and only for customer cells, only for data provider DP1
SAPBWAddToMenu("Customer details","myMenuProcessor","1","CHARACTERISTIC_VALUE","0CUSTOMER","X","TOP","DP1","");
// Menu entry at the end to the IT Home Page
// Menu entry at the end to the IT Home Page
// Menu entry at the beginning and only on material groups
SAPBWAddToMenu("Materials","myMenuProcessor","3","CHARACTERISTIC_VALUE","0MATERIAL","X","TOP","","");
// Command Processing
function
myMenuProcessor(parameter,cell_type,filter,parameter1,parameter2,item,dataprovider,x,y){
switch (parameter){
case "1":
// Report-report-interface jump to customer details Web application in a new window
SAPBWOpenWindow(SAP_BW_URL_Get() + "&CMD=RRI&DATA_ROW=" + y +
"&DATA_COLUMN="
+ y +
"&IOBJNM=0CUSTOMER&RRI_RECEIVER=ABC&DATA_PROVIDER=" +
escape(dataprovider) ,"CustDetails",600,400);
break;
case "2":
// Call IT help page
SAPBWOpenWindow("http://…/it/olap/help.htm","Help",600,400);
break;
case "3":
// Filter material group and expand by material
SAPBWOpenUrl(SAP_BW_URL_Get() + "&CMD=EXPAND&" +
"DATA_PROVIDER=" + escape(dataprovider) +
"&IOBJNM=0MATERIAL&IOBJNM_PARENT=0MATGROUP&FILTER_IOBJNM=0MATGROUP"
+
"&FILTER_VALUE=" + escape(parameter1) + "&FILTER_NODE_IOBJNM="
+ escape(parameter2));
break;
}
}
--->
</SCRIPT>