Leave subscreen

hi all
i had create a subscreen using dialog programming.
My question is hw to leave the subscreen by clicking the X at the top right cornor of the subscreen. Any code to use?
Thks

Hi Gray,
           Place One push button on the subscreen with name as we want for example i will place one push button with name CLOSE.In that CLOSE push button mention fuunciton code as CLOSE.
LOGIC:write this logic in PAI event ok..
case sy-ucomm.
when 'CLOSE'.
leave program.
endcase.
Reward points if helpful.
Kiran Kumar.G.A
        Have a Nice Day..
Edited by: KIRAN KUMAR on Jan 16, 2008 7:53 AM

Similar Messages

  • Leave Program or leave to transction from subscreen

    Hi All,
    I am doing some validation in my subscreen and if i want to move out of subscreen ie i want to navigate to the other transaction or leave to screen 0 means how to make it?? i am getting sme error like in subscreen submit to screen is not allowed.
    Tnx,
    joe

    Hi Joe,
    The flow logic of a subscreen screen may not contain any dialog modules containing the statements
    SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN.
    Any of these statements causes a runtime error.
    You cannot change the GUI status of a main screen in a subscreen screen.
    The flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen.
    Subscreens cannot have their own OK_CODE field. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. This also applies to subscreen screens defined in a different program to the main screen.
    Regards,
    Md Ziauddin.

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 1
         OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • Double click on the node,ALV tree, subscreen

    Hi,
    I have a small requirement in ALV Tree
    left side i get a tree and when i double click on one of it , i'm trying to display the subscreen. even though i am setting the paramaters to the screen but i'm unable to get those values in the subscreen.
    example
    Name        Description                                                subscreen 0101
    xyz           xyz desc (double click on this)                  name    = XYZ
    ABC         abs desc                                                      descrip = xyz desc
    This is what the requirement is:
    Please help me out with the solution.
    Bhavana

    Hi Bhavana,
    Register your double click event in the ALV Tree program. Then call the respective subscreen using sy-ucomm value.
    IF NOT r_ucomm IS INITIAL.
        CASE r_ucomm.
          WHEN '&F03'.
            SET SCREEN 100.
            LEAVE SCREEN.
    endif.
    Refer the below code for setting the registering the event.
      CALL METHOD tree->get_registered_events
        IMPORTING
          events = l_events_s.
      l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
      APPEND l_event TO l_events_s.
      CALL METHOD tree->set_registered_events
        EXPORTING
          events                    = l_events_s
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      CREATE OBJECT l_events_receiver.
      SET HANDLER l_events_receiver->handle_item_click FOR tree.
    CLASS lcl_events_receiver DEFINITION.                       "#EC *
      PUBLIC SECTION.
        METHODS:
        handle_item_click FOR EVENT item_double_click OF cl_gui_alv_tree
            IMPORTING node_key fieldname.
    ENDCLASS.                    "lcl_handle_events DEFINITION
    CLASS lcl_events_receiver IMPLEMENTATION.
      METHOD handle_item_click.
        PERFORM employee_data USING node_key fieldname.
        CALL SCREEN 300.
      ENDMETHOD.                    "HANDLE_ITEM_DOUBLE_CLICK
    ENDCLASS.                    "lcl_events_receiver IMPLEMENTATION
    Thanks.
    Ganesh R K
    Edited by: Ganesh.rk83 on Jun 23, 2011 11:21 AM

  • Subscreen in module pool

    Hi,Iam new to module pool.My requirement is to display data on the same screen in table control when the end user clicks on a pushbutton.For that I have created a work area in the main screen.I have created a subscreen with the table control I want data I want.But it is getting displayed immediately when the first screen is getting displayed.It should get displayed when user clicks on a pushbutton.
    I think my question is clear,if not PLZ tell me where to clarify.

    Hi,
    i got a solution for your problem and i tried it and is successful, i hope this wil resolve your problem.
    as you said when you execute the transaction the table control wil be displayed, but for that you  creat one more empty subscreen and make it default subscreen.
    then you assign your subscreen with table control to be called when pushbutton is pressed.
    DATA: NUMBER(3) TYPE N VALUE '300'. "empty subscreen
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    CALL SUBSCREEN AREA INCLUDING SY-REPID NUMBER.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    CALL SUBSCREEN AREA.
    in report program.
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'DISPLAY'.
    NUMBER = '200'. "subscreen with table control
    WHEN 'BACK'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    regards,
    prakash reddy .s

  • 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

    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.

  • Call transaction in subscreen

    Hello,
    I have a requirement to build a screen with custom functionality, and in the lower part of the screen to have standard functionality of a transaction. How can I call that transaction in order to have my functionality also on the same screen?
    Thank you!

    hi Popescu Marian,
    You can call subscreen..in a vrious way
    <b>=> this is the url if you wanna call two screen ( define as sub screen ) on one screen</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
    <b>=> this is the url  if you wanna define selection screen as subscreen to order to call it in one screen</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    <b>code example :</b>
    REPORT demo_sel_screen_as_subscreen.
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.
    PARAMETERS: p1(10) TYPE c,
                p2(10) TYPE c,
                p3(10) TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1100.
    SELECTION-SCREEN BEGIN OF SCREEN 1200 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-020.
    PARAMETERS: q1(10) TYPE c OBLIGATORY,
                q2(10) TYPE c OBLIGATORY,
                q3(10) TYPE c OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 1200.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: number(4) TYPE n VALUE '1100'.
    START-OF-SELECTION.
      CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'BUTTON1'.
          number = 1100.
        WHEN 'BUTTON2'.
          number = 1200.
      ENDCASE.
    ENDMODULE.
    AT SELECTION-SCREEN.
      MESSAGE s888(sabapdocu) WITH text-030 sy-dynnr.
    => this is if you wanna call subscreen on a tabstrip
    http://help.sap.com/saphelp_nw04/helpdata/en/17/5bf1b52ba211d2954f0000e8353423/content.htm

  • Steps to create tabstrip for subscreen in selection screen

    hi,
    can let me know the steps taken to create subscreen in selection screen and put in tabstrip?
    i need to have 3 screens. 1000 being the tabstrip, 2000 being first subscreen and 3000 being the second subscreen.
    i have the abap code but i do not know the steps to create especially 1000 screen.
    for 2000 and 3000, once i activated the program, these 2 screens added but i do not know where can i create the 1000 screen.
    also, should i use wizard to create tabstrip?
    please advise. thanks
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.        SELECTION-SCREEN BEGIN OF BLOCK x WITH FRAME TITLE text-001.
    SELECT-OPTIONS: para1 FOR  field1 ,     
                                  para2 FOR field2.            
    SELECTION-SCREEN END OF BLOCK x.
    SELECTION-SCREEN END OF SCREEN 2000.
    SELECTION-SCREEN BEGIN OF SCREEN 3000 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK y WITH FRAME TITLE text-002.
    SELECT-OPTIONS: para3 FOR  field3 ,     
                                  para4 FOR field4.      
    SELECTION-SCREEN END OF BLOCK y.
    SELECTION-SCREEN:SKIP.
    SELECTION-SCREEN END OF SCREEN 3000.

    e_l,
      See the total doc.. with example.
    Assigning a Subscreen Area to a Tab Title
    You must assign a subscreen area to each tab title. There are two ways of doing this:
    Paging in the SAPgui
    You need to assign a separate subscreen area to each tab title, and define the function codes of the tab titles with type P (local GUI function). In the screen flow logic, you call all the subscreens in the PBO event. This means that all of the tab pages reside locally on the SAPgui.
    When the user chooses a tab title, paging takes place within the SAPgui. In this respect, the tabstrip control behaves like a single screen. In particular, the PAI event is not triggered when the user chooses a tab title, and no data is transported. While this improves the performance of your tabstrip control, it also has the negative effect that when the user does trigger the PAI event, all of the input checks for all of the subscreens are performed. This means that when the user is working on one tab page, the input checks may jump to an unfilled mandatory field on another page.
    Local paging at the SAPgui is therefore most appropriate for screens that display data rather than for input screens.
    Paging on the Application Server
    One subscreen area is shared by all tab titles and called in the PBO event. You define the function codes of the individual tab titles without a special function type. When the user chooses a tab page, the PAI event is triggered, and you must include a module in your flow logic that activates the appropriate tab page and assigns the correct subscreen to the subscreen area.
    Since the PAI event is triggered each time the user chooses a tab title, this method is less economical for the application server, but the input checks that are performed only affect the current tab page.
    Procedure in Either Case
    You create the subscreen areas within the tabstrip area. You assign the subscreen areas to one or more tab titles in the Screen Painter by selecting one or more titles. You can also assign a subscreen area to a tab title in the tab title attributes by entering the name of the subscreen area in the Reference field attribute.
    The procedure for the alphanumeric Screen Painter is described under Creating Tabstrip Controls.
    If you are paging at the SAPgui, create a subscreen area for each tab title. If you are paging at the application server, select all tab titles and create a single subscreen area. The subscreen areas may not cover the top line of the tab area. However, within a tab area, more than one subscreen area can overlap.
    Programming the Flow Logic
    In the flow logic, all you have to do by hand is include the correct subscreens. The screen flow and data transport to the ABAP program is the same as for normal subscreens. There are two ways of programming the screen flow logic, depending on how you have decided to page through the tabstrip control.
    Paging in the SAPgui
    When you page in the SAPgui, you must include a subscreen for each subscreen area:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN: <area1> INCLUDING [<prog 1>] <dynp 1>,
                      <area2> INCLUDING [<prog 2>] <dynp 2>,
                      <area3> INCLUDING [<prog 3>] <dynp 3>,
    PROCESS AFTER INPUT.
      CALL SUBSCREEN: <area1>,
                      <area2>,
                      <area3>,
    Paging on the Application Server
    When you page on the application server, you only have to include a subscreen for the one subscreen area:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN <area> INCLUDING [<prog>] <dynp>.
    PROCESS AFTER INPUT.
      CALL SUBSCREEN <area>.
    Handling in the ABAP Program
    Before you can use a tabstrip control in your ABAP program, you must create a control for each control in the declaration part of your program using the following statement:
    CONTROLS <ctrl> TYPE TABSTRIP.
    where <ctrl> is the name of the tabstrip area on a screen in the ABAP program. The control allows the ABAP program to work with the tabstrip control. The statement declares a structure with the name <ctrl> . The only component of this structure that you need in your program is called ACTIVETAB.
    Use in the PBO event
    Before the screen is displayed, you use the control to set the tab page that is currently active. To do this, assign the function code of the corresponding tab title to the component ACTIVETAB:
    <ctrl>-ACTIVETAB = <fcode>.
    When you page at the SAPgui, you only need to do this once before the screen is displayed. This initializes the tabstrip control. The default active tab page is the first page. After this, the page activated when the user chooses a tab title is set within SAPgui.
    When you page on the application server, you must assign the active page both before the screen is displayed for the first time, and each time the user pages. At the same time, you must set the required subscreen screen.
    You can suppress a tab page dynamically by setting the ACTIVE field of table SCREEN to 0 for the corresponding tab title.
    Use in the PAI event
    In the PAI event, ACTIVETAB contains the function code of the last active tab title on the screen.
    When you page in the SAPgui, this allows you to find out the page that the user can currently see. When you page at the application server, the active tab page is controlled by the ABAP program anyway.
    The OK_CODE field behaves differently according to the paging method:
    Paging in the SAPgui
    When you page in the SAPgui, the PAI event is not triggered when the user chooses a tab title, and the OK_CODE field is not filled. The OK_CODE field is only filled by user actions in the GUI status or when the user chooses a pushbutton either outside the tabstrip control or on one of the subscreens.
    Paging on the application server
    If you are paging at the application server, the PAI event is triggered when the user chooses a tab title, and the OK_CODE field is filled with the corresponding function code.
    To page through the tabstrip control, you must assign the function code to the ACTIVETAB component of the control:
    <ctrl>-ACTIVETAB = <ok_code>.
    This statement overwrites the function code of the last active tab page with that of the new tab title. At the same time, you must ensure that the correct subscreen is inserted in the subscreen area.
    Otherwise, tabstrip controls are handled like normal subscrens in ABAP programs, that is, the ABAP program of a subscreen screen must contain the dialog modules called from the flow logic of the subscreen.
    Examples
    Tabstrip control, paging at SAPgui
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ENDIF.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is itself. It has the following layout:
    The screen contains a tabstrip area called MYTABSTRIP with three tab titles PUSH1, PUSH2 and PUSH3. The function codes have the same name, and all have the function type P. One of the subscreen areas SUB1 to SUB3 is assigned to each tab title. The pushbutton has the name BUTTON and the function code ‘OK’.
    In the same ABAP program, there are three subscreen screens 110 to 130. Each of these fits the subscreen area exactly. The layout is:
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      CALL SUBSCREEN: SUB1 INCLUDING SY-REPID '0110',
                      SUB2 INCLUDING SY-REPID '0120',
                      SUB3 INCLUDING SY-REPID '0130'.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN: SUB1,
                      SUB2,
                      SUB3.
      MODULE USER_COMMAND.
    The screen flow logic of subscreens 110 to 130 does not contain any module calls.
    When you run the program, a screen appears on which the second tab page is active, since the program sets the ACTIVETAB component of the structure MYTABSTRIP to PUSH2 before the screen is displayed. The user can page through the tabstrip control without the PAI event being triggered. One of the three subscreens is included on each tab page.
    When the user chooses Continue, the PAI event is triggered, and an information message displays the function code of the tab title of the page that is currently active.
    Tabstrip control with paging on the application server.
    REPORT DEMO_DYNPRO_TABSTRIP_LOCAL.
    CONTROLS MYTABSTRIP TYPE TABSTRIP.
    DATA: OK_CODE TYPE SY-UCOMM,
          SAVE_OK TYPE SY-UCOMM.
    DATA  NUMBER TYPE SY-DYNNR.
    MYTABSTRIP-ACTIVETAB = 'PUSH2'.
    NUMBER = '0120'.
    CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE USER_COMMAND INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'OK'.
        MESSAGE I888(SABAPDOCU) WITH 'MYTABSTRIP-ACTIVETAB ='
                                      MYTABSTRIP-ACTIVETAB.
      ELSE.
        MYTABSTRIP-ACTIVETAB = SAVE_OK.
        CASE SAVE_OK.
          WHEN 'PUSH1'.
            NUMBER = '0110'.
          WHEN 'PUSH2'.
            NUMBER = '0120'.
          WHEN 'PUSH3'.
            NUMBER = '0130'.
        ENDCASE.
      ENDIF.
    ENDMODULE.
    The statically-defined next screen for screen 100 is itself, and its layout is the same as in the above example. However, the function codes of the three tab titles have the function type <blank> and they all share a single subscreen area SUB.
    The same subscreen screens 110 to 130 are defined as in the last example.
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0100.
      CALL SUBSCREEN SUB INCLUDING SY-REPID NUMBER.
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
      CALL SUBSCREEN SUB.
      MODULE USER_COMMAND.
    In this example, the program includes a subscreen screen in the subscreen area SUB dynamically during the PBO event.
    The screen flow logic of subscreens 110 to 130 does not contain any module calls.
    This example has the same function as the previous example, but the paging within the tabstrip control is implemented on the application server. Each time the user chooses a tab title, the function code from the OK_CODE field is assigned to the ACTIVETAB component of structure MYTABSTRIP. At the same time, the variable NUMBER is filled with the screen number of the subscreen that has to be displayed in the subscreen area SUB of the tabstrip control
    Pls. reward if useful

  • How to leave the current dialog box screen?

    Hi Experts,
    Now I met a problem when I use statement LEAVE SCREEN for closing current dialog box screen. The scenario is like this:
    There is a screen '0010' under function group A, on this screen, there are 4 tabs, i created a custom control element on tab 4. with this custom control I embeded a subscreen 0910 which is defined under function group B not A, in the PAI of subscreen 0910, i called another dialog box screen 0920 which is defined under function group B also. statement CALL SCREEN '0920' is used for this and it works fine.              
                    But now when i click on the X (cancel) button on the dialog box, it is not closed but still there. So i use statement 'LEAVE SCREEN TO 0910' for closing the dialog box, but finally, not only the dialog box screen is closed but the screens '0910', '0010' are also closed.
    I think the problem is because that screen '0010' and  '0910' , '0920' are not under same function group, but I don't know the solution for closing the dialog box only.
    Lynn Liu

    HI,
    Debug the program after you press the CANCEL button , you will get where the conrol is flowing , And instead of using
    Leave to screen '910'          use               Leave to screen 0.
    Regards,
    Madhukar Shetty

  • ALV in subscreen that was defined inside of report (not SE51)

    Hello Gurus,
    I've one problem and I'm out of ideas. I've defined in code tapstrips like below
    SELECTION-SCREEN BEGIN OF SCREEN 102 AS SUBSCREEN.
    SELECTION-SCREEN END OF SCREEN 102.
    SELECTION-SCREEN BEGIN OF SCREEN 0103 AS SUBSCREEN.
    SELECTION-SCREEN END OF SCREEN 0103.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK one FOR 25 LINES.
      SELECTION-SCREEN TAB (15) bl_corr USER-COMMAND ucomm1 DEFAULT SCREEN 102.
      SELECTION-SCREEN TAB (15) bl_addit USER-COMMAND ucomm2 DEFAULT SCREEN 103.
    SELECTION-SCREEN END OF BLOCK one.
    In screen 103 I would like to show ALV. How can I achive this? When I'm using code below nothing is being displayed. I think that problem lies in container. When I execute method IS_VALID of container I'm getting 0. When I'm passing empty parameter during creation of grid object (no conatiner) then I'm getting results on whole screen.
    INITIALIZATION.
    DATA: go_container1 TYPE REF TO cl_gui_docking_container,
           go_grid1 TYPE REF TO cl_gui_alv_grid,
           gs_fieldcatalog TYPE LVC_T_FCAT.
    CREATE OBJECT go_container1
      EXPORTING
        REPID                       = sy-repid
        DYNNR                       = '0103'
        NAME                        = 'CUSTOM_AREA'.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
        I_STRUCTURE_NAME             = '/VFE/JTO_SCI_RPL'
      CHANGING
        CT_FIELDCAT                  = gs_fieldcatalog.
    CREATE OBJECT go_grid1
        EXPORTING i_parent =  go_container1.
      CALL METHOD GO_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        CHANGING
          IT_OUTTAB                     = gt_replacment_lines
          IT_FIELDCATALOG               = gs_fieldcatalog.
    BR
    Marcin Cholewczuk

    HI,
    this is how i achived alv on tabstrip.
    REPORT  zreport_alv_tabstrip.
    TYPES:
      BEGIN OF type_s_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        seatsmax LIKE sflight-seatsmax,
        seatsocc LIKE sflight-seatsocc,
      END OF type_s_flight,
      BEGIN OF type_s_sbook,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        bookid   LIKE sbook-bookid,
      END OF type_s_sbook.
    CONSTANTS:
      BEGIN OF c_tab1,
        tab1 LIKE sy-ucomm VALUE 'TAB1_FC1',
        tab2 LIKE sy-ucomm VALUE 'TAB1_FC2',
      END OF c_tab1.
    CONTROLS:  tab1 TYPE TABSTRIP.
    DATA:
      t_flight TYPE TABLE OF type_s_flight,
      fs_flight LIKE LINE OF t_flight,
      t_book TYPE TABLE OF type_s_sbook,
      fs_book LIKE LINE OF t_book,
      c_container TYPE REF TO cl_gui_custom_container,
      c_container1 TYPE REF TO cl_gui_custom_container,
      grid TYPE REF TO cl_gui_alv_grid,
      grid1 TYPE REF TO cl_gui_alv_grid,
      t_fcat TYPE lvc_t_fcat,
      t_fcat1 TYPE lvc_t_fcat,
      fcat LIKE LINE OF t_fcat,
      fcat1 LIKE LINE OF t_fcat,
      gs_layout TYPE  lvc_s_layo,
      ok_code LIKE sy-ucomm,
      BEGIN OF g_tab1,
        subscreen   LIKE sy-dynnr,
        prog        LIKE sy-repid VALUE 'YH1494_ALV_TABSTRIP',
        pressed_tab LIKE sy-ucomm VALUE c_tab1-tab1,
      END OF g_tab1.
    SELECT carrid   connid   fldate   seatsmax    seatsocc  FROM sflight   INTO TABLE t_flight  UP TO 100 ROWS.
    SELECT carrid    connid   bookid  FROM sbook  INTO TABLE t_book UP TO 50 ROWS.
    gs_layout-sel_mode = 'D'.
    gs_layout-no_merging = 'X'.
    gs_layout-zebra = 'X'.
    fcat-fieldname = 'CARRID'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'CONNID'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'FLDATE'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'SEATSMAX'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat-fieldname = 'SEATSOCC'.
    fcat-outputlen = 15.
    fcat-ref_table = 'SFLIGHT'.
    fcat-key_sel ='X'.
    APPEND fcat TO t_fcat.
    fcat1-fieldname = 'CARRID'.
    fcat1-outputlen = 15.
    fcat1-ref_table = 'SBOOK'.
    fcat1-key_sel ='X'.
    APPEND fcat1 TO t_fcat1.
    fcat1-fieldname = 'CONNID'.
    fcat1-outputlen = 15.
    fcat1-ref_table = 'SFLIGHT'.
    fcat1-key_sel ='X'.
    APPEND fcat1 TO t_fcat1.
    fcat1-fieldname = 'BOOKID'.
    fcat1-outputlen = 15.
    fcat1-ref_table = 'SBOOK'.
    fcat1-key_sel ='X'.
    APPEND fcat1 TO t_fcat1.
    CALL SCREEN 100.
    MODULE tab1_active_tab_set OUTPUT.
      tab1-activetab = g_tab1-pressed_tab.
      CASE g_tab1-pressed_tab.
        WHEN c_tab1-tab1.
          g_tab1-subscreen = '0101'.
        WHEN c_tab1-tab2.
          g_tab1-subscreen = '0102'.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                    "TAB1_ACTIVE_TAB_SET OUTPUT
    MODULE tab1_active_tab_get INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN c_tab1-tab1.
          g_tab1-pressed_tab = c_tab1-tab1.
        WHEN c_tab1-tab2.
          g_tab1-pressed_tab = c_tab1-tab2.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                    "TAB1_ACTIVE_TAB_GET INPUT
    MODULE status_0110 OUTPUT.
      CREATE OBJECT c_container
        EXPORTING
          container_name              = 'C_CONTAINER'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CREATE OBJECT grid
        EXPORTING
          i_parent          = c_container
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init   = 2
          error_cntl_link   = 3
          error_dp_create   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL METHOD grid->set_table_for_first_display
        EXPORTING
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = t_flight
          it_fieldcatalog               = t_fcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDMODULE.                 " STATUS_0110  OUTPUT
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    MODULE status_0100 OUTPUT.
      SET PF-STATUS '100'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE status_0102 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      CREATE OBJECT c_container1
        EXPORTING
          container_name              = 'C_CONTAINER1'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CREATE OBJECT grid
        EXPORTING
          i_parent          = c_container1
        EXCEPTIONS
          error_cntl_create = 1
          error_cntl_init   = 2
          error_cntl_link   = 3
          error_dp_create   = 4
          OTHERS            = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL METHOD grid->set_table_for_first_display
        EXPORTING
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = t_book
          it_fieldcatalog               = t_fcat1
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDMODULE.                 " STATUS_0102  OUTPUT
    Regards and Best wishes.

  • Error message in subscreen

    Hi,
    I have used 4 tabstrips inside one main screen and created 4 subscreens for those 4 tabs. Now when i show an error message using  MESSAGE SXXX , it just shows the message in info format and continues with the further code. If i use the format MESSAGE EXXX then it freezes the subscreen right there.
    My requirment is that to show an error message which wont execute the further code and will retain the values filled by user.
    I cant use  MESSAGE SXXX TYPE 'E' and LEAVE TO SCREEN SY-DYNNR as they are subscreens and not screens.
    Please help.

    Hi,
    Error messages always stops the execution and freezes the screen. Instead you display the message in this format.
    MESSAGE ID 'ZDM_MESSAGE_GENERIC' TYPE 'S' NUMBER 001 DISPLAY LIKE 'E'.
    or use type W
    thanks and regards.
    Aswath.

  • Default settings for activating warranty subscreen

    I have a requirement to activate the warranty subscreen for maintenance equipment.  When this subscreen is activated, the "inherit warranty" and "pass on warranty" options are selected by default for equipment that already exists in the system.  I want the equipment that already exists to not have those boxes checked.
    Is there a way to configure the warranty subscreen or the equipment master record so that pre-existing pieces of equipment do not receive the "inherit warranty" and "pass on warranty" checks by default when the warranty subscreen is activated?

    Thanks for your response.  I understand what the flags do.  My concern is accidentally passing on or inheriting a warranty incorrectly because the flags were set by default for equipment that was already created before the warranty check was activated.  I don't expect it to be a big issue, but I wanted to eliminate that possibility from the beginning if possible.
    I am leaving the thread unanswered for a bit to see if there are other responses.

  • Call subscreen

    Hi
    CALL SUBSCREEN is used only in  the flow logic but not in the actual program. I want to know the reason why it is not used in the  actual program. please help me.
    POINTS WILL BE GIVEN.
    thanks,
    S.Gangi Reddy.

    hi,
    Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.
    Subscreens are screens which can be embeded into another screen. These can be used and created with both selection screen as well as screen painter.
      They differ from normal screens in the way that that they don't have OK_CODE field of ther own and there PBO and PAI transfer data to the ABAP program in which these screens were created and the cannot have module calls which change status or leave screen and module call AT EXIT-COMMAND AND E type function codes.
    Subscreens allow you to embed one screen within another at runtime. The term subscreen applies both to the screen that you embed, and the area on the main screen in which you place it. This section is about subscreen areas. The actual screens that you embed are called subscreen screens. When you use a subscreen, the flow logic of the embedded screen is also embedded in the flow logic of the main screen. Using subscreens on screens is like using includes in ABAP programs.
    In screen painter(SE51) choose the subscreen tool button and draw a subscreen area on the screen,this subscreen area will be used to hold the subscreen at run time.To make a subscreen select the attribute screen type as subscreen and specify the size of the subscreen according to the size of the subscreen area in which it will be placed.
    We use ABAP statement to embed and start the flow logic of the subscreen area in the PBO of a screen. A subscreen can contain another subscreen.
    Hope this answers you, Do reward.
    Edited by: Runal Singh on Feb 8, 2008 5:36 PM

  • Subscreen

    I Have 2 screens to Develop.
    1st screen which is Normal screen has 3 fields...
    Based on the selection iam populating the
    records in the 2nd screen's Table control.
    I want to populate the subscreen which holds the input values of
    the first screen in the second screen.
    it means second screen must have both subscreen and the table control.
    iam able to poplulate the records in the table control but
    i need the logic to display the subscreen in the 2nd screen.
    can anybody help please.

    Hi madhu,
         If you are  creating the subscreen for same program of main screen.The PBO and PAI of these 2 will be same.OK.The name of any screen elements in same program should not be same.
    Q1. You  want to populate the subscreen which holds the input values of
           the first screen in the second screen.
    A.  Declare the same fields which are in first screen with diff. names.
         In PAI  move all screen values to second screen elements.you will get  the
         values. As usual call the subscreen  from PBO of Main screen.
    Q2.If you want to get the values in table control while creating the table control
          wizard it will ask the internal table name .Give the internal table name in
           which data you want to transfer to table control.
    Pls see the below code.
    Example
    Subscreens
    REPORT demo_dynpro_subscreens.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: number1(4) TYPE n VALUE '0110',
          number2(4) TYPE n VALUE '0130',
          field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.
    CALL SCREEN 100.
    MODULE status_100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE fill_0110 OUTPUT.
      field = 'Eingabe 1'(001).
    ENDMODULE.
    MODULE fill_0120 OUTPUT.
      field = field1.
    ENDMODULE.
    MODULE fill_0130 OUTPUT.
      field = 'Eingabe 2'(002).
    ENDMODULE.
    MODULE fill_0140 OUTPUT.
      field = field2.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE save_ok INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
    ENDMODULE.
    MODULE user_command_0110 INPUT.
      IF save_ok = 'OK1'.
        number1 = '0120'.
        field1 = field.
        CLEAR field.
      ENDIF.
    ENDMODULE.
    MODULE user_command_0130 INPUT.
      IF save_ok = 'OK2'.
        number2 = '0140'.
        field2 = field.
        CLEAR field.
      ENDIF.
    ENDMODULE.
    MODULE user_command_100 INPUT.
      CASE save_ok.
        WHEN 'SUB1'.
          number1 = '0110'.
        WHEN 'SUB2'.
          number1 = '0120'.
          CLEAR field1.
        WHEN 'SUB3'.
          number2 = '0130'.
        WHEN 'SUB4'.
          number2 = '0140'.
          CLEAR field2.
      ENDCASE.
    ENDMODULE.
    The next screen number of screen 100 is 100 (statically-defined). Its layout is as follows:
    There are four pushbuttons with the function codes SUB1 to SUB4, and two subscreen areas AREA1 and AREA2.
    In the same ABAP program, there are four subscreen screens 110 to 140. Each of these fits the subscreen area exactly. The layout is:
    The input/output field of all four subscreen screens has the name FIELD. The function codes of the pushbuttons on the subscreen screens 110 and 130 are OK1 and OK2.
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE status_100.
      CALL SUBSCREEN: area1 INCLUDING sy-repid number1,
                      area2 INCLUDING sy-repid number2.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE save_ok.
      CALL SUBSCREEN: area1,
                      area2.
      MODULE user_command_100.
    The screen flow logic of subscreen screens 110 and 130 is:
    PROCESS BEFORE OUTPUT.
      MODULE fill_0110|0130.
    PROCESS AFTER INPUT.
      MODULE user_command_0110|0130.
    The screen flow logic of subscreen screens 120 and 140 is:
    PROCESS BEFORE OUTPUT.
      MODULE fill_0120|0150.
    PROCESS AFTER INPUT.
    When you run the program, a screen appears on which subscreens 110 and 130 are displayed. The pushbuttons on the main screen allow you to choose between two subscreen screens for each screen area. The pushbuttons on the subscreens allow you to transfer the data from subscreens 110 and 130 to subscreens 120 and 140.
    Since the same field name FIELD is used on all subscreens, the identically-named ABAP field is transferred more than once in each PBO and PAI event of the main screen. For this reason, the values have to be stored in the auxiliary fields FIELD1 and FIELD2 in the ABAP program.
    The pushbuttons on the subscreen screens have different function codes, and they are handled normally in an ABAP field. If the function codes had had the same names, it would again have been necessary to use auxiliary fields.
    Pls. reward points if helpful.

  • Selection OPTION: Date input problem in Module POOL through Subscreen

    Dear ALL,
    Being new to ABAP, I am struck in a Problem.
    Requirement:
    I want an option on the Screen( My Screen 9000) for Date Range. Through this Date-Range I want to filter and pull some data from
    Database.
    As Date Range Selection option is possible only through Sub-Screen integration. Hence I integrated a Sub-Screen 400 (as below) and named the Sub-Screen area as SEL on my screen.
    Problem: As soon as I enter the dates on the screen, then those dates are not taken up by the code.
    During debugging I saw the the S_datum-low and S_datum-high are empty (in fact 00000000)
    The code follows:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_9000.
      Call SUBSCREEN SEL  INCLUDING sy-repid '400'.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_9000.
    DATA:  gv_datum     Type   dats,
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
        SELECT-OPTIONS: s_datum FOR gv_datum.
    SELECTION-SCREEN END OF SCREEN 400 .
    Plz help where I am missing something.
    Regards
    Chandan

    Call the subscreen during the AT SELECTION-SCREEN event.
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    SELECT-OPTIONS: s_datum FOR gv_datum.
    SELECTION-SCREEN END OF SCREEN 400 .
    AT SELECTION-SCREEN.
       CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
       SET PF-STATUS '0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
       CASE sy-ucomm.
         WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
           LEAVE TO SCREEN 0.
       ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

Maybe you are looking for

  • Using sqlldr to load old UNIFY data into oracle 11g

    I have a dump of an old UNIFY database whitch I need to build a controlfile to import to oracle using sql loader. the main problem is that the file is containing records for 64 tables the dumpfile is starting with the name of the table, and then data

  • Dynamic End Point Lookup in BPEL from Oracle Service Registry

    Hi, I have configured the OSR as mentioned in the configuration document, http://download-east.oracle.com/docs/cd/B31017_01/integrate.1013/b28982/service_config.htm#BABBHJAF I am able to connect to the OSR using JDeveloper in BPEL Project, but when I

  • JRC Deployment Guide for Crystal Reports 2008

    I just downloaded a trial version of Crystal Reports 2008 & was testing out the integration of this component into our Java web based application. I found the "Crystal Reports XI Release 2 - Java Reporting Component Deployment Guide" PDF file, but I

  • Multi cam Monitor in PPro 5.5 is blocky and low res

    Is there some type of setting that will make my Multi-Camera monitor look like it did in Premiere Pro 5? right now is very pixelated and blocky. I haven't used Multicam Monitor before in PPro 5.5, but 5 it was ok (it didn't gang realtime with the pro

  • Xbox One Portfowarding on WRT310N to get NAT open

    https://support.xbox.com/en-US/xbox-one/networking/network-ports-used-xbox-live Can someone help me out with this? Ive tried with single port and the port forwarding but my NAT is still moderate.