cancel
Showing results for 
Search instead for 
Did you mean: 

Example - If control Exist

former_member195748
Participant
0 Kudos

hello Folks,

to give a background, I am modifying Iw32 screen.

There is a functionality to do the TECO inside the screen and I am copying it to the main IW32 screen.

In few cases where the ORDER Is perfect, there is a popup and then press OK . TECO is takes place.

SO script is like below-

1) Open order

2) Press TECO.

3) Press OK ( for Popup).

In case if order is not perfect, it shows "Warning Message" in the message tool bar - but only in GUI .

now as my script is running all the three steps it shows "CONTROL not found "

I am trying to find any example of how to write control not found in SAP personas 3. SP2

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are two ways you could do this. Your way is to look for a control on the screen you get to if there's no problem with the order. Something like this would work:


if(session.idExists("wnd[0]/usr/ctxtCAUFVD-AUFNR")) {

     // All OK, carry on...

}

You could also look for the error message itself, like this:


if(session.findById("wnd[0]/sbar").messageType == "E") {

     // Something wrong

} else {

     // All OK...

}

Does that help?

Steve.

former_member195748
Participant
0 Kudos

Thank You Steve.

Answers (0)