cancel
Showing results for 
Search instead for 
Did you mean: 

Oncreatehandler and variable screen flow in SAP Personas

Former Member
0 Kudos

Hello All,

I have an issue with Oncreatehandler and variable screen flow.

Issue is as follows

1) I have an oncreatehandler on main screen (Screen 0) which copies the values from another screen(screen 1) and populates a custom field.

2) From the main screen,  i navigate to another screen (screen 2), i select a material and come back to main screen to populate a table on main screen( Screen 0) which works fine.

3) In case there are no pop ups which appear after coming to main screen (Screen 0) then every thing works fine and there is no issue in the Oncreatehandler script on main screen.

4) However, if the selected material has some issues, then pop up appears on main screen (Screen 0) and the Oncreatehandler on main screen (Screen 0) fails because it is not able to find the relevant elements since the pop up is present.

5) I need to fire the oncreatehandler every time i come to main screen ( Screen 0)

I have tried to put an If control but the issue is not resolved. Script in OnCreateHandler of main screen is some thing like below

If (Control from popup) does not exist

script statements

end if

Question is why does the OncreateHandler fire when the POP UP is there on main screen (screen 0) ? Ideally it should wait for the pop up to be closed and then fire ? Is there a work around for this scenario? Issue here is that the OncreateHandler fires, it avoids the script bcos of IF control, and the values is not copied to main screen from Screen 1.

Regards

PN

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Kindly let me know if any one can suggest an approach.

chinthan_yajamaan
Active Contributor
0 Kudos

Scripting is only automation of steps carried out by users. It does not handle anything that is not coded to handle. So you to code it to handle popups as well.

In your script, when you come to main screen, you can add

* RefreshScreen

* IF (Control from popup) exist

*           Click ok on popup

Note that refresh screen is required whenever you switch screens or popups appear for Personas to know about screen change.