ABAP Calling subscreen in main screen

In module pool we can create subscreen and can call it from the main screen.

For that first we have to create one subscreen and then we have call the screen in main screen. It can be done as follows:

We will take the scenario of showing some fields in IT9001  depending on some condition. If the condition is satisfied we will show the fields otherwise we will hide the fields.

The above scenario can be done as follows:

1.  Creation of subscreen 

  • Go to SE51 give the Program name as MP900100 and screen as 0200 and click create button .
  • Now here select Screen type as Subscreen.
  • Now in the layout create the fields that you want to  show in the IT9001.
  • Save and activate the subscreen.

2. Calling from the mainscreen

  • Go to SE51 and enter the program name as MP900100 and screen as 2000 and click change button.
  • Take the layout and create one subarea and name it as say sub_screen.
  • Now go back to flow logic there create one module and implement it in MP900100 includes.
  • Write the below line in that module after the condition.

              CALL SUBSCREEN sub_screen INCLUDING ‘MP900100′ ‘0200’.

         Syntax is:  CALL SUBSCREEN <subarea> INCLUDING report_name screen_number

sub_screen  => name of the sub area that we have created in 2000 screen layout.

report_name => name of the report

screen_number => number for the subscreen.

  • Now save and activate the screen 2000.

3. Now go to PA30 and enter the IT and perner deatils and select create button.

4. Now our screen 200 will call subscreen 200 and the fields will show or hide depending on the condition




Leave A Reply