SAP Screen Personas 2.0 - How to fetch data from another screen
Note: This article is about SAP Screen Personas 2.0. If you are looking for more information about SAP Screen Personas 3.0, please go to the SAP Screen Personas 3.0 Portal.
After we published the article SAP Screen Personas 2.0 - How to merge tabs last week, we have been asked if it is also possible with SAP Screen Personas to merge different screens, transactions or other applications. The answers is "it depends". No, it is not possible with SAP Screen Personas to merge different screens using drag-and-drop like merging tabs but there are other possibilities to create screens with content merged together from different screens or even different transactions. To achieve this, you will need to use the scripting or macro feature.
In a nutshell, Personas allows you to record a sequence of user actions and assign those steps to the click of a (script) button. This script can then be enhanced and modified as needed. To illustrate this feature, we have recorded a video that shows how to fetch data from the 2nd screen of SU01D and displaying it on the 1st screen.
- start recording
- navigate to the screen containing the content that you are interested in
- (trick) double click on the fields so that a double click action is added to the script which we can mdify later
- navigate back to the start screen on which you want to show the data
- stop recording
- create a copy of Basic View
- create custom text fields for the content you need to show
- (optional) add some labels
- create a script button and upload the script that you have recorded
- remove unnecessary actions like 'Focus'
- convert double click actions into copy value actions (assign a meaningful name for each value)
- add paste value actions at the end of the script and map them to your custom text fields
- (important) add a refresh screen action right before the copy value actions (this is needed because copy value is executed on client-side and refresh screen returns the current state of the screen from the server)
- close the dialog
- save and exit
As usual, if you want to learn more or discuss anything related to how to make your SAP GUI screens more functional using SAP Screen Personas, please start a discussion in the SAP GUI space on SCN.