cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Screen Personas Script - Back button

Former Member
0 Kudos

Dear all,

I need some help in SAP Screen Personas Scripting.

I've build a Flavor with a Fiori-inspired design and implement this transaction with the flavor in the Fiori launchpad.
This already works without any problems, but now I want to extend this transaction a little bit.

In Fiori apps there is always a back-button at the top left side of the app. With this button you can go one step backwards and finally reach the launchpad like you click the home-button.

To go backwards I use the already existing back-button from the original transaction, but I don't know how to go back from the transaction to the launchpad (the last step backwards).

Is there any functionality in SAP Screen Personas java-script to go back to the launchpad?

Best Regards,

Thorsten

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

Can you try running the script 

window.location.hash = "#";

When back is clicked on?

Former Member
0 Kudos

There is no effect with this script. The window only refreshes but is still in the transaction.

kammaje_cis
Active Contributor
0 Kudos

I think the problem is with choosing the window object.

You might have to debug and check window.parent.location or window.parent.parent.location, and ensure it is the highest level window object. (Not that of the Personas).

former_member192584
Participant
0 Kudos

Hi Thorsten,

        Everything in Personas and also FLP is placed in the form of iViews.

          So use the code below to go back to the FLP when u click on the back button

window.top.location.href = "URL OF YOUR FLP";

          This changes the url of the top level window so that u can go back to your Fiori Launchpad.

     Hope this fixes your issue.

regards,

Vigneshkkar

Former Member
0 Kudos

Hi Vigneshkkar,

your solution works!

This is very nice! Thanks a lot.

Best Regards

Thorsten

former_member192584
Participant
0 Kudos

No issues. All the Best

regards Vigneshkkar

Answers (1)

Answers (1)

Former Member
0 Kudos

The simplest way to get back to the SMEN transaction from anywhere is:


session.startTransaction("");

You may also want to add a flavour switch to make sure the right flavour is active.

Steve.

Former Member
0 Kudos

Hi Steve,

thanks for your quick response, but unfortunately this isn't what I want to do.

I'm in transaction XY which got a Flavor, a Theme and is implemented in the Fiori launchpad like you see in the screenshot.

In transaction XY:

Then I press the green button at the top left corner in the transaction area. I want to go back to homepage of the Fiori launchpad now.

With your solution, I'm going to open the homepage of the SAP GUI for HTML inside the "app" like you see in the following screenshot.

After I hit the green back button (script button):

But I want to open the homepage of Fiori launchpad like you see here:

Do you understand what I mean Steve?

Thanks a lot!

Best Regards

Thorsten

Former Member
0 Kudos

Sorry, my mistake. I misunderstood. I'm afraid I don't have an answer to your question - I haven't got a Fiori Launchpad yet to try this on!

Steve.