I have a problem handling a pop-up window when it has the same screen name and number as the screen that calls it. The example I am using is transaction IW31. If you drop down on the functional location field a pop-up window appears, but I am having difficulty using it because it has the same screen name and number as the screen calling it. What I want to do is select one of the tabs and enter information into a field in the pop- up window and then select the one entry that will return. The exact steps are:

1. Run transaction IW31  

2. Drop down on the functional location field.  

3. Select the Cost center tab

4. Enter a value in the Cost center field

5. Click the green check

6. Select the 1 functional location in the list

7. Return the the IW31 screen.

Can you possibly solve this?

In your system the SAP matchcode display is configured to be processed as a special control, without using SAP dynpros. GuiXT does not handle these controls. One could change the configuration (Help->Settings) and switch to dynpro-based display, but this is probably not what the users want. There is a better way to determine the functional location if the cost center is given, namely a Call to an ABAP function that you have to implement. The implementation is quite simple (SE37): Name the Import-Parameter COSTCENTER and the Export- Parameter FUNCLOCATION, and use the following ABAP code:  
TABLES: ILOA. Select TPLNR INTO ILOA-TPLNR FROM ILOA 

WHERE KOSTL = COSTCENTER..

FUNCLOCATION = ILOA-TPLNR.

ENDSELECT.

Since there is a secondary index on the cost center field in table ILOA, this is pretty fast. The implementation assumes that exactly one functional location will be found. You could add a little bit more code to handle the cases where more than one, or not any, functional location is returned by the Select statement.