How to insert tabstrip control in module pool screen painter

Hi all!
plz tell e how to use tabstrip control in module pool screen painter.Also plz give me an example program using tabstrip control.

To insert tabstrip just open layout of screen and press on the tabstrip button there .
Use this souce code further to activate it .
CONTROLS tabstrip TYPE TABSTRIP.
DATA: okcode TYPE sy-ucomm,
dynnr TYPE sy-dynnr,
flag type flag,
active like tabstrip-activetab .
call SCREEN 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
data: lv_okcode type syucomm.
lv_okcode = okcode.
clear okcode.
case lv_okcode.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
WHEN 'TAB4'.
dynnr = '0140'.
WHEN 'TAB5'.
"check authorization, if authorization fails
flag = 'X'. "set the global flag
active = 'TAB1'. "store active tab in global variable
dynnr = '0110'. "set the screen number
WHEN 'BACK' or 'EXIT'.
leave program.
ENDCASE.
IF lv_okcode(3) = 'TAB'.
tabstrip-activetab = lv_okcode.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
IF tabstrip-activetab IS INITIAL OR
dynnr IS INITIAL.
tabstrip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
"set the activetab explicilty here
if flag eq 'X'. "from authorization failure
tabstrip-activetab = active. "'TAB1'
clear flag.
endif.
ENDMODULE. " STATUS_0100 OUTPUT

Similar Messages

  • How to create subscreens in tabstrip control using  module pool

    hai experts,
    can u plz give me step by step procedure to create subscreens in tabstrip control using  module pool,

    hi,
    You can check this program
    <b>  DEMO_DYNPRO_TABSTRIP_LOCAL </b>
    This will help you in understanding the concept and how to create subscreens.
    Regards
    Nishant

  • How to save Custom control records module pool program ?

    Hi guru ,
    1. How to save Custom control records module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi Subasha,
    Please check the format below since it is based on a working code
    **************data declarations
    TYPES: BEGIN OF TY_EDITOR,
    EDIT(254) TYPE C,
    END OF TY_EDITOR.
    data: int_line type table of tline with header line.
    data: gw_thead like thead.
    data: int_table type standard table of ty_editor.
    You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
    For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
    ****************fill header..from SO10( t-code )
    GW_THEAD-TDNAME = loc_nam. " unique key for the text
    GW_THEAD-TDID = 'ST'. " Text ID
    GW_THEAD-TDSPRAS = SY-LANGU.
    GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
    *Read Container and get data to int_table
    CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
    IMPORTING
    TABLE = int_table
    EXCEPTIONS
    ERROR_DP = 1
    ERROR_CNTL_CALL_METHOD = 2
    ERROR_DP_CREATE = 3
    POTENTIAL_DATA_LOSS = 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.
    loop data from int_table and save to int_line-tdline appending it.
    *save the text
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    HEADER = GW_THEAD
    TABLES
    LINES = InT_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
    Please check and revert,
    Reward if helpful
    Regards
    Byju

  • How to creat select-option on module pool screen???

    Hi All,
       please tell me how to creat select-option on module pool screen???
    Regards
    Deepak

    Hi Deepak Kumar Sharma,
    There are Two ways to achieve it...
    1) How to create a select-options in a module pool screen.
    Method 1
    a) Create a subscreen area in your screen layout where you want to create the select options.
    b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    select-options s_matnr for mara-matnr.
    SELECTION-SCREEN END OF SCREEN.
    c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
    CALL SUBCREEN sub_area INCLUDING <program> <screen>
    This call subscreen statement is necessary for transport of values between screen and program.
    Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
    Method 2
    a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
    struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
    struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
    CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
    EXPORTING
    TITLE = ' '
    text = g_titl1 " 'Customers'
    tab_and_field = struc_tab_and_field
    TABLES
    RANGE = rng_kunnr
    EXCEPTIONS
    NO_RANGE_TAB = 1
    CANCELLED = 2
    INTERNAL_ERROR = 3
    INVALID_FIELDNAME = 4
    OTHERS = 5.
    IF NOT rng_kunnr[] IS INITIAL.
    Read the very first entry of the range table and pass it to
    dynpro screen field
    READ TABLE rng_kunnr INDEX 1.
    IF sy-subrc = 0.
    g_cust = rng_kunnr-low.
    ENDIF.
    You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
    Also have a look on below threads
    how to make select option in module pool
    select option in module pool program
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • How to retain leading zeros in module pool screen

    Hi experts,
    I have a ztable field of type NUMC4 being displayed on a module pool screen, the value in the field is '0001', but on the screen it displays value as '1' (without leading zeros), When I save the record, Even in the databse it stores as '1'.
    But I have checked in debugging the field always contains '0001' in the program execution and I have also used 'CONVERSION_EXIT_ALPHA_INPUT' in the PBO but no use.
    Pls suggest.
    Thanks,
    Deepak

    Check the screen attributes for the field. There is an option to show leading zeroes.
    edit.
    And how did you see it was stored a 1 and not 0001? Using SE16N? Mind you: with SE16N conversion-exits are executed automatically thus showing 0001 as 1.
    To make sure: double click on the record in SE16N and look if it's still 1 and not 0001.

  • How to create select-options on module pool screen

    Hi all
    I want get a range of values from the user from the module pool screen.
    Is there any element available on module pool screen like select options on the selection screen of reports.
    reply me ASAS.
    Thanks.

    hi krishna
    actually I want to display the details of PO numbers from 45000100 to 45000150. user will enter this range on the module pool screen just as we enter on the selection screen of report. My question is do we have a button like select-option on the module pool screen.
    Plz . reply me ASAP.
    Thanks.

  • How can one save variants for module pool screens.

    hai all,
         i have done a module pool screen for taking information from user..later i leave to list processor and give a report to the user.
      i am testing the program with many input parameters.i don't want to enter the values each time i execute the program.can i not save a variant like i save for normal abap editor programs?
    any other solution ?

    Hii..
    Variants can be created in Selection Screen only...
    For ur Scenario:
    To leave to the list use the Statements
    <b>LEAVE TO LIST-PROCESSING And return .</b>
    then the Data will be automatically retained.
    <b>Reward if Helpful</b>

  • Dynamic table control in module pool screen

    Hi  All
            I have got a requirement that in the module pool program i need to create a table control which is going to be dynamic i.e number of columns to be displayed in the screen is going to vary based on the one of the table entries. for example the requirement is as follows.
    I wanted to displaye list of bikes available in different states.
    State     Bike1    Bike2      Bike3
    AP           2             3           1
    MP            4            6            7
    Currently i have only 3 three types of bike, this may increase to 7 by next year or decrease and this functionality I require dynamically, Can you help on the same?
    Thanks
    Giri

    You can do it,
    Just try the code,...
    if you have requirement like to make changes in the same screen itself,
    then follow the same thing in PAI Module
    In PBO...
    PROCESS BEFORE OUTPUT.
    MODULE STATUS.
    LOOP WITH CONTROL TABCTRL.
    MODULE MODIFY_100.
    ENDLOOP.
    MODULE MODIFY_100 OUTPUT.
    DATA wa_tabctrl TYPE cxtab_column .
    LOOP AT TABCTRL-COLS INTO WA_TABCTRL.
          IF WA_TABCTRL-NAME =  'BIKE3'.                   
            WA_TABCTRL-SCREEN-INVISIBLE =  '1'.
            MODIFY TABCTRL-COLS FROM WA_TABCTRL.
          ENDIF.
    ENDLOOP.
    ENDMODULE.

  • Regarding Module Pool Screen Painter

    Dear All,
    Hi all. When i am using 4.7 i am able to see all the icons like check box .radio buttons,push buttons ,table control and all . There i can drag  and drop on the screen easily . I can see this all icons on the left side in the screen painter.  In ecc  i tried to create a module pool program. In that screen painter i am not able to see these icons in that screen .
    When i am clicking on layout on initial screen it is showing ''''EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' '''' . That is also in text format with some lines and all.  I was totally struck here . Please help me in  this .
    Regards,
    Madhu.

    How can you solve the problem ? Please explain it.

  • Tabstrip control in Module pool program

    Hi All
    I am creating a Tab strip control in SE51 ( M - Type program ). In my screen i have 3 tabs . I want the second tab to be default tab in my screen . How to to work on this scenario.
      If i get a sample program it will be easy for me.

    Just go through this code.
    Here just check the bold fonts give the function code of the second tab here which is shown at initialization of the screen. Use the screen active field also.
    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.
    Thanks,
    Sakthi

  • How to use table control in module pool programming

    Hi
    I want to use a table control to fetch some data from mara table.
    Please guide me with the procedure and the steps which I can follow to complete my program correctly.
    thanks
    Lalit Gupta

    As [vinraaj|http://forums.sdn.sap.com/profile.jspa?userID=3968041] wrote, call transaction SE51, there is a Wizard to help you generate the table control, it will create the table control and some includes with PBO/PAI modules > Read [Using the Table Control Wizard|http://help.sap.com/saphelp_bw/helpdata/en/6d/150d67da1011d3963800a0c94260a5/frameset.htm]
    Also there is a tutorial in the wiki, read [Learn Making First Table Control |http://wiki.sdn.sap.com/wiki/display/ABAP/LearnMakingFirstTableControl] by [Krishna Chauhan|http://wiki.sdn.sap.com/wiki/display/~nc0euof]
    Regards,
    Raymond

  • How to add TAB functionality in module pool screen

    Hi,
    I have created a screen with two fields(input/output).My requirement is generally cursor is in the first field when user pressed TAB key then cursor has to move to second field.How can i fulfil this requirment.
    Thanks,
    shyla

    Hi,
    If u have created your input filed (Input/Output-Se51) field in screen layout then it will automatically jump to next input field when u press enter.
    Chk it out.

  • How to call program in the Module pool screen

    hi ,
    i am having 2 screen when we press enter in first screen we will go to second screen in second screen i want to call a standard ALV program but second screen is already having some fields i want tthis report in down part of the screen
    please help me for that
    Edited by: ankita12345 on Nov 19, 2009 12:27 PM

    Hi,
    Its your choice. If you want a ALV display, then create a custom container and display data like this
    DATA: custom_container1 TYPE REF TO cl_gui_custom_container.
    IF custom_container1 IS INITIAL.
          CREATE OBJECT custom_container1
            EXPORTING
              container_name              = 'CUST_CONT1'
            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 grid1
            EXPORTING
              i_parent          = custom_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 grid1->set_table_for_first_display
            CHANGING
              it_outtab                     = t_itemdetails[]
              it_fieldcatalog               = t_itemfc
            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.
        ENDIF.
    If you want to have a table control, then you can do so. Search the SDN, you will find loads for your reference.

  • Getting select options in module pool screen

    hi experts,
    can any one suggest me how to provide select options in module pool screen.
    thank you,
    regards
    vijay

    Hi,
    Take two fields on screen first for low value and other for high value (say vbeln_low and vbeln_high) also design a button next to the high textbox for select-option button used to display popup.
    Using these two input fields append a range (say r_vbeln for vbap-vbeln) for the field to be used (either in query or anywhere).
    ranges : r_vbeln for vbap-vbeln.
      IF NOT vbeln_high IS INITIAL.
        IF NOT vbeln_low LE vbeln_high.
          MESSAGE e899 WITH text-007. "high value is smaller than low value
        ENDIF.
      ENDIF.
      r_vbeln-sign = 'I'.
      r_vbeln-low = vbeln_low.
      IF vbeln_high IS INITIAL.
        r_vbeln-option = 'EQ'. "if user takes only a singlr value
      ELSE.
        r_vbeln-option = 'BT'. "if user takes both low & high value
        r_vbeln-high = vbeln_high.
      ENDIF.
      APPEND r_vbeln. "append range
      CLEAR r_vbeln.
    On the button click call this FM to call a popup for select-options.
    DATA : tab TYPE rstabfield.
    tab-tablename = 'VBAP'.
    tab-fieldname = 'VBELN'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
       EXPORTING
         title                   = text-002
         text                    = ' '
         signed                  = 'X'
    *         lower_case              = ' '
    *         no_interval_check       = ' '
    *         just_display            = ' '
    *         just_incl               = ' '
    *         excluded_options        =
    *         description             =
    *         help_field              =
    *         search_help             =
         tab_and_field           = tab
        TABLES
          range                   = r_vbeln
       EXCEPTIONS
         no_range_tab            = 1
         cancelled               = 2
         internal_error          = 3
         invalid_fieldname       = 4
         OTHERS                  = 5.
      IF sy-subrc EQ 2.
        MESSAGE s899 WITH text-003. "no value selected
      ELSEIF sy-subrc <> 0 AND sy-subrc <> 2.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    This whole code will append your range r_vbeln to be used in program.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Select Option on Module Pool screen

    How to display select options on Module Pool screen ?

    Via the search functionality, you will find something like :
    SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
    SELECT-OPTIONS: S_CARRID FOR SPFLI-CARRID,
                    S_CONNID FOR SPFLI-CONNID.
    SELECTION-SCREEN END OF SCREEN 101.
    and to use a CALL SELECTION-SCREEN xxxx in your module pool.
    regards,
    Hans

Maybe you are looking for