cancel
Showing results for 
Search instead for 
Did you mean: 

IW32 BOM List Button Pop-up - Control Not Found

awguthrie
Participant
0 Kudos

Greetings,

We have added the BOM list button onto our flavor in IW32. When clicking this button, there is a pop-up window that appears with the title 'Restrict Value Range'.

The next step is to click the 'X' button to close that screen.

The issue is we want the script to automate clicking this button, but it always shows a 'control not found' error. It's odd because the script detects the modal popup, it reads the title of the pop, and I can select the 'X' button with the element selector. But when it comes to pressing that button with the script, it doesn't seem to work. I've tried putting this script on the 'onLoad' event and also the 'onAfterRefresh' event, thinking maybe the control wasn't ready yet, but so far no luck.

Any suggestions? Please see the attached screenshots.

Forgot to add, currently version 3.09
753_REL Patch 501

Accepted Solutions (0)

Answers (1)

Answers (1)

kmagons
Advisor
Advisor

Hi Anthony,

Please try the following:

1) SAP Screen Personas only allows the editing of modal F4 helps. Make sure that you have selected the Dialog (Modal) Display mode the under Menu->Help->Settings->F4 Help Tab

2) Double check the control ID of the close button

3) To close a modal window, you can leverage the GuiModalWindow.close() method from the Scripting API.

For example:

session.findById("wnd[1]").close()
awguthrie
Participant
0 Kudos

Thank you for the information. I made the suggested changes and this seems to work as expected.

1. I changed the option from a control window to a modal window.
2. ID was good
3. Works both ways, but using the .press() function on the button and also by calling GuiModalWindow.close().

How do we ensure that the correct settings option is selected for our users? Would this be a Basis question?

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

You can set the system default to modal window and ensure that users cannot change the system default to amodal. This is possible with proper authorization settings, so yes, you need to discuss this with your basis- and security teams.

Then, all users should be set to use the system default F4 setting.

Unfortunately it doesn't seem to be possible to prevent a user from deliberately changing the F4 popup back to amodal, but that is probably less likely to happen if it is already set for them to modal.