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: 

Access Sub-Screen Selections in Dialogue Program in Parent Screen

dean_hinson2
Active Contributor
0 Kudos

Hello All,

I have a Function Group, where I have added a dialogue program with a sub-screen with SELECTION-OPTIONS...

SELECTION-SCREEN BEGIN OF SCREEN 1010 as subscreen.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-s01.
SELECT-OPTIONS: s_parno for /sapsll/pntbp-partner.
SELECTION-SCREEN END OF BLOCK 1.

SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME TITLE text-s02.
PARAMETERS: p_vadrs AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK 2.
SELECTION-SCREEN END OF SCREEN 1010.

In the PAI of the parent screen 1000, I cannot access the content of s_PARNO. It is empty.

Why?

And since the sub-screen is generated, SAP reminds me that changes to the PAI of the sub-screen is futile.

Regards, Dean.

1 ACCEPTED SOLUTION

GManousaridis
Participant
0 Kudos

Hello Dean,

Additional screens and subscreens have to be handled explicitly, or else they are ignored by the program.

So you need to include them somehow. Check the following example.

The block b1 is rendered automatically as it is part of the default selection screen. The 2 subscreens though have to be included (here within a tabbed context):

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
  PARAMETERS: r1  RADIOBUTTON GROUP rb1,
              r2  RADIOBUTTON GROUP rb1,
              r3  RADIOBUTTON GROUP rb1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
            p2 TYPE c LENGTH 10,
            p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
            q2 TYPE c LENGTH 10,
            q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.

**Here we include the 2 subcsreens explicitly.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                  TAB (20) button1 USER-COMMAND push1
                                   DEFAULT SCREEN 100,
                  TAB (20) button2 USER-COMMAND push2
                                   DEFAULT SCREEN 200,
                  END OF BLOCK mytab.


START-OF-SELECTION.
  WRITE p1 && p2 && p3.

There is also another way to include screens, the CALL SELECTION-SCREEN <dynnr>, but can be a little messy.

Hope it helps,

George


George Manousaridis -- Break on through to the ABAP side
1 REPLY 1

GManousaridis
Participant
0 Kudos

Hello Dean,

Additional screens and subscreens have to be handled explicitly, or else they are ignored by the program.

So you need to include them somehow. Check the following example.

The block b1 is rendered automatically as it is part of the default selection screen. The 2 subscreens though have to be included (here within a tabbed context):

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-001.
  PARAMETERS: r1  RADIOBUTTON GROUP rb1,
              r2  RADIOBUTTON GROUP rb1,
              r3  RADIOBUTTON GROUP rb1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
            p2 TYPE c LENGTH 10,
            p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
            q2 TYPE c LENGTH 10,
            q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.

**Here we include the 2 subcsreens explicitly.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
                  TAB (20) button1 USER-COMMAND push1
                                   DEFAULT SCREEN 100,
                  TAB (20) button2 USER-COMMAND push2
                                   DEFAULT SCREEN 200,
                  END OF BLOCK mytab.


START-OF-SELECTION.
  WRITE p1 && p2 && p3.

There is also another way to include screens, the CALL SELECTION-SCREEN <dynnr>, but can be a little messy.

Hope it helps,

George


George Manousaridis -- Break on through to the ABAP side