Application Development and Automation 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: 
Read only

Problem in creating a Select-option im a module pool screen

Former Member
0 Likes
425

I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html

but I'm having trouble to replicate it...

I've created this conde in my TOP include

SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
   SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
  SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 201.

and this is my screen flow code

PROCESS BEFORE OUTPUT.
  MODULE status_0100.

  MODULE pbo_200.
*
PROCESS AFTER INPUT.

  MODULE pai.

  MODULE user_command_0200.

in the screen 200 I have a subscreen area named subs

but when I do this:

MODULE pbo_200 OUTPUT.

  CALL subscreen subs including sy-repid '0201'.

ENDMODULE.                 " pbo_200  OUTPUT

it doesn't "compile"

it gives me this error:

""." or "ID ... FIELD ..." expected after "SUBSCREEN"."

what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
385

you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).

I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html

but I'm having trouble to replicate it...

I've created this conde in my TOP include

SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
   SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
  SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 201.

and this is my screen flow code

PROCESS BEFORE OUTPUT.
  MODULE status_0100.

  MODULE pbo_200.
*
PROCESS AFTER INPUT.

  MODULE pai.

  MODULE user_command_0200.

in the screen 200 I have a subscreen area named subs

but when I do this:

MODULE pbo_200 OUTPUT.

  CALL subscreen subs including sy-repid '0201'.

ENDMODULE.                 " pbo_200  OUTPUT

it doesn't "compile"

it gives me this error:

""." or "ID ... FIELD ..." expected after "SUBSCREEN"."

what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...

1 REPLY 1
Read only

Sandra_Rossi
Active Contributor
0 Likes
386

you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).