cancel
Showing results for 
Search instead for 
Did you mean: 

Personas: how to detect if a Confirm note is shown or not in Script?

Former Member
0 Kudos

Hi Personas experts,

I have a usecase - change notification with a pre-given number:

The normal SAP procedures are:

    Screen_A: (Home-screen): run IW22 >

    Screen_B: type in a valid notification number (suppose you know one) >

    Screen_C: UI for changing notification

My Personas app will go:

    Screen_A: (Home-screen): run IW22 together with a number given in a text box on the same screen >

    Screen_C: UI for changing notification  (Note that the screen_B is skipped now)

On screen_C, user can take two actions:

Action 1 (OK case):

     Make a change on UI (eg, type a value in a field) > click the Cacel (ie, the red cross icon)

     Now a Confirm note is shown where I have implemented my own "No" key (using /n).

     So if user presses this No-key, UI goes back to Screen_A (skip screen_B).

Action 2:(case with issue)

     On screen_C, make no change but directly press the Cancel icon.

     Now there will be no Confirm note shown, but UI goes back to Screen_B.

     However, what I want is to skip screen_B, and UI goes directly to Screen_A.

The issue here is: I am thinking to implement my own Cancel button to replace the original one in order to skip screen_B. Then, how do I know if user has made any changes on UI or not, in another word, how do I know if the Confirm note is shown or not?

Thx.

Dong

Accepted Solutions (1)

Accepted Solutions (1)

nmkarthikeya
Active Participant
0 Kudos

Hi Dong,

Looks like you can make use of "Control Exists" key work to achieve this.

In your custom cancel button, us if control exists, (you would be clicking on actual cancel button first) if it does then do nothing if it doesn't then directly go to Screen_A.

P.S: if "control exists" you would be checking against "cancel pop-ups" element.

Regards,

Karthikeya

Former Member
0 Kudos

Hi Karthikeya,

Many thanks for quick reply.

In my Cancel button, I first press the Original Cancel - then I checked the Cancel control on the Confirm note (also tried to check teh Confirm window id). But it looks like this check always gets "not exist" path, even though the original Cancel does show the Note.

Any idea? Thx.

Dong

chinthan_yajamaan
Active Contributor
0 Kudos

Hi Dong,

After clicking on cancel button in script, please add RefreshScreen action (to fetch the new XML from backend with cancel popup) before checking for control exists.

Thanks

Chinthan

Former Member
0 Kudos

Hi Chinthan,

Thansk for the comment. I attached my script here: I did have a Refresh Screen after the Push, but it still cannot detect the case where teh confirm is shown. Note that I check if the Cancel button on teh Confirm note exists.  Br,  /Dong

nmkarthikeya
Active Participant
0 Kudos

Hi Dong,

Could you try performing check on the label(text) which is present in cancel popup.

Ideally what you are doing should work as far as I know, I had done a similar check and I had used label so just want you to check that option.

Regards,

Karthikeya

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Karthikeya,

Tried using the label. Got the same problem. However, I found that there was another reason. In my UI I merged two tabs. Thus, after I made a change on UI, the 1st time pressing the Cancel key did not change UI, except that the controls merged from another hidden tab were gone. As the second time, if I press my Cancel button it worked.

I don't know why tab merging had that problem. Anyway, for this issue, I close it, and set your answer as Correct. Thx.

Br,


Dong

nmkarthikeya
Active Participant
0 Kudos

Hi Dong,

Yeah tab merging can give headache sometimes.

Especially when you have mandatory fields.

Hope you find a solution

Thanks!

Regards,

Karthikeya