Tabstrip,table control

Can we design a table control inside a tabstrip.I have been learning the various options,but am not able to find the exact sequence of events for writing the code.
Please send me any zcode / pdf which could solve my doubt.

hi shena,
             I will send a sample code for creating a table control in tabstrip..check it once. i will send SE38, SE51 CODE.
SE38 CODE:
*& Module pool       YMODULEPOOL_TABCTRLTABSTRIP                       *
*& DEVELOPER    : KIRAN KUMAR.G                                        *
*& PURPOSE      : PLACING TABLE CONTROL IN TABSTRIPS                   *
*& CREATION DT  : 18/12/2007                                           *
*& T.CODE       : YMODTABCTRLTABS                                      *
*& REQUEST      : ERPK900035                                           *
PROGRAM  YMODULEPOOL_TABCTRLTABSTRIP.
Tables
tables : 
         yvbak,  "Sales Document: Header Data
         yvbap.  "Sales Document: Item Data
Controls
controls: my_tab    type tabstrip,  "For Tabstrips
          my_table  type tableview using screen 110.
Internal Table
*Item Data.
data: begin of gt_item occurs 0,
        vbeln like vbap-vbeln,
        posnr like vbap-posnr,
        matnr like vbap-matnr,
        matkl like vbap-matkl,
        arktx like vbap-arktx,
        cflag, "Deletion Flag
      end of gt_item.
*Header Data
data: begin of gt_head occurs 0,
        vbeln like vbak-vbeln,
        erdat like vbak-erdat,
        auart like vbak-auart,
        vkorg like vbak-vkorg,
        vtweg like vbak-vtweg,
        cflag,
      end of gt_head.
Global Variables
*Table Control(MY_TABLE)
data: gv_number  like sy-dynnr, "Screen Number
      gv_mode    type c value 'D',  "C:Change D:Display
      gv_temp    type i, "Temporary Variable
      gv_lines   type i. "NO.OF Records in the Table
*&      Module  STATUS_0100  OUTPUT
      text
module STATUS_0100 output.
  SET PF-STATUS 'ZTAB'.
endmodule.                 " STATUS_0100  OUTPUT
*&      Module  active_tab  OUTPUT
      text
module active_tab output.
*Default Active Tab Selection.
if my_tab-activetab is initial.
my_tab-activetab = 'INFO'.
gv_number        = '0110'.
endif.
endmodule.                 " active_tab  OUTPUT
*&      Module  copy_data1  OUTPUT
      text
module copy_data1 output.
*Read the data from the Internal Table and place them in Table control
read table gt_item index my_table-current_line.
if sy-subrc eq 0.
gt_item-vbeln = gt_item-vbeln.
gt_item-posnr = gt_item-posnr.
gt_item-matnr = gt_item-matnr.
gt_item-matkl = gt_item-matkl.
gt_item-arktx = gt_item-arktx.
endif.
endmodule.                 " copy_data1  OUTPUT
*&      Module  copy_dat  OUTPUT
      text
module copy_dat output.
refresh : gt_item.
select vbeln
       posnr
       matnr
       matkl
       arktx
  from yvbap
  into table gt_item
where vbeln = vbak-vbeln.
if sy-subrc eq 0.
describe table gt_item lines gv_lines.
my_table-lines = gv_lines + 20.
endif.
endmodule.                 " copy_dat  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
      text
module USER_COMMAND_0100 input.
case sy-ucomm.
when 'INFO'.
my_tab-activetab = 'INFO'.
gv_number = '0110'.
when 'EXIT' or 'CANCEL'.
call transaction 'SESSION_MANAGER'.
endcase.
endmodule.                 " USER_COMMAND_0100  INPUT
*&      Module  USER_COMMAND_0110  INPUT
      text
module USER_COMMAND_0110 input.
case sy-ucomm.
*Insert New Record
when 'INSE'.
*NO.OF Recors in the Internal Table
describe table gt_item lines gv_lines.
read table gt_item index my_table-current_line.
gv_temp = gv_temp + 1.
if gv_temp gt gv_lines.
*Insert Record into Internal Table
insert table gt_item.
*Insert Record into Database Table
insert into yvbap values gt_item.
endif.
*Save the Data
when 'SAVE'.
*Modify Data in the Internal Table
modify gt_item index my_table-current_line.
if sy-subrc eq 0.
*Modify Data in the Database Table
modify yvbap from table gt_item.
endif.
*Delete the Record
when 'DELE'.
if gt_item-cflag = 'X'.
*Delete the Record from the Database Table
delete from yvbap where vbeln = gt_item-vbeln
                    and posnr = gt_item-posnr
                    and matnr = gt_item-matnr
                    and matkl = gt_item-matkl
                    and arktx = gt_item-arktx.
*Delete the Record from the Internal Table
delete gt_item index my_table-current_line.
endif.
endcase.
endmodule.                 " USER_COMMAND_0110  INPUT
*&      Module  clear_data  OUTPUT
      text
module clear_data output.
*Clear the data when ever u enter into Table Control
clear gv_temp.
endmodule.                 " clear_data  OUTPUT
*&      Module  clear_data1  OUTPUT
      text
module clear_data1 output.
clear gv_temp1.
endmodule.                 " clear_data1  OUTPUT
SE51 CODE(SCREEN 100)
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*Initial TabStrip Selection
MODULE active_tab.
*Placing Table Control data in Internal Table
module copy_dat.
*Display Mode
*calling subscreen
call subscreen subs including sy-cprog gv_number.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
call subscreen subs.
SE51(SCREEN 110)
PROCESS BEFORE OUTPUT.
MODULE STATUS_0110.
loop at gt_item with control my_table cursor my_table-current_line.
module copy_data1.
endloop.
*CLEAR the Temporary variable value
module clear_data.
PROCESS AFTER INPUT.
*Populate data into internal Table
loop at gt_item.
MODULE USER_COMMAND_0110.
endloop.
Award points if helpful.
kiran kumar.G
              Have a Nice Day....

Similar Messages

  • Query for tabstrip & Table control

    Hi,
    I have never used tabstrip & Table controls.I have worked extensively on ALV  & Smartforms.I am finding it difficult to understand the steps now,after a long gap of returning to tabstrips & table control.I have all the standard programs for the same,Please send me any z development you have worked on to help me understand it better.
    Thanks

    Hi sneha,
                This is kiran kumar.G.(working on SAP).I will develop some of dialog progs on tab strips and table controls.
    i will send the se38 program logic and se51 flow logic.check it once.
    Note : some of the steps before u start on creating TABSTRIPS.
    1. FIRSR CREATE SE38 PROGRAM + SAVE +ACTIVATE.
    2.GOTO SE51 T.CODE and enter the SE38 PROGRAM NAME AND SCREEN NUMBER.(EX: 0100).
    3.THE FIRST SCREEN OF THE SE51 IS POPULATED AND SELECT NORMAL RADIO BUTTON AND GOAHEAD.
    4.GOTO LAYOUT AND SELECT THE TABSTRIP BUTTON FROM THE TOOLBAR AND PLACE THEM ON THE SCREEN
    5.IN THE BELOW EXAMPLE I WILL CREATE TWO TABSTRIPS..
    6.SELECT THE SUBSCREEN BUTTON FROM THE TOOLBAR AND PLACE THEM IN THE TAB1 SCREEN.AND SAME PROCEDURE IS REPEATED FOR TAB2 ALSO
    6.CLICK ON THE TAB1 BUTTON AND GIVE NAME AS "HEAD" AND SOME TEXT AND REFFILED AS "SUBS"
    7.FOLLOW THE SAME PROCEDURE FOR SECOND TABSTRIP AND GIVE NAME AS "ITEM" AND REFFILED AS "SUBS".
    AND SAVE AND ACTIVE..
    8.GOTO SE51 TRANSACTION AND GIVE REPORT NAME AND SCREEN NUMBER AS 0110. AND SELECT SUBSCREN RADIO BUTTON AND SELECT LAYOUT AND PLACE SOME FIELDS THERE AND AND SAME PROCUDRE IS REPEAT FOR 0120 SUB SCREEN ALSO
    Code:
    *& Module pool       YMODULEPOOL_TABSTRIPS                             *
    *& DEVELOPER    : KIRAN KUMAR.G                                        *
    *& PURPOSE      : DEMO ON TABSTRIP CONTROLS                            *
    *& CREATION DT  : 18/12/2007                                           *
    *& T.CODE       : YMODTABSTRIP                                         *
    *& REQUEST      : ERPK900035                                           *
    PROGRAM  ymodulepool_tabstrips.
    Tables
    TABLES: vbak,
            vbap.
    Controls
    CONTROLS: my_tabstrip TYPE TABSTRIP..
    Global Variables
    DATA: gv_number LIKE sy-dynnr.
    *&      Module  active_tab  OUTPUT
          text
    MODULE active_tab OUTPUT.
    *Default Selection of the TABSTRIP
      IF my_tabstrip-activetab IS INITIAL.
        my_tabstrip-activetab = 'HEAD'.
        gv_number = '110'.
      ENDIF.
    ENDMODULE.                 " active_tab  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
    *Header Information
        WHEN 'HEAD'.
          SELECT SINGLE erdat
                        vkorg
                        vtweg
                   FROM vbak
                   INTO (vbak-erdat,vbak-vkorg,
                         vbak-vtweg)
                  WHERE  vbeln = vbak-vbeln.
          my_tabstrip-activetab = 'HEAD'.
          gv_number = '110'.
    *Item Information
        WHEN 'ITEM'.
          SELECT SINGLE matnr
                        matkl
                        ntgew
                  FROM vbap
                  INTO (vbap-matnr,vbap-matkl,vbap-ntgew)
                 WHERE vbeln = vbak-vbeln.
          my_tabstrip-activetab = 'ITEM'.
          gv_number              = '120'.
    *EXIT from the Program
        WHEN 'EXIT' OR 'CANCEL'.
          CALL TRANSACTION 'SESSION_MANAGER'.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
      SET PF-STATUS 'YTABSTRIP'.
    SET TITLEBAR 'xxx'.
    end module.
    SE51 (SCREEN 100 :CODE)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    module active_tab.
    call subscreen subs including sy-cprog gv_number.
    *call subscreen sub1 including sy-cprog gv_number.
    PROCESS AFTER INPUT.
    call subscreen subs.
    *call subscreen subs.
    MODULE USER_COMMAND_0100
    SCREEN 110:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0110.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0110.
    SCREEN 120:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0120.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0120.
    Award points if helpful.
    kiran kumar.G
                HAVE A NICE DAY....

  • What are the uses of table control and tabstrip control

    can anyone tell me the uses of table control and tabstrip control

    Hi,
    table control is more comfortable for customizing.scroll bars all possible in this.where as it is not possible in step loops.
    check this example.
    PROGRAM ZBHTCTRL.
    TABLES: LFA1, EKKO.
    DATA: OKCODE1 LIKE SY-UCOMM,
    OKCODE2 LIKE SY-UCOMM.
    CONTROLS TABC TYPE TABLEVIEW USING SCREEN 1001.
    DATA: BEGIN OF ITAB OCCURS 0,
    MANDT LIKE EKKO-MANDT,
    EBELN LIKE EKKO-EBELN,
    BSTYP LIKE EKKO-BSTYP,
    BSART LIKE EKKO-BSART,
    END OF ITAB.
    MODULE USER_COMMAND_1000 INPUT.
    CASE OKCODE1.
    WHEN 'BACK'.
    SET SCREEN 0.
    WHEN 'NEXT'.
    SET SCREEN 1001.
    SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE
    LIFNR = LFA1-LIFNR.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 INPUT
    MODULE MOVE_DATA OUTPUT.
    EKKO-MANDT = ITAB-MANDT.
    EKKO-EBELN = ITAB-EBELN.
    EKKO-BSTYP = ITAB-BSTYP.
    EKKO-BSART = ITAB-BSART.
    ENDMODULE. " MOVE_DATA OUTPUT
    MODULE USER_COMMAND_1001 INPUT.
    CASE OKCODE2.
    WHEN 'BACK'.
    SET SCREEN 1000.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_1001 OUTPUT
    MODULE STATUS_1001 OUTPUT.
    SET PF-STATUS 'MENU'.
    SET TITLEBAR 'TIT'.
    ENDMODULE. " STATUS_1001 OUTPUT
    MODULE STATUS_1000 OUTPUT.
    SET PF-STATUS 'DMENU'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_1000 OUTPUT
    FORM ON_CTMENU_FORM1 USING CMENU TYPE REF TO CL_CTMENU.
    CALL METHOD CMENU->LOAD_GUI_STATUS
    EXPORTING
    PROGRAM = ' ZBHTCTRL'
    STATUS = 'CMENU'
    MENU = CMENU.
    CALL METHOD CMENU->ADD_FUNCTION
    EXPORTING
    FCODE = 'RX'
    TEXT = 'RECIEVE'.
    ENDFORM.
    FLOW LOGIC:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1000.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1000.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1001.
    LOOP AT ITAB WITH CONTROL TABC CURSOR TABC-TOP_LINE.
    MODULE MOVE_DATA.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1001.
    LOOP AT ITAB.
    ENDLOOP.
    for more info check this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
    thanks
    Ashu.

  • Dynamic tabstrips and table control in custom infotype

    Dear Experts,
    I have a requirement to create a custom infotype using tabstrips and table control. The tabstripes should also be dynamically populated. For example we have infty 8(Basic pay) used table control and 24(Qualifications) for tabstripes.
    Could you please tell me how to do this. Please do the needful ASAP.
    Thanks,
    Chaitanya.
    Moderator message - Please don't just post your requirements and ask the forum to do your work for you...especially ASAP - Thread locked
    Edited by: Rob Burbank on Oct 7, 2009 4:16 PM

    Hi Partha,
    Pls check the threads:
    Best way to store a table control into an infotype
    Re: Custom Infotype with table control - Overview/List  Screen
    Dilek

  • Need to include Table Control in Tabstrip (which is present in selection sc

    Hi Friends,
    I have a tab strip in my selection screen. I need to include a Table control in one of the tab of the tab strip. Is it possible? If yes How to do that?
    Note: I cant use a module pool program.
    Regards,
    Sudheer

    Hi ,
        We can do that.
    You have created the Tab strips in Module Pool program.Select that tab Place the table control in your tabstrips.Assign the Table control name to the table control.
    In this program We have a field in selection screen When we submit the screen the tabstrip will come and using with in that we table controls.we filled that table controls.
    include zsalesordertop                          .    " global Data
    tables: zstr_vbak,zstr_vbap,zstr_vbep.
    data:ok_code type sy-ucomm,
         ok_cod type sy-ucomm,
         l_vbeln type vbak-vbeln,
         no_rows1 type i,
         no_rows2 type i,
         no_rows3 type i.
    data: itab1 type table of zstr_vbak,
          wa1 type  zstr_vbak,
          itab2 type table of zstr_vbap,
          wa2 type  zstr_vbap,
          itab3 type table of zstr_vbep,
          wa3 type  zstr_vbep.
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
      set pf-status 'BACK'.
    SET TITLEBAR 'xxx'.
      case ok_code.
        when 'BACK'.
          leave program.
      endcase.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  STATUS_0101  OUTPUT
          text
    module status_0101 output.
      set pf-status 'EXIT'.
    SET TITLEBAR 'xxx'.
      case ok_cod.
        when 'EXIT'.
          leave program.
        when 'TAB1'.
          tabstrip-activetab = 'TAB1'.
        when 'TAB2'.
          tabstrip-activetab = 'TAB2'.
        when 'TAB3'.
          tabstrip-activetab = 'TAB3'.
      endcase.
    endmodule.                 " STATUS_0101  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
      case ok_code.
        when 'SUBMIT'.
          if l_vbeln is not initial .
            select vbeln erdat erzet ernam angdt bnddt audat vbtyp trvog auart from vbak into table itab1 where vbeln = l_vbeln.
            if itab1 is not initial.
              select vbeln posnr matnr matwa pmatn charg matkl arktx pstyv posar from vbap into table itab2 for all entries in itab1 where vbeln = itab1-vbeln.
              select vbeln posnr etenr ettyp lfrel edatu ezeit vrkme from vbep into table  itab3 for  all entries in itab1 where vbeln = itab1-vbeln.
            else.
              message i000(000) with 'no data in item and schedule information table'.
            endif.
          else.
            message i000(000) with 'not allowed'.
          endif.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_1101  OUTPUT
          text
    module status_1101 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      describe  table itab1 lines no_rows1.
      tablecontrol1-lines = no_rows1.
    endmodule.                 " STATUS_1101  OUTPUT
    *&      Module  STATUS_2101  OUTPUT
          text
    module status_2101 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      describe  table itab2 lines no_rows2.
      tablecontrol2-lines = no_rows2.
    endmodule.                 " STATUS_2101  OUTPUT
    *&      Module  STATUS_3101  OUTPUT
          text
    module status_3101 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
      describe  table itab3 lines no_rows3.
      tablecontrol3-lines = no_rows3.
    endmodule.                 " STATUS_3101  OUTPUT
    *&      Module  FILL_TABLECONTROL1  OUTPUT
          text
    module fill_tablecontrol1 output.
      read table itab1 into zstr_vbak index tablecontrol1-current_line.
    endmodule.                 " FILL_TABLECONTROL1  OUTPUT
    *&      Module  FILL_TABLECONTROL2  OUTPUT
          text
    module fill_tablecontrol2 output.
      read table itab2 into zstr_vbap index tablecontrol2-current_line.
    endmodule.                 " FILL_TABLECONTROL2  OUTPUT
    *&      Module  FILL_TABLECONTROL3  OUTPUT
          text
    module fill_tablecontrol3 output.
      read table itab3 into zstr_vbep index tablecontrol3-current_line.
    endmodule.                 " FILL_TABLECONTROL3  OUTPUT
    Include zsalesordertop
    program  zmodule_pool_salesorder.
    controls tabstrip type tabstrip.
    controls tablecontrol1 type tableview  using screen '1101'.
    controls tablecontrol2 type tableview using screen '2101'.
    controls tablecontrol3 type tableview using screen '3101'.
    Sure this will help you.
    Please reward points if it helps to you.
    Thanks,
    Swapna.

  • In tabstrip control to display table control

    Hi,
    I want to to display a table control under tabstrip tab , How can i write the programm.
    if any one knows pls reply me.

    hi Sridevi,
    -->create sub screen with 100 with some screen number.
    -->Create Table control..
    --> append table control screen to Tab Strip.
    --------------------- . . . . > > > > see the example below
    Scenario:
    Screen 601 has a table control named CTRL_ANVSTED.
    The table should be filled with records from the table zanvstedm
    For this purpose you use an internal table called TBL_ANVSTED
    * Declare the table control
    CONTROLS CTRL_ANVSTED TYPE TABLEVIEW USING SCREEN 601.
    *Internal table used to hold data
    DATA: TBL_ANVSTED LIKE ZANVSTEDM OCCURS 100 WITH HEADER LINE,
    * Flag for initial reading
    Data:   FLAG_INITIAL TYPE I VALUE 0.
    PROCESS BEFORE OUTPUT.
    * Read data into the table control and the internal table
    * PF status etc.
      MODULE INITIALIZE_601.
    * Read data from table anvstedm into internal table tbl_anvsted.
      MODULE INIT_TBL_ANVSTED.
    * Fill control with data from ythe internal table
      LOOP WITH CONTROL CTRL_ANVSTED.
        MODULE FILL_CTRL_ANVSTED.
      ENDLOOP.
    MODULE INIT_TBL_ANVSTED  OUTPUT.
    * Read data from table anvstedm into internal table tbl_anvsted.
      IF FLAG_INITIAL = 0.
        FLAG_INITIAL = 1.
        SELECT * FROM ZANVSTEDM INTO TABLE TBL_ANVSTED.
      ENDIF.
    ENDMODULE.
    MODULE FILL_CTRL_ANVSTED OUTPUT.
    * Fill control with data from the internal table
         READ TABLE TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
         IF SY-SUBRC NE 0.
           EXIT FROM STEP-LOOP.
         ENDIF.
    ENDMODULE.
    PROCESS AFTER INPUT.
    * Write changes in table control to internal table
    LOOP WITH CONTROL CTRL_ANVSTED.
      MODULE CTRL_ANVSTED.
    ENDLOOP.
    MODULE CTRL_ANVSTED INPUT.
    * Write changes in table control to internal table
       MODIFY TBL_ANVSTED INDEX CTRL_ANVSTED-CURRENT_LINE.
    ENDMODULE.
    Regards,
    Prabhudas

  • Modpool Tabstrip control and Table control

    Hi All,
    pls mail me step by step procedure fo rmodule pool programming using Table control and Tabsrip.
    Thanks in Advance.

    hi,
    check the below links
    http://www.sapgenie.com/abap/example_code.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    check these links
    http://www.allsaplinks.com/dialog_programming.html
    http://sappoint.com/abap.html
    http://www.sap-img.com/abap.htm
    http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com.
    http://www.sap-img.com/abap/
    http://sap.mis.cmich.edu/sap-abap/abap09/
    http://www.sapbrain.com/TUTORIALS/default.html
    steploops
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c13454211d189710000e8322d00/content.htm
    http://sap.niraj.tripod.com/id28.html
    If you need further info on this shoot me a test mail to [email protected] i will farward the material to you
    If you find it useful mark the points
    Regards,
    Naveen

  • Validação de campos em um Table Control

    Boa tarde.
    Gostaria de pedir um auxilio .
    Tenho uma duvida, na seguinte situação. Estou construindo um programa de Module Pool
    Neste programa vai ter um tabstrip, para atualizar duas tabelas Z
    Na primeira u201CABAu201D, serão  inseridos os registros da tabela pai e na segunda u201CABAu201D, os registros da tabela
    Filho a relação será de 1 para N.
    Na tabela filho os campos  chaves serão um identificador próprio , mais o registro chave da tabela pai.
    Na segunda a aba para inserir os registros da tabela filho, terei que usar um table Control.
    O meu problema é que ao inserir os registros na tabela filho, terei que de forma automática preencher o campo que corresponde a chave da tabela pai. Ou seja o usuário na primeira u201Cabau201D digamos digite o código da tabela pai como 10 ao inserir na table Control um registro o campo correspondente a chave  da tabela pai devera ser preenchido com o valor 10 e não permitir ao usuário efetuar qualquer manutenção neste campo.
    Como eu faço isso???
    Alguém tem algum exemplo????
    Obrigado a todos

    Olá, bom dia!
    Este é um dessenvolvimento bem específico, talvez por isso ninguem lhe respondeu ainda. Voce já deu uma olhada na seção de Wiki, buscando algum código de exemplo?
    Vai alguns links que encontrei:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e?QuickLink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/sandbox/ModulePoolProgramming
    O primeiro link traz um exemplo de como torna um campo ineditavel via codigo. Espero que possa ajudar.
    Abraços,
    Rodrigo Paisante

  • Table control in report selection screen

    I have a selection screen with some fields. Now, below these fields, I need a table control in which i will have input parameters with 3 fields so that i can enter data in combinations and use the same while executing the report like an internal table.
    1. I should be able to save it as a Variants.
    2. I should be able to schedule a background job.
    I found similar notes but they dont help me save variants and with job schedules.
    Request your help in this regard.
    Regards
    Kasi

    Hi
    In the selection-screen u can generated a tabstrip:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 100.
    SELECTION-SCREEN END OF BLOCK MAX.
    So the system'll generate a tabstrip in the selection-screen, here it'll load only the screen 100.
    By screen painter u have to create a subscreen 100 where u insert your table control.
    Max

  • Table control in report program

    Hi all...
    Please help me to create a table control in my report program. my requirement is to enable the user to enter two fields (company code and cost center) on the selection screen. I wish to do this using table control..
    example codes will be extremely helpful..
    Thanks in advance..
    -Pranati.

    Hi,
    We can not do the Table control on the selection screen, but we can do the Tab strip control.
    To define a tabstrip area with tab pages, use the following statements in your selection screen definition:
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK <tab_area> FOR <n> LINES,
                      TAB (<len>) <tab1> USER-COMMAND <ucom1>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      TAB (<len>) <tab2> USER-COMMAND <ucom2>
                                  [DEFAULT [PROGRAM <prog>] SCREEN <scrn>],
                      END OF BLOCK <tab_area>.
    See the below SAP link for the sample programs
    http://help.sap.com/saphelp_46c/helpdata/EN/00/deb23789e95378e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    See the example code
    REPORT   znr1 NO STANDARD PAGE HEADING
                LINE-SIZE 80 LINE-COUNT 60.
    TABLES : sscrfields.
    DATA  activetab(6) TYPE c .
    DATA  mat_des TYPE makt-maktx.
    DATA  pl_des  TYPE t001w-name1 .
    SELECTION-SCREEN BEGIN OF SCREEN 001 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-002 NO
    INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-002 FOR FIELD matnr.
    PARAMETERS matnr TYPE mara-matnr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN END OF SCREEN 001.
    SELECTION-SCREEN BEGIN OF SCREEN 002 AS SUBSCREEN NO INTERVALS.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-003 NO
    INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 14(18) text-003 FOR FIELD matnr.
    PARAMETERS werks TYPE t001w-werks.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block2.
    SELECTION-SCREEN END OF SCREEN 002.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 5 LINES NO INTERVALS.
    SELECTION-SCREEN TAB (15) tabs1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (15) tabs2 USER-COMMAND ucomm2.
    *                     DEFAULT SCREEN 002   .
    SELECTION-SCREEN END OF BLOCK tabb1.
    INITIALIZATION.
      tabs1 = text-002.
      tabs2 = text-003.
      activetab = 'TABS1'.
    AT SELECTION-SCREEN .
      CASE sscrfields-ucomm.
        WHEN 'UCOMM1'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 001.
          tabb1-activetab = 'TABS1'.
          activetab = 'TABS1' .
        WHEN 'UCOMM2'.
          tabb1-prog = sy-repid.
          tabb1-dynnr   = 002.
          tabb1-activetab = 'TABS2'.
          activetab = 'TABS2'.
      ENDCASE.
    START-OF-SELECTION.
      CASE activetab.
        WHEN 'TABS1'.
          SELECT SINGLE maktx  FROM makt INTO pl_des WHERE matnr = matnr.
          WRITE: 'Material ' , matnr , mat_des .
        WHEN 'TABS2'.
          SELECT SINGLE name1  FROM t001w INTO pl_des WHERE werks = werks.
          WRITE: 'Plant ' , werks ,pl_des.
    Regards
    Sudheer

  • How to include "position"-control in a table control

    Dear all,
    I have a situation where I need to add a new option in the table control screen I have been developing .
    I need to be able to select one field entry and bring it on top of the display in the table.
    How can I acomplish this!?
    please help!!
    Vj

    Hi..
    try like this....
    u have tabstrip...to select...one row..right...
    now place a pushbutton on the screen when click on this..
    with the function code...write CASE: and then..
    ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
        IF <MARK_FIELD> = 'X'.
          W_INDEX = SYST-TABIX.
    and read <itab> with key <MARK_FIELD> = 'X'.
    now copy that into another work area and then delete it from the itab..
    now insert it in top in the itab..and then continue....
    check the following code...
    *&      Module  USER_COMMAND_0999  INPUT
          text
    MODULE USER_COMMAND_0999 INPUT.
      DATA:
        H_TAB_WA LIKE G_TAB_WA.
      CASE W_UCOMM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'TAB_MODI' OR 'SAVE'.
          LOOP AT G_TAB_ITAB INTO G_TAB_WA.
          FORMAT   INPUT OFF.
            MOVE-CORRESPONDING G_TAB_WA TO YH642_RAM.
            READ TABLE H_TAB_ITAB WITH KEY EID = G_TAB_WA-EID INTO H_TAB_WA.
            IF SY-SUBRC EQ 0.
              IF G_TAB_WA NE H_TAB_WA.
                MODIFY YH642_RAM.
              ENDIF.
            ELSE.
              INSERT  YH642_RAM.
            ENDIF.
          ENDLOOP.
    SORT  G_TAB_ITAB.
      ENDCASE.

  • Query about screen as a structure used in table control.

    hi all,
    plz explain the fields in screen(structure).
    when and how it is used.
    specialy i/o, o/p,active,
    plz give example.

    hi,
    The screen elements text field, input/output field, status icon, group box, radio button, checkbox, and
    pushbutton all have general attributes, Dictionary attributes, program attributes, and display attributes.
    The elements subscreen, tabstrip control, and table control have general attributes, and special
    attributes relating to the respective type.
    We can divide the attributes of an element into:
    Statically definable attributes that cannot be changed dynamically
    Statically definable attributes that can be changed dynamically
    Attributes that can only be changed dynamically
    At the beginning of the PBO, the runtime system reads the statically-created and dynamically-modifiable
    attributes of each screen element on the current screen into a system table with the line type SCREEN.
    Dynamic changes to the attributes of screen elements are temporary.
    Using this technique to modify the attributes of a screen element (for example, to change whether an
    input/output field is ready for input), you can replace long sequences of separate screens, which are
    more costly in terms of both programming time and runtime.
    The system table with line type SCREEN will be called SCREEN system table in the following unit.
    When a screen is processed, the SCREEN system table contains an entry for each element created in
    the Screen Painter for that screen.
    The system table SCREEN is initialized at the start of the PBO event for the current screen. To do this, a
    system program copies the statically defined attributes of the individual screen elements into the table.
    You can then change the dynamically-modifiable attributes of the elements on the screen in a module at
    PBO using the following statements: LOOP AT SCREEN.
    MODIFY SCREEN.
    ENDLOOP.
    To do this, you use the structure SCREEN, which is created automatically by the system, and filled with
    the values of each successive line of the system table in the loop. Set attributes have the value '1',
    attributes that are not set have the value '0'. To change the system table, use MODIFY SCREEN. within
    the loop.
    To find the element whose attributes you want to modify, you can use a LOOP on the SCREEN table,
    and query one of the following fields: SCREEN-NAME, SCREEN-GROUP1 to SCREEN-GROUP4.
    You can change the attributes of several screen elements simultaneously at runtime, by including them
    in a modification group in the Screen Painter. Assign all elements that will be changed within a single
    processing step to a group in the Screen Painter.
    To do this, enter a group name for each of the relevant elements in one of the fields GROUP1 …
    GROUP4.
    You can include each element in up to four modification groups. You can choose any three-character
    sequence for the group name. You can assign elements to a modification group either in the element list
    or the layout editor in Screen Painter.
    You must program your screen modifications in a module that is processed during the PROCESS
    BEFORE OUTPUT processing block.
    You use a loop through the table SCREEN to change the attributes of an element or a group of
    elements. (LOOP AT SCREEN WHERE . . . and READ TABLE SCREEN are not supported).
    To activate and deactivate attributes, assign the value 1 (active) or 0 (inactive), and save your changes
    using the MODIFY SCREEN statement.
    Note that elements you have defined statically in the Screen Painter as invisible cannot be reactivated
    with SCREEN-ACTIVE = 1. Instead, use the statement SCREEN-INVISIBLE = 0. However, elements
    that you have statically defined as visible in the Screen Painter can dynamically be made invisible. This
    has the same effect as the three statements SCREEN-INVISIBLE = 1, SCREEN-INPUT = 0, SCREENOUTPUT
    = 0.
    There are three steps involved in displaying buffered data from the internal table in the table control:
    The system loops through the lines of the table control on the screen. The lines of the screen table are
    processed one by one. For each line, the system carries out the following steps:
    The current line of the internal table is placed in the work area of the internal table. (Note that it is
    possible to scroll in the table on the screen).
    The data from the work area of the internal table is copied into the relevant line of the table control.
    When you use table controls on a screen, the automatic field transport sequence changes.
    In the PBO processing block, data is transferred from the ABAP program to the screen after each loop
    pass in the flow logic. The rest of the screen fields are filled, as normal, at the end of the PBO.
    In the flow logic, the loop statement
    LOOP AT <itab> INTO <wa_itab> WITH CONTROL <tc_name>
    starts a loop through the screen table, and reads the line of the internal table corresponding to the
    current line of the screen table, placing it in <wa_itab>.
    <itab> is the name of the internal table containing the data, <wa_itab> is the name of the work area for
    the internal table, and <tc_name> is the name of the table control on the screen.
    If the fields in your table control have the same structure and name as those in the work area <wa_itab>,
    the system can transport data between the ABAP program and the screen automatically (step 3).
    If you are not using the same structure for the table control fields and the work area of the internal table,
    you must call a module between LOOP and ENDLOOP that moves the data from the work area
    <wa_itab> into the screen fields (MOVE-CORRESPONDING <wa_itab> TO …) .
    The system calculates the value of <ctrl>-TOP_LINE when you scroll, but not when you scroll a page at
    a time outside the table control.
    In order to transfer changed values from the table control back to the internal table the following three
    steps must be carried out:
    The system loops through the lines of the table control. The lines of the screen table are processed
    one by one. For each line, the system carries out the following steps:
    The data from the current line of the table control is copied into the header line of the internal table.
    The data in the work area must then be placed in the line of the internal table corresponding to the
    line of the table control that is being processed. (Note that it is possible to scroll in the table on the
    screen).
    In the PAI processing block, all screen fields that do not belong to a table control and that are not listed
    in a FIELD statement are transported back to the work fields in the ABAP program first.
    The contents of the table control are transported line-by-line to the corresponding work area in the ABAP
    program in the appropriate loop.
    As usual, the fields that occur in FIELD statements are transported directly before that statement.
    The structure of the screen tables contain.
    NAME
    GROUP 1
    GROUP 2
    GROUP 3
    GROUP 4
    OUTPUT
    REQUIRED
    LENGTH
    INTENSIFIED
    INVISIBLE
    ACTIVE
    Hope this helps, Do reward.
    Edited by: Runal Singh on Mar 13, 2008 10:41 AM

  • Table control and a selection screen

    Hi,
    I have a requirement where I am supposed to be designing a screen that has a table control with fields
    w/selection column       label 1(non-editable)          i/o field(from)        i/o field(to)
    w/selection column       label 2(non-editable)          i/o field(from)        i/o field(to)
    On searching the forum threads, I found related threads as to how to implement a selection screen (as the I/O fields are similar to select-options) in module pool programming. But mine requires the use of table control and a kind of selection screen embedded into it. Please guide me through this requirement.

    Hi
    If you need to implement a table control on selection screen u need to use a tabstrip as graphic element supports the table control.
    So
    1 - Step: define a tabstrip with 1 tab only:
    SELECTION-SCREEN BEGIN OF BLOCK 3.
    SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.
    SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1
             DEFAULT SCREEN 100.
    SELECTION-SCREEN END OF BLOCK MAX.
    SELECTION-SCREEN END OF BLOCK 3.
    2 - Step design the subscreen (in my sample the dynrpo 100) and insert the table control there:
    PROCESS BEFORE OUTPUT.
      MODULE INIT_CTRL.
      LOOP WITH CONTROL T_CTRL.
        MODULE DISPLAY_DATA.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL T_CTRL.
          MODULE UPDATE_DATA.
      ENDLOOP.
    In the module DISPLAY_DATA and UPDATE_DATA u need to implement the code to transfer the data from internal table to table control and from table control to internal table, in order to display and update the data.
    Max

  • New fields to MM01 Table Control

    Hi All,
    My requirement is to add the LAENG (Length), BREIT(Width) and HOEHE(Height) fields to the table control in AFS Weights and Volumes TabStrip of MM01 Transaction and we need to update these values in /AFS/MARM table. This is an AFS System.
    I have copied the Function Group J3AB to ZJ3AB and modified the sub screen 2501. I am to see my custom sub screen. But when I change the data in the table control the data is not getting saved in the /AFS/MARM table.
    There is an internal table XJ_3AMARM which holds the table control data. This table is declared as the global field in the function group. It is getting populated in the PAI of my custom screen. But when the control goes to SAP standard function group the data is getting refreshed and data is not getting updated.
    Please suggest me in updating the data.
    Thanks & Regards,
    Prasad.

    Hi,
    Add a field in the internal table structure of editor program.
    and select the data into it.
    Go to screen painter and go to layout, add your new field by selecting   dictionary field or internal table field. If you select the dictionary field , then you have to assign it to a value in the PBO module.
    PBO.
    module assign.
    in se38
    module assign output.
    dictionary-field = internal table field.
    endmodule.
    regards,
    kamala.

  • Table control in Selection Screen

    Hi,
      Is it possible to keep table control and tabstrip control in selection screen without using dialog programming? I mean , using coding from program itself, have to get table in the selection screen,like how we are keeping checkbox and radio button from program itself . 
    by
    Mohan Ram
    Moderator Message: Search before posting.
    Edited by: kishan P on Sep 16, 2010 11:04 AM

    Hi, Mohan
    Please Always do a little Search Before Posting => [Search Results|http://forums.sdn.sap.com/search.jspa?threadID=&q=TablecontrolinSelectionScreen&objID=&dateRange=all&numResults=30&rankBy=10001]
    Hope you will get the answer from the First Few Threads From Search Result.
    Thanks and Regards,
    Faisal

Maybe you are looking for

  • OBIEE 11g- unable to start application server

    Dear All, I have recently installed OBIEE 11g 11.1.1.6.0 for the first time (enterprise install) am able to login to anaytics page and create reports, but Iam not able to connect to enterprise manger , console. Going through various posts, i came to

  • Images on web page not clear

    Just got a MacBook Air, running 10.7.3 and noticing that on many web sites (firefox and safari are the same), the images just are not clear. They are a bit fuzzy, and some have some sort of weird border around them. I have attached a screen shot of t

  • IPhone say connect to iTunes, but neither iTunes or my computer recognize my iPhone now. What can I do?

    I tried updating my iPhone. Then at the end of the update, iTunes said it couldn't update my iOS because I didn't have the most up to date iTunes. Now my iPhone just says connect to iTunes, but neither iTunes or my computer recognize my iPhone now. W

  • IPhone4 photos are blank squares on MBP in iPhoto.

    This has been happening randomly for the past month and I cannot seem to find any solution. I have not changed any settings and I cannot find help via this site. Sometimes the device shows up as 'Apple iPhone', sometimes as my name, sometimes as BOTH

  • Edge Animate to Air

    Can I compile an Edge Animate project to Adobe Air. Any page or info pointing to this possibility? Att., Edwin Merced