Subscreen logic

hi all,
i have the following code in my main screen 3000.
process before output.
  module read_data_3000.
  module status_3000.
  call subscreen subscr_hu including 'ZTEST' number1.
process after input.
  module pai_at_exit_3000 at exit-command.
  call subscreen subscr_hu.
  module user_command_3000.
i have two tabstrips. the default is in subscreen 3010 and the second is in 3020.
when iam click on tab2 , the logic jumps to PAI of teh main screen shown above and then at the statement 'call subscreen subscr_hu.' the flow goes to PBO of my first tab (3010)again. why is this?
is it becuase of the same subscreen area i have for two tab strips?
if i define separate subscreen areas for the two tabs would it be different/ would i have any problems?
FYI.the user can change data in my screens.

You need to set your active tab in the PBO of your main screen and get your active tab in the PAI of the main screen as follows
process before output.
*-- PBO flow logic for tabstrip 'MAINSCREENTAB'
  module mainscreentab_active_tab_set.
*-- include the subscreen for the selected tab
  call subscreen mainscreentab_sca
    including s_mainscreentab-prog s_mainscreentab-subscreen.
*-- set the status
  module status_0100.
*-- Initialize variables
  module initialize_data_on_scr_0100.
process after input.
*-- When Exit function keys are pressed
  module exit_100 at exit-command.
*-- PAI flow logic for tabstrip 'MAINSCREENTAB'
  module mainscreentab_active_tab_get.
*-- call the subscreen
  call subscreen mainscreentab_sca.
*-- Process based on user command
  module user_command_0100.
Module set_active_tab has the following logic
  mainscreentab-activetab = s_mainscreentab-pressed_tab.
  case s_mainscreentab-pressed_tab.
    when c_mainscreentab-tab1.
      s_mainscreentab-subscreen = '0200'.
    when c_mainscreentab-tab2.
      s_mainscreentab-subscreen = '0300'.
    when c_mainscreentab-tab3.
      s_mainscreentab-subscreen = '0400'.
    when others.
*-- Do Nothing
  endcase.
module get active tab code is
  v_ok_code = sy-ucomm.
  case v_ok_code.
    when c_mainscreentab-tab1.
      s_mainscreentab-pressed_tab = c_mainscreentab-tab1.
    when c_mainscreentab-tab2.
      s_mainscreentab-pressed_tab = c_mainscreentab-tab2.
    when c_mainscreentab-tab3.
      s_mainscreentab-pressed_tab = c_mainscreentab-tab3.
    when others.
*-- Do Nothing
  endcase.
s_mainscreentab is defined as follows
data: begin of s_mainscreentab,
        subscreen   like sy-dynnr,
        prog        like sy-repid value <YOUR PROGRAM>,
        pressed_tab like sy-ucomm value c_mainscreentab-tab1.
data: end of s_mainscreentab.
controls:  mainscreentab type tabstrip.
MAINSCREENTAB is my tabstrip control, 0100 is my main screen, MAINSCREENTAB_TAB1, MAINSCREENTAB_TAB2, MAINSCREENTAB_TAB3 are the individual tabs.
In the attributes of the individual tabs I have function code 'MAINSCREENTAB_FC1' set for tab 1, MAINSCREENTAB_SCA in the reference field attribute. MAINSCREENTAB_SCA is the name of my subscreen.
Did you create this using the wizard? Anyway, if you have all the steps above, you should be good to go. Please let me know, if you have any questions in this regard.
Srinivas

Similar Messages

  • Disabling subscreen fields..

    hi,
    i have a screen with a subscreen that has a tabstrip with 5 tabs.
    during one of the operations i need to disable all the fields in all the screen areas of that screen inclduing the subscreen tabstrip fields.
    its not working, in my PBO module i write as follows:
    LOOP AT SCREEN.
        SCREEN-INPUT = '0'.
        MODIFY SCREEN.
    ENDLOOP.
    only the fields of the current screen are disabled. the fields in the tabstrip in subscreen are still in input mode !! what to do ?
    thks

    you need to do the same logic for the subscreen also.
    if you placed the above logic for main screen . place the same logic for subscreens also.
    main screen logic
    process before output.
    call subscreen sub including sy-repid '0200'.
      module status_0100.
    process after input.
    module user_command_0100.
    subscreen logic.
    process before output.
    * MODULE STATUS_0200.
      module status_0100.
    process after input.
    * MODULE USER_COMMAND_0200.
    module code.
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    loop at screen.
    screen-input = 0.
    modify screen.
    endloop.
    endmodule.                 " STATUS_0100  OUTPUT
    this work for me, you try it from your end.

  • Ehancement in MIGO

    Hi All,
    While doing the MIGO we enter the Shelf life expiration date.
    My Requirement is that , for a material with no minimum shelf life period while doing the migo , i should not enter shelf life expiry date and therefore skip the message'Enter the shelf life expiration date '. is there any user exit to heck for minimum shelf life period in materila master  or anyther way.
    thanks.

    Hi
    Try to merge two or more BADI's in one BADI, for instance BADI's that doesn't use new tabs (ie: they don't call subscreens, logic PAI/PBO that is more complex).
    Regards
    Eduardo

  • Two tabstrip in a page

    Hi experts,
    I need to create two different tabstrip control in a single page.
    please help me.

    Hi,
    You can create multiple Tabstrips in the screen. And there are 2 ways by which you can achieve this requirement.
    1. By using the coding method. You need to write all the code to control the flow of the Tabs.
    2. By using the Wizard you can simply generate the control code, making it much faster to develop the Dynpro . Also the code is consistent across the development. You can directly concentrate on the Subscreen Logic instead of Tabstrip Control.
    When Creating the Tabstrips, keep the following details in mind.
    1. Declare all the Includes ( TOP, PBO, PAI,SUB).
    2. Use them to modularize the Tab Strip Creation.
    3. Create the Tabstrips using the SAP GUI Control option.
    Thanks,
    Samantak.

  • PAI is NOT trigger for ALV in subscreen

    Hi, All
    Currently, I am using ALV object to output ALV report in one SUBSCREEN.
    When I double-click, the PAI is not trigger. But just go into double-click event directly.
    However, If I use AVL function or object to output in NORMAL screen, PAI is trigger after double click.
    SY-UCOMM is like %_GC 920 3

    Hello Ocean
    The ALV grid is a special control in terms that all the events are already pre-registered at the control (method SET_REGISTERED_EVENTS). This means that as soon as you define an event handler method and SET HANDLER for the corresponding event your application can deal with this event.
    You can register all events of the ALV grid as application events (i.e. after any event handling PAI of the screen is triggered) at the CONSTRUCTOR method:
    I_APPL_EVENTS = 'X'
    However, I prefer to use method CL_GUI_CFW=>SET_NEW_OK_CODE because it offers more flexibility to me:
    Only those event where I need to trigger PAI after event handling are affected
    By setting a new ok-code I can trigger a specific logic at PAI
    Regards 
      Uwe

  • Add button to BP subscreen Identification Numbers

    Hi gurus,
    in transaction BP there is a tab called Identification. On this tab a subscreen area Identification Numbers exists which contains a screen (SAPLBUD0 - 1520). We want some added logic on the screen by means of a new button. I think it is not possible to add a button because the screen is hard-coded, so what I thought should happen is that a copy of the screen is made including the new button.
    And now my problem occurs, how do I replace the former screen(SAPLBUD0 - 1520) with the new screen on that particular screen area?
    kind regards,
    Wim van Erp

    I've found it. trx. BUS3 contains the specific screen.
    regards.

  • Calling subscreen on click of radio button

    Hi,
    I am creating a module pool program , in which on click of a radio butto to 'YES' a subscreen should appear ( on the main screen) with few fields so that the user can input values of it.
    But I am having proble in calling the subscreen in PAI event.Actually I think it should be something like this
    Module user_command.
      case sy-ucomm.
       when rb_yes = 'X'
        { CALL SUBSCRREN CODE
    ENDIF.
    Can this be done? I f yes how? I only know how to call subscreen in PBO, but the syntax for calling subscrren is different in PAI i think.

    Hi,
    Try doing this.
    This is your flow logic in the main screen  to call the Subscreen's PBO
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0110.
    CALL SUBSCREEN TAB1_REF1 INCLUDING 'ZTRIAL' '0111'.
    In the PAI of the main screen,
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0110.
    CALL SUBSCREEN TAB1_REF1.
    Assign a function code to your radio button.
    Layout -> Attributes -> Function Code
    In the TOP include,
    DATA: v_dynnr type sy-dynnr.
    In module USER_COMMAND_0110.
    if p_rad = 'X'.
       v_dynnr = '0111'.
    else.
      v_dynnr =  ' '
    endif.
    You can check this for your reference
    [http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dbabfe35c111d1829f0000e829fbfe/content.htm]

  • Calling subscreen in module pool

    Hi friends,
                    I am trying to call sub-screen in module pool.
    but it is giving me an error as  "." or "ID ... FIELD ..." expected after "SUBSCREEN".
    i am using followning statement
    CALL SUBSCREEN SUB  INCLUDING SY-REPID '0101'.
    OR
    CALL SUBSCREEN SUB. (SUB is screen i have created in layout).
    I tried it a lot, but not able to solve it.
    Kindly help me.

    Hi Kiran,
    <li>Subscreen concept is like this. You have one main screen. You want another screen which has to be displayed on main screen when you run main screen.
    <li>First we need to create subscreen area on main screen. Goto layout and click subscreen element and place on main screen and name to that subscreen area as SUB.
    <li>Now create another screen type subscreen. place fields on that and write logic.
    <li> Check REPORT demo_dynpro_subscreens.
    Thanks
    venkat.O

  • How to call table control in subscreen in module pool program

    Hi all,
    I have req,need call table control in subscreen,but have done but when scroll bar value getting changed ,
    please guide how to do it.if its possable send the code.
    regards
    santosh

    Hi,
    The navigation happens like this.
    Consider you have a main screen and 2 subscreens.
    When you click or do some event in the Subscreen 2 (lets say this is the one that has the table control), this will first trigger PAI of the Main Screen. In the flow logic of the Main screen, you would have written call subscreen <subscreen area1> and call subscreen <subscreen area2>.
    Now the subscreens get triggered based on the order in which you have written in the flow logic.
    So, here the modules before the first call subscreen statement in the Main Screen PAI is all executed. Now, it goes to the subscreen on which you have triggered an event and executes the modules in the subscreen.
    This is how the execution goes when you have subscreens.
    So there is no problem with the navigation. You only have to worry about the screen where you have the table control. Just debug and find where data is getting changed or duplicated.

  • Subscreen in module pool programming

    hello
    i want to call to subscreens to subscreen area of main screen dynamically.
    i tried using statement under PBO OF MAIN SCREEN flow logic.
    <u>call subscreen <sub screen name> including '<program name>' variable1'.</u>
    i declared all the things in layout as well as  in main program.
    data............
    <u>variable1 type sy-dynnr.
    if ( statement).
    variable = 'screen number'.
    endif.</u>in this way i have three sub screens.
    i am not getting any sytatic errors.
    but when i execute this . it showing some message.

    HI,
    CALL SUBSCREEN subscreen_name INCLUDING prog_name dynnr.
    where subscreen_name = your subscreen area
    prog_name = a variable which holds the name of desired program
    dynnr = a variable holding the screen number from the desired program
    br

  • 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.

  • 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

  • Enhancement for ME21N & ME22N new subscreen

    Hi all,
    I'm looking to ad a new subscreen using definition ME_GUI_PO_CUST. I looked at the example CL_EXM_IM_ME_GUI_PO_CUST to understand how it works. Do you know why in the example the include "LMEVIEWSF01" is used? How the logic in the PBA and PAI works with the new subscreen? And where to put the new logic?
    Thanks.

    DONE THROUGH USER EXIT

  • 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

  • To call subscreen in another screen

    hi
    How to call a subscreen if i check certain checkbox.please help

    Hi,
    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.
    CALL SUBSCREEN subscreen_area INCLUDING program screen_number.
    A similar call should also exist in PAI of screen.It will also call the PAI modules of the subscreen and will transfer data from subscreen to ABAP program.
    CALL SUBSCREEN subscreen_area.
    open T.code : ABAPDOCU
    path:BC ABAP Prg ->ABAP User dialog ->Screen ->Complex screen element - >Subscreen.
    You will get sample prg, Run it.You can get lot of sample prg in T.Code ABAPDOCU.
    Regards,
    Raj.

Maybe you are looking for

  • Using iCloud to backup contacts on my macbook pro

    I would like to back up the address book on my Macbook pro, which contains street addresses, phone numbers, etc. When I go to my iCloud account and check the contacts, however, the only contacts I find there are a random assortment of facebook addres

  • Extracting x,y co-ordinates of SDO_GEOMETRY into two variables say x1, ya

    Hi All, I am able to store the output SDO_GEOMETRY into a variable but i am facing difficulties in extracting ordinates in sdo_geometry to two independent variables say xa, ya. Kindly suggest some solution. The procedure is as follows: CREATE OR REPL

  • Problem with a SAP Query

    Hello all, I am working on an sap query and i am running the query for a date intreval say for the current month. But the query is picking the date from the infotype begindate and not the interval with which i am running. What might be the possible c

  • Dual booting in Windows and Linux, but only Linux has calendar, TB 31.0

    I'm dual booting using Linux Mint and Windows 7. I have TB 31.0 installed in each OS. TB in Linux has calendar capability; in Windows, there's nothing (by nothing, I mean no calendars - I can't see their properties, for instance, nor access them in a

  • API User Hook for Restricting Category Creation in a sepcific catalog

    Q: API User Hook for Restricting Category Creation in a sepcific catalog by a specific responsibility. I want to capture GO button process event? Hi All, Can anyone help me if anyone have used user hook for OLM? My requirement is to restrict course c