cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 application for manual start of SCPI Extraction process

rbardiau
Explorer
0 Kudos

Hello Community,

I have a question regarding architecture of a custom application and we are not sure how to implement it.

We want to have a UI5 application to trigger a process in SCPI which will do an oData extraction of data, and transform it into a file to be deposited in an FTP.
SCPI process is trigerred by URL with parameters.

We want to deploy the application to S/4HANA Cloud to benefit from the Business roles and catalog but when doing that, we encounter the Cross-Origin policy as the SCPI URL isn't part of S/4HANA Cloud servers.
If we deploy the application in SCP, we won't have the Cross-Origin policy blocking us with the destination service, but then we lost the benefit of the user roles declared in S/4HANA Cloud. I might have missed something but I don't see how I can deploy a UI5 app in SCP without having to do user management in it (duplication of user creation, role gestion, ...).

I hope I explained correctly the problem, but do not hesitate to ask for more details.

Can anyone kindly advise on how to proceed with this kind of scenario?

Regards,
Romain

Accepted Solutions (1)

Accepted Solutions (1)

Mathias_R_u_p
Advisor
Advisor
0 Kudos

Hi Roman,

I see your issue, and one simple way that comes to my mind, which is already available today, is by creatively using a Custom Business Object (in combination with a Custom UI).

Here some brief outline:

1) Create a CBO, (you may add parameters you require to hand over to CPI as fields of the CBO)

a. Add an custom action (call it "trigger CPI") to the CBO, in the custom action you trigger the CPI’s endpoint via an outbound HTTP call:

See: https://help.sap.com/viewer/f544846954f24b9183eddadcc41bdc3b/latest/en-US/8d5d71252edd449982083cb5a3...

Here the Communication Scenario will be responsible for authentication towards CPI (e.g. technical user)

b. At this step, you can already test this approach, with the automatically generated “maintenance UI” of the CBO. This requires to add the CBO to a business catalog, hence only persons with access to this catalog will have access to trigger the service later. To initiate the process, add a "new entry" to the CBO, then select it and click the "Trigger CPI" button.

c. You could even write the result of the IFlow into a status field of the CBO, and hence have a log of "trigger actions"...

2) (optional) You may replace the standard UI of the CBO with a custom UI

The standard maintenance UI is supposed to create/change/delete entries - since we are only interested in triggering a service you could replace that UI with a custom UI, e.g. just having a single "trigger" button on the screen. To do so you'd

a. Build an UI in WebIDE by importing the Odata service. You need to manually adjust those service calls to “trigger” the action (instead of OData POST operations)… (this unfortunately requires some investigation of the generated “maintenance UI”). Due to the fact that the UI is triggering the local CBO-Action, no CORS restrictions apply (the ABAP backend will forward the call to CPI)

b.Deploy the application back to S/4. You can find a detailed FAQ with links to tutorials here: https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=503812118

Overall this the second part is unfortunately not a straight forward exercise, and requires some initial set-up (connecting WebIDE+S/4HANA Cloud, establishing a trust relationship), developing an initial UI application, deploying it back to S4. However allows to bring in a very tailored UI without the need to have a dedicated app on SAP Cloud Platform as “side-by-side” extension.

Best,

mathias

Answers (0)