cancel
Showing results for 
Search instead for 
Did you mean: 

MII SSCE: Get query object configured in UI Button

0 Kudos
388

Hello Experts,

I have created a MII SSCE dashboard with i5Grid and multiple dropdowns and Buttons. I have defined an "Update" button which is associated to an MII Xacute query and custom EventHandler. I have enabled users to select multiple rows in i5Grid. I want to pass multiple selected row values as parameters to query associated to button. I am able to fetch multiple row values in custom event handler, But i not able to get query object associated to UI Button. Any idea how i can pass parameters from custom Event handler to query associated to button?

var Update_c0c0 = new com.sap.xmii.ui.UIElementButtonM({ text:"Update", textSize:"14", colSpan :"2", rowSpan :"1", topPosition :"4", leftPosition :"11", parameters: "", controlVisible :"true", tooltip :"", controlEnabled :"true", controlId: 5, feature :"i5Command", i5Command: {"queryTemplatePath":"SoGoaling/SOUpdateQuery","iCommandPath":"","Params":[{"key":"Param.1","value":"","type":""},{"key":"Param.2","value":"","type":""},{"key":"Param.3","value":"","type":""},{"key":"Param.4","value":"","type":""},{"key":"Param.5","value":"","type":""}]}, onClick :"MultiRowSelection"}); form_c0c0.add(Update_c0c0);

Custom Handler code:-

function MultiRowSelection() { var PriorityStr = [""]; var PriorityVal = ""; var ShopOrderVal=""; var ShopOrderStr=[""]; var SoOwnerVal=""; var SoOwnerStr=[""]; var SostartVal=""; var SostartStr=[""]; var SoendVal=""; var SoendStr=[""]; for (var i = 1; i <= grid_c1c0.getGridObject().getSelectedRowCount(); i++) { // Extract count from GRID if (i>500) { alert("Select less than 500 rows"); exit(); } PriorityVal = grid_c1c0.getGridObject().getCellValue(grid_c1c0.getGridObject().getSelectedRowAt(i), 1); PriorityStr.push(PriorityVal); ShopOrderVal = grid_c1c0.getGridObject().getCellValue(grid_c1c0.getGridObject().getSelectedRowAt(i), 2); ShopOrderStr.push(ShopOrderVal); SoOwnerVal = grid_c1c0.getGridObject().getCellValue(grid_c1c0.getGridObject().getSelectedRowAt(i), 7); SoOwnerStr.push(SoOwnerVal); SostartVal = grid_c1c0.getGridObject().getCellValue(grid_c1c0.getGridObject().getSelectedRowAt(i), 5); SostartStr.push(SostartVal); SoendVal = grid_c1c0.getGridObject().getCellValue(grid_c1c0.getGridObject().getSelectedRowAt(i), 6); SoendStr.push(SoendVal); } var qObj = Update_C0C0.getQueryObject(); // Set Query Parameters qObj.setParameter("Param.1", PriorityStr); qObj.setParameter("Param.2", ShopOrderStr); qObj.setParameter("Param.3", SoOwnerStr); qObj.setParameter("Param.4", SostartStr); qObj.setParameter("Param.5", SoendStr); qObj.update(true); }

Accepted Solutions (0)

Answers (0)