cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Deal with Create Purchase Requisition Fiori App

MuradMahd
Newcomer
0 Likes
321

In the ME51N Transaction code used to create a new “Create Purchase Requisition” in Fiori App, we need support in JS UI5 as follows:

  1. What is the JS UI5 function used to deal with the screen Table Grid CRUD operations, adding new row or loop through data:   “wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell/rowcol” data model?

We have a requirement to read the existing data model and deal with it, how can we loop the above table to get the current data?

 

  1. For the same grid above “wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell/rowcol” How can we trigger the JS UI5 function fireScroll() event to loop the model data from UI?

 

Sample JS Code:

        var xPathById = "//div[@data-bgui-sid='wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell/rowcol']";

        var table = document.evaluate(xPathById, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

        var otable = sap.ui.getCore().byId(table.id);

        var i = otable.getVertScrollSize(); /*otable.getVertScrollPosition();*/

        otable.setVertScrollPosition(i);

        otable.getVerticalScrollBar().fireScroll(x);

What params need to be passed as var X above?

 

  1. Is there any suggested UI5 function to get the old value/new value from the grid above?

 

Our reference is API Reference - Demo Kit - SAPUI5 SDK (ondemand.com)

Accepted Solutions (0)

Answers (0)