Skip to Content
author's profile photo Former Member
Former Member

Not Displaying List when called in subscreen

Hi all

My program is not showing the output screen(list) when it is called from the subscreen, it is returing back to the subscreen.

Following is the program flow.

1. I have a normal selection screen and a selection subscree.

SELECTION-SCREEN BEGIN OF BLOCK b1. PARAMETERS: pa_bukrs LIKE t001-bukrs,

pa_kunnr LIKE kna1-kunnr,

pa_kdgrp LIKE knvv-kdgrp,

pa_gjahr LIKE bsid-gjahr DEFAULT '2007'.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF SCREEN 2001 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b2.

PARAMETERS: p1 RADIOBUTTON GROUP g1 DEFAULT 'X',

p2 RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN END OF SCREEN 2001.

2. Now after displaying normal selection screen, with some input parameter combination i am calling new screen, as shown below.

IF pa_kunnr <> ''.

CALL SCREEN 100.

ENDIF.

following is the code of screen flow logic

PROCESS BEFORE OUTPUT.

MODULE status_0100.

CALL SUBSCREEN area INCLUDING sy-repid '2001'.

PROCESS AFTER INPUT.

MODULE cancel AT EXIT-COMMAND.

MODULE TEST.

CALL SUBSCREEN area.

MODULE user_command_0100.

3. Now in "user_command_0100" Module i am writing the commands to print the list, as shown below

CASE sy-ucomm.

WHEN 'BACK'.

LEAVE PROGRAM.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE PROGRAM.

LEAVE TO SCREEN 0.

WHEN 'EXEC'. "This is the button defined on the sub screen"

IF ( p1 = 'X' ).

PERFORM select_data_opt3_1.

PERFORM rep_opt3_1_top.

PERFORM rep_opt3_1_print.

ELSE.

PERFORM select_data_opt3_2.

ENDIF.

ENDCASE.

_Problem:-_ Now i am writing the list in the perform statements,

now problem is that after executing all the command the program is returing back to the subscree(OR screen no 100) without displaying the list.

Please tell me where should i give the write command.

Regards

Sukhjinder Singh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 08:58 AM

    You have to write the follwoing statements if you want to switch list from screen :

    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

    SET PF-STATUS space.

    SUPPRESS DIALOG.

    Ex: Check the following code:

    REPORT demo_leave_to_list_processing .

    TABLES demo_conn.

    DATA: wa_spfli TYPE spfli,

    flightdate TYPE sflight-fldate.

    CALL SCREEN 100.

    MODULE status_0100 OUTPUT.

    SET PF-STATUS 'SCREEN_100'.

    ENDMODULE.

    MODULE cancel INPUT.

    LEAVE PROGRAM.

    ENDMODULE.

    MODULE user_command_0100.

    CALL SCREEN 500.

    SET SCREEN 100.

    ENDMODULE.

    MODULE call_list_500 OUTPUT.

    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.

    SET PF-STATUS space.

    SUPPRESS DIALOG.

    SELECT carrid connid cityfrom cityto

    FROM spfli

    INTO CORRESPONDING FIELDS OF wa_spfli

    WHERE carrid = demo_conn-carrid.

    WRITE: / wa_spfli-carrid, wa_spfli-connid,

    wa_spfli-cityfrom, wa_spfli-cityto.

    HIDE: wa_spfli-carrid, wa_spfli-connid.

    ENDSELECT.

    CLEAR: wa_spfli-carrid.

    ENDMODULE.

    TOP-OF-PAGE.

    WRITE text-001 COLOR COL_HEADING.

    ULINE.

    TOP-OF-PAGE DURING LINE-SELECTION.

    WRITE sy-lisel COLOR COL_HEADING.

    ULINE.

    AT LINE-SELECTION.

    CHECK NOT wa_spfli-carrid IS INITIAL.

    SELECT fldate

    FROM sflight

    INTO flightdate

    WHERE carrid = wa_spfli-carrid AND

    connid = wa_spfli-connid.

    WRITE / flightdate.

    ENDSELECT.

    CLEAR: wa_spfli-carrid.

    screen 100

    PROCESS BEFORE OUTPUT.

    MODULE STATUS_0100.

    PROCESS AFTER INPUT.

    module cancel at exit-command.

    MODULE USER_COMMAND_0100.

    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.