Thursday, September 18, 2014

Personas: how to do a long scripting in a better way

In some cases you might need to write a long script to do a serise of actions. It is a good practice that all the actions are performed by several script buttons, and there is main UI button to "Push" these buttons. It is a good idea to place all these sub-task buttons inside a Groupbox, then just make the Groupbox invisble. By this way, it is a lot easy to change and maintain the actions in script.


Dong Zhu

Wednesday, September 17, 2014

Personas: a trick to show/hide controls

Personas 2.0 does not support dynamic show/hide controls. Here is a "tricky" way you may do:

1. Create an empty label control which has a size enough to cover the controls you want to hide.
2. Place the label at the left of the hidding controls.
3. Set label property: width to NaN, and background color the same as the overall background color.
4. For Hidding: set the label value to an empty string long enough.
    For Showing: set the label value to one empty char.

That's it! :-)


How to display a webpage in a frame or a new window in Personas?

What is explained here?
   One can use a url to display the web page content inside a frame control on UI or in a new window.

How to do?
   The detail and example is presented in the link below:


Wednesday, August 27, 2014

Personas: how to implement a "second-level" personal screen?

What we want:
In common use cases of Personas, one could add some script buttons in Personas Home Screen in order to jump directly to certain SAP screen.
I have some buttons on the Personas Home Screen serving as "launching tiles". If these "tile" buttons are pressed, UI should first go to some sort of "second-level" personalised screens containing some script buttons. If these script buttons on the "second-level" screen are pressed, UI then go to the corresponding SAP screens directly based on the scripts.
My question:
How to implement such a "second-level" personal screen?
I tried to implement such a second-level screen using a separate profile, and on the Home screen to switch to it using "switch profile". However, such "sub-profile" will be shown on the toolbar, which I don't want to.

Solution to share:

Ask a ABAP programmers to create a completely empty ABAP transaction. That isn't a lot of work! Then assign multiple custom transaction codes to that one ABAP program, one tcode for each second level screen you require. Use those transactions to create your second-level menus.

In detail:
One can create a ABAP program which contains multiple transactions. In Personas one can use all these transactions. For each of the transactions, one can modify the copy of the ABAP program UI, and these UI can serve as the second-level menu UIs.

Tuesday, August 26, 2014

Dong's Personas Tips: how to call transactions using a script button

You can add a script button on your Personas Ui to start different transcations based on conditions. Here is how you can make it:

Add a script button, add the following script code:

IF some codition
     Paste Value My-T-Code
     Press Enter
IF other condition

It is noted that (maybe in some cases only) it will not work if the script button is used to call "Push" event for an user-made Launch button.