Skip to Content

Access Sub-Screen Selections in Dialogue Program in Parent Screen

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 24, 2020 at 12:19 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.