Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Command leave to list processing

Former Member
0 Kudos

Dear All,

I have an executable program (execute via SE38) that need to call an additional screen for input before the actual output on sapscript.

It is like this, user key in the input into selection screen, then program will extract data and display them into a pop up window. User will further select data from the pop up, and then sapcript will be printed out eventually.

I'm now stuck at the pop up window. I created a new screen 9000 with screen type "Modal dialog box" and coding as follow:

Executable program:

CALL SCREEN 9000 STARTING AT 40 20
                   ENDING   AT 150 50.

Flow Logic:

PROCESS BEFORE OUTPUT.
 MODULE STATUS_9000.

PROCESS AFTER INPUT.
 MODULE USER_COMMAND_9000.

Coding:

MODULE STATUS_9000 OUTPUT.

  SUPPRESS DIALOG.
  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 9000.
  SET PF-STATUS 'STATUS_9000'.

  LOOP AT TAB INTO WA_TAB.
    WRITE:/1 WA_TAB-TYPE.
  ENDLOOP.

ENDMODULE.                 " STATUS_9000  OUTPUT

MODULE USER_COMMAND_9000 INPUT.

  OK_CODE = SY-UCOMM.

  CASE OK_CODE.
    WHEN 'OK'.
********  trigger output to sapscript
    WHEN 'CANCEL'.
      SET SCREEN 0.
      LEAVE SCREEN.
  ENDCASE.

ENDMODULE.                 " USER_COMMAND_9000  INPUT

With the above code, output is successfully displayed on screen 9000 with command "Leave to list-processing". But after the list displayed, those buttons that defined in Status_9000 are not working at all in screen 9000. There is no response from any buttons i clicked, even i tried in debugging mode it didn't go in debugger as well.

Please comment which part i miss. Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

thats coz you are no longer in the screen.

you have quit the screen to come into DP page.

Use the AT USER COMMAND event in t he list prog from where you are calling the screen

-RJ

Edited by: Rajat Chaturvedi on Mar 16, 2009 2:08 PM

4 REPLIES 4

Former Member
0 Kudos

In the screen - element list - have you given the ok code as OK_CODE?

I do forget this sometimes

Mathews

Former Member
0 Kudos

thats coz you are no longer in the screen.

you have quit the screen to come into DP page.

Use the AT USER COMMAND event in t he list prog from where you are calling the screen

-RJ

Edited by: Rajat Chaturvedi on Mar 16, 2009 2:08 PM

Former Member
0 Kudos

Hi,

You need to use AT USER-COMMAND to handle the pushbutton Fcodes on the List.

0 Kudos

Hi,

I think the problem is with your statement in the PBO module.

Why not try and delete this part 'AND RETURN TO SCREEN 9000'. Over here, if you want to use this addition RETURN TO SCREEN, then screen number should be other than your modal list screen. Currently you have changed the modal screen to behave as list, but at the same time, you want it to behave as the normal screen, after you come back from the list.

If you really need that, then please create another screen, say 9100, and change it to AND RETURN TO SCREEN 9100, instead of AND RETURN TO SCREEN 9000.

Regards,

Lim...