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

Select options in subscreen

Former Member
0 Likes
2,944

Hello,

I am having screen 0100 and subscreen 0200 in it. I try to put select-option in subscreen. But when I am trying to activate my report, I get an error CAPTURE.PNG (please see picture). The report code is as follwing:

*&---------------------------------------------------------------------*
*& Report  /DURS/OOOP_V4
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT /DURS/OOOP_V4.

data  OK_CODE type SY-UCOMM.

data: G_CUSTOM_CONTAINER2 type ref to CL_GUI_CUSTOM_CONTAINER,
       GRID  type ref to CL_GUI_ALV_GRID,
       it_cat type LVC_T_FCAT,
       wa_cat type LVC_S_FCAT.

data:    PodatkiTab    type table of /DURS/OOOP_PORO with header line,
          PodatkiRow     type /DURS/OOOP_PORO.

INCLUDE /durs/ooop_v4_incl1.

   tables /DURS/OOOP_EVID.

   start-of-selection.
     perform CreateFieldCatalog.
     perform CreateGridControl.
     perform Podatki.
   end-of-selection.

SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.     " this causes an error !!!!!!
   PARAMETERS: q1 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 0200.

call screen 0100.


..


The screen 0100 methods are


PROCESS BEFORE OUTPUT.
   "MODULE STATUS_0100.
   call subscreen SUB0200 including sy-repid '0200'.

PROCESS AFTER INPUT.
  MODULE USER_COMMAND_0100.
   call subscreen SUB0200.


Thanks in advance


Miran

Hello,

I am having screen 0100 and subscreen 0200 in it. I try to put select-option in subscreen. But when I am trying to activate my report, I get an error CAPTURE.PNG (please see picture). The report code is as follwing:

*&---------------------------------------------------------------------*
*& Report  /DURS/OOOP_V4
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT /DURS/OOOP_V4.

data  OK_CODE type SY-UCOMM.

data: G_CUSTOM_CONTAINER2 type ref to CL_GUI_CUSTOM_CONTAINER,
       GRID  type ref to CL_GUI_ALV_GRID,
       it_cat type LVC_T_FCAT,
       wa_cat type LVC_S_FCAT.

data:    PodatkiTab    type table of /DURS/OOOP_PORO with header line,
          PodatkiRow     type /DURS/OOOP_PORO.

INCLUDE /durs/ooop_v4_incl1.

   tables /DURS/OOOP_EVID.

   start-of-selection.
     perform CreateFieldCatalog.
     perform CreateGridControl.
     perform Podatki.
   end-of-selection.

SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.     " this causes an error !!!!!!
   PARAMETERS: q1 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 0200.

call screen 0100.


..


The screen 0100 methods are


PROCESS BEFORE OUTPUT.
   "MODULE STATUS_0100.
   call subscreen SUB0200 including sy-repid '0200'.

PROCESS AFTER INPUT.
  MODULE USER_COMMAND_0100.
   call subscreen SUB0200.


Thanks in advance


Miran

8 REPLIES 8
Read only

Former Member
0 Likes
2,097

Hi.

You need to create screen SUB0200 and in attribute you need to select subscreen radio button.

regards.

laxman

Read only

former_member202818
Active Contributor
0 Likes
2,097

Hi Miran,


*&---------------------------------------------------------------------*

*& Include ZSELOPT_IN_MP_TOP                                 Module Pool      ZSELOPT_IN_MP

*&

*&---------------------------------------------------------------------*

PROGRAM  zselopt_in_mp.

TABLES ekko.

You should write this in TOP include.

SELECTION-SCREEN BEGIN OF SCREEN 9001 AS SUBSCREEN.

SELECT-OPTIONS so_ebeln FOR ekko-ebeln.

SELECTION-SCREEN END OF SCREEN 9001.



-->Normal Screen with Subscreen(9000) Area 'sub'.


PROCESS BEFORE OUTPUT.

* MODULE STATUS_9000.

call SUBSCREEN sub INCLUDING sy-cprog '9001'.


PROCESS AFTER INPUT.

* MODULE USER_COMMAND_9000.

CALL SUBSCREEN sub.

Regards

Sreekanth

Read only

Former Member
0 Likes
2,097

hi.

You can also check sap provided demo program.

i.e. DEMO_SEL_SCREEN_AS_SUBSCREEN

regards.

laxman

Read only

vamsilakshman_pendurti
Active Participant
0 Likes
2,097

Hi

make sure that You had been  created that subscreen  or not then change ur code as bellow....

Slection-screen begin of screen 0200 as subscreen.

parameters : q1 type c length 10.

selection-screen end of screen 0200.

Then write that EVENT .....

START-OF-SELECTION.

and Call screen 0100.


like  that just modify your code......

just remove ur selection-screen code from after start-of-selection

and place it before of start of selection..



Thanks,

vamsilakshman.p

Read only

Former Member
0 Likes
2,097

Hi Miran,

I feel subscreen SUB0200  not have enough space to create the parameter (too small) . Can you try with increasing subscreen area. And also are you having custom container and subscreen on same screen ?

In this case can you try with placing below selection screen definition logic before start of selection

SELECTION-SCREEN BEGIN OF SCREEN 0200 AS SUBSCREEN.     " this causes an error !!!!!!

   PARAMETERS: q1 TYPE c LENGTH 10.

SELECTION-SCREEN END OF SCREEN 0200.


Thanks & Regards,

Arun



Read only

Former Member
0 Likes
2,097

Thanks to all but unfortunately nothing works.

regards

Miran

Read only

0 Likes
2,097

Hi Miran,

did you copy this report and screens or create yourself. Once before I copied the screens of a program and got this same issue as you. I deleted these and generated from scratch and it resolved the problem.

The other possibility as that your screens somehow overlap, please post all your screen declaration code here. Here is a link to how someone else resolved this: http://sapsolved.com/abap/selection-screen_3.htm

Read only

arthur_alvesteixeira
Active Participant
0 Likes
2,097

Steps, example:

1) Create a subscreen

Name: SEL

2) PBO code (main screen)

PROCESS BEFORE OUTPUT.

   MODULE xxxxxxxxx.

   CALL SUBSCREEN sel INCLUDING sy-repid '500'.

3) Insert in main program (that called the main screen) or

in some include (inserted in main program):

SELECTION-SCREEN BEGIN OF SCREEN 500 AS SUBSCREEN.

SELECT-OPTIONS: xxxxxxxxxxxxxxxxxxxxxxx

SELECTION-SCREEN END OF SCREEN 500 .