cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Persona flavors to flavors mapping

Former Member
0 Kudos

Hi Persona Experts,

As we know we can have multiple flavors possible for a particular transaction code.

I have below listed scenarios.

SAP Transaction 1(T1)      -> 3 Flavor  (T1.Flavor 1 ,T1.Flavor 2, T1,Flavor 3)

SAP Transaction 2(T2)      -> 3 Flavor (T2.Flavor 1 ,T2.Flavor 2, T2,Flavor 3)

SAP Transaction 3(T3)      -> 3 Flavor (T3.Flavor 1 ,T3.Flavor 2, T3,Flavor 3)

I would like to implement below sequence..

T1.Flavor 1 -> T2.Flavor 1 -> T3.Flavor 1  (as Default Flavor)

T1.Flavor 2 -> T2.Flavor 2 -> T3.Flavor 2  (as Default Flavor)

T1.Flavor 3 -> T2.Flavor 3 -> T3.Flavor 3  (as Default Flavor)

Currently we can have only 1 default flavor possible for single Transaction, so it will be easy to get only 1 of above scenarios realize using set default flavor options.

How can we achieve above scenarios... depending on current flavor ->>select next flavor linking/Mapping dynamically

Please let us know is it possible? How?

Regards,

Rakesh Mourya.

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi All,

Just moved to Personas 3.0.

How does the switch flavor work in Personas 3.0??

Thanks

HP

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

There is a scripting utility method called changeFlavor which does that.

Here is the wiki link describing some of these methods.

Former Member
0 Kudos

Hi Manu and Tamas,

Thanks for the tip. Like it!

Dong

Former Member
0 Kudos

Hi,

First, I noticed that it is impossible to call "Switch Flavor" from one falvor to another flavor that is not within the same tcode.

Here is another idea to do:

1. For each tcode, make the first falvor, say TxF1 as the Default flavor, and besides it normal UI, it contains an extral hidden field of ID, a hidden script button "CheckAction" for doing switching.

2. For calling an flavor of a tcode, say, calling T2Falvor2 (noted as T1F2 here)  from T1Flavor3 (ie T1F3), perhaps do these steps in script button:

    a. Call T2 code

    b. Set the hidden ID field with a value, say T2Flv2, on the Default flavor of T2.

    c. "Push" the hidden "CheckAction" button.

    That should be it.

3. On the three Default flavors, in the "CheckAction" buttons, add script like:

    IF id-of-ID-field

        equal T2Flv2

              Switch Flavor T2Flavor2

    IF .....

By this way, you always redirect to flavors within the same tcode. It is the same logic implemented on the Default flavor for each tcode. It is only dependent on the caller who will sets up the destination flavor when calling the tocde.

It may not sounds like easy, but I feel the logic is simple. Thus maintaining should be easy. I haven't tried this, one concern maybe that the switch flavor may cause a short flash of UI.

Hope this would be helpful.

Dong Zhu

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

>>I noticed that it is impossible to call "Switch Flavor" from one falvor to another flavor that is not within the same tcode.<<

Actually, the Switch Flavor command can call another transaction with a specific flavor. You just have to specify the transaction along with the flavor name like this: {tcode}//{FlavorName}

This is described in the command documentation in the script editor.

Former Member
0 Kudos

Hi Tamas,

Can you advise how to open the command doc in script editor? Like it. Thx.

Dong

manukapur
Active Participant
0 Kudos

Hi Dong,

When you select a script button and add an action to it. In this case it is the switch flavor. On the left hand side you see a ? icon. Click on that and you will see the documentation.

I hope this is what Tamas was referring to.

Regards,

Manu

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Yep, exactly

manukapur
Active Participant
0 Kudos

In the previous version you could have used the javascript to open the URL and in the URL you can pass the shortlink for the flavour.

Regards,

Manu

Former Member
0 Kudos

There is no way that I know of to do this at the moment the way you want. I would implement this by having an action in a script that allows you to switch flavors. At first it seems it is only necessary to specify a flavor when running a new transaction, as you want to, but actually I can think of cases where being able to switch flavors within the same transaction, under script control, would be useful. Such an action doesn't exist, unfortunately.

There is a bit of a hack. You can create shortlinks in the ADMIN_UI transaction. These are URLs that take you directly to a specific transaction. In a shortlink you can specify the desired flavor as well as the transaction. Create shortlinks for your transactions T2 and T3 and call them from launch buttons. These will get you to the transaction running with the flavor you want, but at least for me each link opens in a new browser tab rather than replacing the current one. That's less than ideal. If there was a way to prevent that, this is pretty much what you are looking for I think.

Steve.


Former Member
0 Kudos

Hi Steve,

Thank you very much for quick response.

Is it possible to override Default flavor on click on Button/Link?

OR

Can we launch a Transaction code with any flavor (Which is not default flavor)?

Can we edit default flavor dynamically before calling any Transaction (e.g. can we change default flavor before calling Transaction... first we will set desired flavor as Default flavor then call Transaction)

Is it possible? Of course all happing in same Browser session (not in new tab or new Browser instance)

This would be needed in all places where any end user visits particular Transaction Code several time and every time he launches a transaction code he has particular specific purpose/process and would like to see relevant things based on scenarios he is running.

Hope this clarify need of dynamic flavor determination/switching scenario.

Please help.

Regards,

Rakesh Mourya.

Former Member
0 Kudos

I understand what you're trying to do. It makes perfect sense to me, and I think it is a reasonable thing to expect to be able to do. But right now Personas doesn't have this functionality as far as I'm aware.

Steve.

Former Member
0 Kudos

Hello Steve, I'm new in SCN and I'm new in working with SAP Screen Personas too...

I wonder if I can have a flavor for different type of users but using the same transaction. I need different flavors for a transaction, so I was working on that, but now I'm creating an inicial flavor to access to those different flavors (same transaction) and I don't know how to link them!

I think is the same as Mourya ask to you here almost a year ago.

Thanks in advance for any help!

0 Kudos

hi laura,

Yes, you have have different flavor for different user/group for same transaction.

Being an admin, you can assign those flavors to your target user/group.


Also, see this blog for the new features in latest Personas SP.

You can now switch flavors from your script.


http://scn.sap.com/community/gui/blog/2014/05/19/new-features-in-personas-20-sp04-also-personas-10-s...



Sushant

Former Member
0 Kudos

Hi Sushant!

Thank you very much for your reply and the link to new features in latest SP!

I can't manage flavors access by users, because, in this case, I need:

User X - Transaction A - Flavor 1

User X - Transaction A - Flavor 2

User X - Transaction A - Flavor 3

The user have to choose between flavors depending on what he is going to do in it.

I did an inicial screen where to choose between different script buttons with the Switch Flavor function but, it only works for flavors on the same transaction. I put the name of the flavor I need, but it doesn't work.

Please, help.

Thank you.

Former Member
0 Kudos

Hi Laura & Mourya!

The bad news is, we are using Personas 2.0 and are facing still the same problem as you. We have different scenarios regarding the same transactions and the same users. So setting flavors to ‘default’ isn't applicable and to build several groups (of users) for different scenarios is also failing due to the fact described above. So there is definitely the need to differentiate which flavor is to be used in which scenario.

The good news is there is a solution working “out of the box” and it is quite simple. Create a ‘script button’ (instead of the 'launch button') on your flavor with following script:

Please pay attention that step 2 (refresh) is obligatory, otherwise it won’t work!

Good luck!

Tibor

P.S. It would be great to get your 'success' feedback - if possible! 🙂

Former Member
0 Kudos

Hi Tibor,

Yeah you were right it does work as expected in PERSOS 200 SP 0002  (Kernel 741 SP 40 )system but it is not possible in PERSOS 100 SP 0003 (Kernel 721 SP 201 ) as switch flavor script option is not available and was provided in either later PERSOS SP or Kernel Level .

Thank you.

Regards,

Rakesh Mourya.

manukapur
Active Participant
0 Kudos

Please try this Javascript to open the URL in the same window.

window.open("www.youraddress.com","_self")


Regards,

Manu

Former Member
0 Kudos

Hi to All,


please have a look here:

http://scn.sap.com/message/15349638#15349638

wbr

Tibor