cancel
Showing results for 
Search instead for 
Did you mean: 

Usage of sap.m library in classic personas possible?

Thomas_Mangler
Active Participant
0 Kudos

Hi Experts,

i want to to use some features of the sap.m library in classic personas (sap/bc/personas).

For example i testet a script button with the following script:

sap.m.MessageToast.show("This message should appear in the message toast");

This works fine when the flavor is changed manually in the flavor manager by folding down the "P" (i think by clicking the "P" some UI5 libraries are loaded)

But when i run the flavor direktly by flavor url i get the following scripting error:

Is there any possibility or workaround to get the UI5 libraries loaded directly (Url-Parameter, Onload script etc...)

I know this all works with Slipstream Enginge but unfortunately we can't switch to Slipstream in the next time.

Best regards,

View Entire Topic
kmagons
Advisor
Advisor
0 Kudos

Hi Thomas,

You can learn about the SAP Screen Personas SAPUI5 dependencies in the Mastering SAPUI5 Dependencies for SAP Screen Personas guide here.

SAP GUI for HTML doesn't have any SAPUI5 dependencies, therefore, your script fails in runtime. It works in design time only because the SAP Screen Personas client requires SAPUI5 for its UI (such as the scripts editor facility).

I strongly recommend against attempting to load any SAPUI5 dependencies through your flavor scripts as that will almost inevitably lead into significant compatibility, maintenance and performance risks.

If you absolutely need a custom SAPUI5 components with your classic SAP GUI app, please use the Html Viewer feature which enables you to run custom web app in an HTML inline frame providing a level of encapsulation. However, mind non-functional requirements such as performance, security, testability, maintainability etc.

Here is a great example by 3b25c79e4ade4481aeb1b5125041254c on how to add SAPUI5 charts to flavors through the Html Viewer container.

Thank you!

Best regards,

Krists Magons

SAP Screen Personas Dev Team