cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Screen as a Modal Dialog

Former Member
0 Kudos
15,415

Hi

I have created a 'Z' Transaction which has only one Screen which is of type 'Modal Dialog'. Whenever i run the Z Transaction, i get the screen in a full window size. Is there any way by which i can restrict this screen to a Modal Dialog. I know that we can use call Screen XX Starting at .. Ending at.. Option. But this will help me only when i have two screens.

Can anyone answer this as it is urgent !!!

Rgrds,

Murli.

View Entire Topic
Former Member
0 Kudos

Hi Rich Heilman

I had even tried that also. The problem is a Modal window appears above an empty window. But thanks anyway.

When i call this transaction from a BADI, it throws the user from the standard transaction to another empty screen which has a Dialog Window also. So this would not meet my requirements.

Rgrds

Murli

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Right, then you need to call the modal dialog box directly in a function module. I pretty sure that I know what you are trying to do. I have implemented a popup box, from within a standard sap transaction. I used a function module to do it.

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is an example of what I'm talking about. Here we have a small program with a selection screen. When you hit enter, it will call the function module which has the CALL SCREEN...Starting...Ending statement. This will thru the dialog box in front of the selection-screen. I believe that this is the functionality that you required.

The program code......




report zrich_0003.

data:  br_itab type table of zbrbin with header line.

parameters: p_check.

at selection-screen.

  call function 'Z_BIN_LOC'
       tables
            br_itab = br_itab.

The function module....



FUNCTION Z_BIN_LOC.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  TABLES
*"      BR_ITAB STRUCTURE  ZBRBIN
*"----------------------------------------------------------------------

  CLEAR: ITAB. REFRESH: ITAB.
  CLEAR: OK_CODE, SAVE_OK.

*Loop thru parameter table and fill up screen.
  LOOP AT BR_ITAB.

* Entry already exists........get bin location.
    SELECT SINGLE * FROM ZBRBIN
         WHERE VBELN = BR_ITAB-VBELN.
    IF SY-SUBRC <> 0.
      CLEAR ZBRBIN-BIN.
    ENDIF.

    ITAB-KDAUF = BR_ITAB-VBELN.
    ITAB-BIN = ZBRBIN-BIN.
    APPEND ITAB.
  ENDLOOP.

  REFRESH CONTROL 'ITABCON' FROM SCREEN '0100'.

* call entry screen.
  CALL SCREEN 100 STARTING AT 10 5
                  ENDING AT 85 16.

ENDFUNCTION.

Regards,

Rich Heilman