user3423064
user3423064

Reputation: 1

SAPUI5 parameter transfer to web transaction

I am trying to open a transaction through the SAPUI5 event (eg. list item click).

While opening that transaction, parameters from the selected list item element in the SAPUI5 will be sent to that transaction and will fill specific input fields in the transaction such as material number, plant and so on.

Questions:

  1. First of all, what is the best way to navigate from SAPUI5 to sap-web-transactions?

  2. Second, how do I navigate while sending parameters? (gateway I suppose but how)

Upvotes: 0

Views: 3880

Answers (2)

Jasper_07
Jasper_07

Reputation: 2473

The following is an example of opening a SAP Transaction via Webgui from a SAPUI5 button event, the event shows one of many ways to attach additional parameters to the url

var sURL = 'http://my_sap_server:8000/sap/bc/gui/sap/its/webgui?~transaction=SU01';
var oButton = new sap.ui.commons.Button("b1");
oButton.setText("DDIC");   //Call Transaction SU01 and pass username as param
oButton.attachPress(function() {
    var newURL = sURL + ' USR02-BNAME=' + oButton.getText( );
    window.open(newURL);
});

Upvotes: 1

Qualiture
Qualiture

Reputation: 4920

Without knowing anything about your systems and/or code, it really depends on your use case...

If you have a J2EE webserver such as SAP HANA Cloud Platform, you could use JCO API to perform the call server side, and use a REST service to make the request from your client UI

If you have SAP NetWeaver CE, you could use the CAF framework instead of JCO, and still use REST.

However, from your question I assume you have SAP Gateway at your disposal, so I would recommend reading this paper by Bertram Ganz on how to consume Gateway OData services http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d59930-791c-3010-2abd-ac7793ad6c57?QuickLink=index&overridelayout=true&59017145615734

Upvotes: 0

Related Questions