Data in Table Control vanishes after report execution

Hi,
I have created a report program with a table control on its selection screen (on a subscreen).
The report executes perfectly, but, after the report execution, once the control comes back to the selection screen, the data entered in the table control gets cleared.
Please let me know how can I retain the data entered in the table control even after the report execution.
Regards,
David.

Hello,
When control comes back to selection screen. PBO event executes and possibly internal table has got cleared somewhere before that.
Debug you code to find the exact problem line. You can also add watchpoint for internal table with value initial. So code will break in debug mode whenever internal table is cleared.
Hope this helps!
Thanks,
Augustin.

Similar Messages

  • How to Populate Internal table data to Table Control in a Report Program

    Dear All,
           How to Populate Internal table data to Table Control in a Report Program? It is a pure report program with out any Module pool coding involved, which is just used to display data. Till now it is being displayed in a report. Now the user wants the data to be displayed in a table control. Could someone tell me how to go about with this.
    Thanks in Advance,
    Joseph Reddy

    If you want to use a table control, you will need to create a screen.
    In your report....
    start-of-selection.
    perform get_data.  " Get all your data here
    call screen 100. " Now present to the user.
    Double click on the "100" in your call screen statement.  This will forward navigate you to the screen.  If you have not created it yet, it will ask you if you want to create it, say yes.  Go into screen painter or layout of the screen.  Use the table control wizard to help you along the process.  It will write the code for you.  Since it is an output only table control, it will be really easy with not a lot of code. 
    A better way to present the data to the user would be to give it in a ALV grid.  If you want to go that way, it is a lot easier.  Here is a sample of the ALV function module.  You don't even have to create a screen.
    report zrich_0004
           no standard page heading.
    type-pools slis.
    data: fieldcat type slis_t_fieldcat_alv.
    data: begin of imara occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of imara.
    * Selection Screen
    selection-screen begin of block b1 with frame title text-001 .
    select-options: s_matnr for imara-matnr .
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      perform write_report.
    *  Get_Data
    form get_data.
      select  mara~matnr makt~maktx
                into corresponding fields of table imara
                  from mara
                   inner join makt
                     on mara~matnr = makt~matnr
                        where mara~matnr in s_matnr
                          and makt~spras = sy-langu.
    endform.
    *  WRITE_REPORT
    form write_report.
      perform build_field_catalog.
    * CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                it_fieldcat = fieldcat
           tables
                t_outtab    = imara.
    endform.
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      data: fc_tmp type slis_t_fieldcat_alv with header line.
      clear: fieldcat. refresh: fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Number'.
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material'.
      fc_tmp-fieldname  = 'MAKTX'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '40'.
      fc_tmp-col_pos    = 3.
      append fc_tmp to fieldcat.
    endform.
    Regards,
    Rich Heilman

  • Getting data from table control to the report program.

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi,
    in your table control you give some name to that table control say it_cntrl.
    this only serves as the internal table to process the table control data.
    like u can write like this.
    loop at it_cntrl into wa_cntrl.   "wa_cntrl is work area of type it_cntrl table type
    .........        "do your functining
    end loop.
    any clarification get in touch
    thnks

  • How to populate data in table control  .

    hi all,
    i put matnr no. in screen no. 103
    validation is done at that screen only.
    now when i want to modify dat record
    when i put matnr no. at screen 103
    so how i will get all  data of dat number to table control screen.

    Hi Darshan,
       Here is a detailed description of how to update data in table controll.
      Updating data in table control
    The ABAP language provides two mechanisms for loading the table control with data from the internal table and then storing the altered rows of the table control back to the internal table.
    Method 1: Read the internal table into the Table Control in the screenu2019s flow logic.  Used when the names of the Table Control fields are based on fields of the internal table.
    Method 2: Read the internal table into the Table Control in the module pool code. Used when the names of the Table Control fields are based on fields of the database table.
    Method 1 (table control fields = itab fields)
    In the flow logic we can read an internal table using the LOOP statement. Define the reference to the relevant able control by specifying WITH CONTROL <ctrl>
    Determine which table entry is to be read by specifying CURSOR <ctrl>-CURRENT_LINE.
    After the read operation the field contents are placed in the header line of the internal table. If the fields in the table control have the same name as the internal they will be filled automatically. Otherwise we need to write a module to transfer the internal table fields to the screen fields.
    We must reflect any changes the user makes to the fields of the table control in the internal table otherwise they will not appear when the screen is redisplayed after PBO processing, (eg, after the user presses Enter or scrolls) However, this processing should be performed only if changes have actually been made to the screen fields of the table control (hence the use of the ON REQUEST)
    PROCESS BEFORE OUTPUT.
    LOOP AT ITAB_REG WITH CONTROL TCREG
    CURSOR TCREG-CURRENT_LINE.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT ITAB_REG.
    MODULE MODIFY_ITAB_REG.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Method 2 (table control fields = dict. fields)
    If using a LOOP statement without an internal table in the flow logic, we must read the data in a PBO module which is called each time the loop is processed.
    Since, in this case, the system cannot determine the number of internal table entries itself, we must use the EXIT FROM STEP-LOOP statement to ensure that no blank lines are displayed in the table control if there are no more corresponding entries in the internal table.
    PROCESS BEFORE OUTPUT.
    LOOP WITH CONTROL TCREG.
    MODULE READ_ITAB_REG.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL TCREG.
    CHAIN.
    FIELD: ITAB_REG-REG,
    ITAB_REG-DESC.
    MODULE MODIFY_ITAB_REG
    ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE READ_ITAB_REG OUTPUT.
    READ TABLE ITAB_REG INDEX TCREG-CURRENT_LINE.
    IF SY-SUBRC EQ 0.
    MOVE-CORRESPONDING ITAB_REREG TO TCREG.
    ELSE.
    EXIT FROM STEP-LOOP.
    ENDIF.
    ENDMODULE.
    MODULE MODIFY_ITAB_REG INPUT.
    MOVE-CORRESPONDING TCREG TO ITAB_REG.
    MODIFY ITAB_REG INDEX
    TCREG-CURRENT_LINE.
    ENDMODULE.
    Updating the internal table
    Method 1
    PROCESS AFTER INPUT.
    LOOP AT ITAB_REG.
    CHAIN.
    FIELD: ITAB_REG-REG,
    ITAB_REG-DESC.
    MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    ITAB_REG-MARK = u2018Xu2019.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Method 2
    PROCESS AFTER INPUT.
    LOOP WITH CONTROL TCREG.
    CHAIN.
    FIELD: TCREG-REG,
    TCREG-DESC.
    MODULE MODIFY_ITAB_REG ON CHAIN-REQUEST.
    ENDCHAIN.
    ENDLOOP.
    MODULE MODIFY_ITAB_REG INPUT.
    MOVE-CORRESPONDING TCREG TO ITAB_REG.
    ITAB_REG-MARK = u2018Xu2019.
    MODIFY ITAB_REG INDEX TCREG-CURRENT_LINE.
    ENDMODULE.
    Updating the database
    MODULE USER_COMMAND_100.
    CASE OK_CODE.
    WHEN u2018SAVEu2019.
    LOOP AT ITAB-REG.
    CHECK ITAB_REG-MARK = u2018Xu2019.
    MOVE-CORRESPONDING ITAB_REG TO TCREG.
    UPDATE TCREG.
    ENDLOOP.
    WHEN u2026
    u2026
    ENDCASE.
    ENDMODULE.
    Hope this will solve your problem.
    Regards,
    Pavan.
    Edited by: PAVAN CHANDRASEKHAR GANTI on Aug 3, 2009 12:48 PM

  • How to modify data in table control

    hi
    i have created table control where i have displayed  data into table control
    logic used
    screen 200
    PROCESS BEFORE OUTPUT.
    MODULE SELECT_RECORD.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TBC_200'
      MODULE TBC_200_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TBC_200_CHANGE_COL_ATTR.
      LOOP AT   IT_MARA
           INTO WA_MARA
           WITH CONTROL TBC_200
           CURSOR TBC_200-CURRENT_LINE.
        MODULE TBC_200_GET_LINES.
    *&SPWIZARD:   MODULE TBC_200_CHANGE_FIELD_ATTR
      ENDLOOP.
    MODULE STATUS_0200.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TBC_200'
      LOOP AT IT_MARA.
        CHAIN.
          FIELD WA_MARA-MATNR.
          FIELD WA_MARA-ERSDA.
          FIELD WA_MARA-ERNAM.
          MODULE TBC_200_MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD WA_MARA-MARK
          MODULE TBC_200_MARK ON REQUEST.
      ENDLOOP.
      MODULE TBC_200_USER_COMMAND.
    *&SPWIZARD: MODULE TBC_200_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TBC_200_CHANGE_COL_ATTR.
    module -
    MODULE SELECT_RECORD.
    MODULE SELECT_RECORD OUTPUT.
    SELECT MATNR ERSDA ERNAM
            FROM MARA
            INTO CORRESPONDING FIELDS OF TABLE it_mara.
    ENDMODULE.                 " SELECT_RECORD  OUTPUT
    and
    another thing
    i have made  field  MARA-ERSDA. and  FIELD WA_MARA-ERNAM editable by
    input possible using layout
    so
    now those 2 fields contents  are editable
    i want to know how to edit and save the data
    some body guide.
    and i want to put the lock so that i can update
    can tell how to implement lock.
    Thanks
    Edited by: viju bangalore on Jan 27, 2011 10:40 AM

    Hi Viju,
    In PAI do something like this
    LOOP AT itab.
        MODULE mod_table_control.
    ENDLOOP.
    MODULE user_command_0100.
    at module mod_table_control put this
    MODULE mod_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
      if sy-subrc ne 0.
           insert itab.
      endif.
    ENDMODULE.
    for saving you can create at custom gui status with a save button, and at MODULE user_command_0100 save the data.

  • How to delete data in table control

    Hi,
    I am doing module pool programming. After the user enters the data in table control after saving the data. if the user wants to  remove the line item the line item shd be removed from the screen and data base.
    Please Give me vaulable Suggestions
    Regards

    Hi,
    Screen 8002 (with table control) --> select records --> press delete button --> delete selected records
    Now you wan to delete those records selected by the user at runtime when DELETE button is clicked.
    Take another internal table and work area same as the initial internal table and work area used in screen 8002 which is to be used to delete the selected data.
    Take the names of the input/output fields as work_area-field_name and select column in table control as work_area-flag.
    Also take a flag field of size 1 datatype character as the last field in the internal table and work area while declaration.
    You must have passed a code in PBO of the screen for reading internal table into the table control.
    So it reads the internal table into the table control whenever you perform any action on use command.
    All you need to do is to write a code to modify the internal table form the table control while performing any user action.
    Remember to change the LINE SEL option in attributes of table control as MULTIPLE.
    At screen logic,
    PROCESS BEFORE OUTPUT.
      MODULE status_8002. "for pf-status
      LOOP WITH CONTROL po_tab. "po_tab is table control
        MODULE pass_data. "to pass data into table control from internal table
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_8002. "for user command(back and exit)
      LOOP WITH CONTROL po_tab.
        MODULE modify_data. "to modify data from table control into table control
      ENDLOOP.
      MODULE delete. "to delete the selected records
    In PBO,
    *&      Module  STATUS_8002 OUTPUT
    MODULE status_8002 OUTPUT.
      SET pf-status 'ZAB_PFSTA'. " pf-status
      DATA : line_count TYPE i.
      DESCIRBE TABLE it_ekpo
      LINES line_count.
      po_tab-lines = line_count + 10.
      " to make table control scrollable
    ENDMODULE.                 " STATUS_8002  OUTPUT
    *&      Module  PASS_DATA  OUTPUT
    MODULE pass_data OUTPUT.
      READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
    ENDMODULE.                 " PASS_DATA  OUTPUT
    "it_ekpo is internal table and wa_ekpo is the work area
    In PAI,
    *&      Module  MODIFY_DATA  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
      "modify records from table control into the internal table
    ENDMODULE.                 " MODIFY_DATA  INPUT
    *&      Module  DELETE  INPUT
    MODULE DELETE INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'DELETE'. "when delete button is clicked
          SORT IT_EKPO BY FLAG DESCENDING. "sort by flag(selection column value)
          CLEAR WA_EKPO1.
          CLEAR WA_EKPO.
          REFRESH IT_EKPO1.
          LOOP AT IT_EKPO INTO WA_EKPO WHERE FLAG = 'X'.
            DATA : J TYPE I.
            CLEAR J.
            J = SY-TABIX. "assign index value if a record is selected
            MOVE-CORRESPONDING WA_EKPO TO WA_EKPO1. "append selected records to another
            "work area and append to another internal table to delete
            APPEND WA_EKPO1 TO IT_EKPO1.
            DELETE IT_EKPO. "delete the selected records from initial internal table
            " to reflect the changes on the table control
          ENDLOOP.
          IF J = 0.
            MESSAGE I006. "if no record selected
          ELSE. "if some records are selected
            DELETE ZEKPO FROM TABLE IT_EKPO1. "delete from database table
            COMMIT WORK.
            IF SY-SUBRC = 0.
              MESSAGE S007. "success message (records deleted)
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " DELETE  INPUT
    Now at PAI, you have delete records and these changes are reflected back to the internal table.
    Now when PBO is executed it will again read the initial internal table and will not show the deleted records.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • How to show data through table control

    Hi Experts,
    I have created an table control through wizard using table EKKO.
    I have to populate one internal table( type ekko ), and then show it in output  through table control.
    Please advise, how to do that and in where i have to write the codes.
    I will reward points for every suggestion
    Thanks in advance.
    regards

    hi saubrab,
                    This is kiran kumar.G.I am sending some sample code to populate data into table control check it once.
    i will give input in 100 screen. and display table control in 200 screen.check it once once ..ok....
    SE38 :(CODE)
    *& Module pool       YMODULEPOOL_TABLECONTROL1                         *
    *& DEVELOPER   : KIRAN KUMAR.G                                         *
    *& PURPOSE     : TABLE CONTROL DEMO                                    *
    *& CREATION DT : 17/12/2007                                            *
    *& T.CODE      : YMODTABLECONTROL1                                     *
    *& REQUEST     : ERPK900035                                            *
    PROGRAM  ymodulepool_tablecontrol1.
    Tables
    TABLES: yvbap,  "Sales Document: Item Data
            vbak.   "Sales Document: Header Data
    Controls
    CONTROLS: my_table TYPE TABLEVIEW USING SCREEN 200.
    Global Variables
    DATA: gv_lines    TYPE i,
          gv_lines1   type i,
          gv_temp     type i,
          gv_flag(20) TYPE c VALUE 'DISP',
          gv_mode1    TYPE c,
          gv_mode     TYPE c VALUE 'C'. " C: Change, D :Display
    Internal Table
    DATA: BEGIN OF gt_item OCCURS 0,
            vbeln LIKE vbap-vbeln,  "Sales Document Number
            posnr LIKE vbap-posnr,  "Sales Document Item
            matnr LIKE vbap-matnr,  "Material Number
            matkl LIKE vbap-matkl,  "Material Group
            arktx LIKE vbap-arktx,  "Short Text for Sales Order Item
            cflag,                  "Deletion Indicator
          END OF gt_item.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZTABLECONTROL' OF PROGRAM 'YMODULEPOOL_TABLECONTROL'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'DISP'.
          SELECT single vbeln
                        erdat
                        angdt
                        bnddt
                   FROM vbak
                  INTO (vbak-vbeln,vbak-erdat,
                        vbak-angdt,vbak-bnddt)
                  WHERE vbeln = vbak-vbeln.
            IF sy-subrc EQ 0.
    *Fetch the table control data and place them in Internal Table
              SELECT vbeln
                     posnr
                     matnr
                     matkl
                     arktx
                FROM yvbap
                INTO TABLE gt_item
                WHERE vbeln = vbak-vbeln.
              IF sy-subrc EQ 0.
    *NO OF line in the Internal Table
                DESCRIBE TABLE gt_item LINES gv_lines.
                my_table-lines = gv_lines + 20.
              ENDIF.
            ENDIF.
    *Call Screen 200.
            SET SCREEN 200.
          WHEN  'EXIT' OR 'BACK' OR 'CANCEL'.
    *Exit from the Program
            CALL TRANSACTION 'SESSION_MANAGER'.
        ENDCASE.
      ENDMODULE.                 " USER_COMMAND_0100  INPUT
    module STATUS_0200 output.
    SET PF-STATUS 'ZTABLECONTROL1'.
    endmodule.                 " STATUS_0200  OUTPU
    *&      Module  copy_data  OUTPUT
          text
    module copy_data output.
    *Fetch the current line data from the Table control
    read table gt_item index my_table-current_line.
    if sy-subrc eq 0.
    *Populating data into screen fields
    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.
    SE51:CODE (SCREEN 100)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    SE51 :CODE (SCREEN 200)
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0200.
    loop at gt_item with control my_table cursor my_table-current_line.
    module copy_data.
    endloop.
    PROCESS AFTER INPUT.
    loop at gt_item.
    MODULE USER_COMMAND_0200.
    endloop.
                             HAVE A NICE DAY..
    Award points if helpful,kiran kumar.G

  • Sample pgm for moving data from table control to internal table

    Hi Experts,
          I am newbi to ABAP. I don't have good material for Table control . Appreciate if you direct me to some good source of knowledge on Table control.
    The problem at hand : I am trying to move info/data from table control (in screen painter/ input and output mode ) to ITAB but couldn't . Sample pgm if possible.
    <b>Modify ITAB index TC-Current_Line .</b>
    The above statement is not inserting new lines to ITAB . Help me!
    Thanks for your time

    hi,
    do like this...
    <b>PROCESS AFTER INPUT.</b>
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
      LOOP AT itab_det.
        CHAIN.
         FIELD itab_det-comp_code.
          FIELD itab_det-bill_no.
          FIELD itab_det-bill_date.
          FIELD itab_det-vend_cust_code.
          FIELD itab_det-bill_amt.
          MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD itab_det-mark
          MODULE tab1_mark ON REQUEST.
      ENDLOOP.
    <b>MODULE tab1_modify INPUT.</b>
      APPEND itab_det.
    <b>ENDMODULE.                    "TAB1_MODIFY INPUT</b>

  • Accessing data from Table control

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi gautham,
    1. While designing set the table control as input field.
    2. In ur program create an internal table, with the same structure as your table control.
    3. Whenever an entry is made in the table control, modify your internal table.
    4. While saving use the internal table data to update the custom table.
    If internal table name is same in both screen painter(table control) and in the program then the values will automatically come into the internal table in the program with out programming.
    Otherwise we have programtically transfer the values.
    In the PAI event using move or move-corresponding statement.
    Check the program *RSDEMO02*
    check the links
    http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
    Yogesh N

  • How to transfer data in table control in bdc

    hi
    how to transfer data in table control in bdc . I need the theory regarding this
    bye

    Hi,
    just check in the forum , there is many threads available to ur questions.
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    You can even refer to these related threads
    bdc table control
    Re: table control in bdc
    table control in BDC
    Reward if helpful.
    Thanks
    Naveen khan

  • How to clear data in Table Control.

    hi! all
    How to clear the data in table control.
    i have a Table control which displays column A data from the previous screen and allows to enter column B and column C and i have a button CLEAR, when i click CLEAR button the Data displaying in table control has to be cleared. how to do it.
    Regards,
    Nagulan

    Hi,
    Loop over the internal table of table control & clear data from table control.
    loop at tctab.
    clear tctab.
    modify tctab.
    endloop.
    Best regards,
    Prashant

  • How to insert data into table control

    hi experts,,
           i have inserted data into data base table through table control .
    now i want to insert data into table control through database table.
      how to delete data from table control for selected row

    Hi
    go through this link.
    http://www.****************/Tutorials/ABAP/TableControl/Demo.htm

  • Urgent!!!!!  Inserting data in table control of infotype.

    Hi Experts,
    I want to insert data in custom infotype.I am using FM HR_INFOTYPE_OPERATION for this purpose.But custom infotype contains a table control.
    Table control of infotype has 20 rows containing  fields name01 , addr01 upto name20 , addr20.
    How do i insert data in table control fields of infotype if i want to use FM HR_INFOTYPE_OPERATION .
    Pls suggest if there is another way to do it.
    Thanks.

    Thanks for your reply.
    I am Calling FM HR_INFOTYPE_OPERATION in a loop of a table.
    Table contains multiple employee numbers-PERNR.There can be all different PERNR or some records of same PERNR.
    Suppose if there are four records in the table.First two records are of the same PERNR.Then how would name01 or name02 will be assigned.
    Now, third record is  of new PERNR .Again it should be name01.
    So the question is how everytime in a loop i will assign nameNN for different PERNR.
    nameNN and addrNN was an example. I am sending my code here.
    Loop at it_data.
    gs_9000-PERNR = it_data-pernr..
    gs_9000-currentamount03 = it_data-curramt.
    gs_9000-mtdamount03 = it_data-mtd.
    gs_9000-qtdamount03 = it_data-qtd.
    gs_9000-ytdamount03 = it_data-ytd.
    gs_9000-roll12amount03 = it_data-roll.
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
    NUMBER = gs_9000-pernr
    IMPORTING
    RETURN = RETURNE.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = '9000'
    NUMBER = gs_9000-PERNR
    VALIDITYBEGIN = '20080801' 
    RECORD = gs_9000
    OPERATION = 'INS'
    TCLAS = 'A'
    DIALOG_MODE = '0'
    IMPORTING
    RETURN = RETURN
    KEY = KEY.
    IF RETURN IS NOT INITIAL.
    WRITE :/ 'Error Occurred'.
    ENDIF.
    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
    EXPORTING
    NUMBER = gs_9000-PERNR
    endloop.
    So in above code...
    gs_9000-currentamount03 = it_data-curramt.
    gs_9000-mtdamount03 = it_data-mtd.
    gs_9000-qtdamount03 = it_data-qtd.
    gs_9000-ytdamount03 = it_data-ytd.
    gs_9000-roll12amount03 = it_data-roll.
    these are table control fields , so how i wud i assign for
    gs_9000-currentamount04 = it_data-curramt.
    gs_9000-mtdamount04 = it_data-mtd.
    gs_9000-qtdamount04 = it_data-qtd.
    gs_9000-ytdamount04 = it_data-ytd.
    gs_9000-roll12amount04 = it_data-roll.
    in loop of a table.
    Thanks

  • Data in table control not seen for the Standard Transaction Iview

    Hi
    I am creating one Standard Transaction Iview for CATS .
    While doing print preview in IE 6 , I am not able to see data in Table control(Data Entry Area ).
    Can you please provide me the solution for how I can see the data in Table Control
    Regards
    Ruturaj

    Hi David,
    I too struggled a lot to find the solution ....atlast got it....It possible by exporting and importing the table control values to Database Index.
    1. AT SELECTION SCREEN OUTPUT event  triggers when you SAVE and GET the variant.
    2. So write the logic in AT SELECTION-SCREEN OUTPUT event.
    CONSTANTS: c_vari TYPE char30 VALUE
                             '(SAPLSVAR)RSVAR-VARIANT'.
      FIELD-SYMBOLS: <lfs_vari> TYPE ANY.
      ASSIGN: (c_vari) TO <lfs_vari>.
      IF sy-subrc = 0.
        IF <lfs_vari> IS NOT INITIAL.
          IF ok_code = 'SPOS'.
            EXPORT gt_chars[] TO DATABASE vari(tc) ID <lfs_vari>.
          ELSEIF ok_code = space.
            IMPORT gt_chars[] FROM DATABASE vari(tc) ID <lfs_vari>.
          ENDIF.
        ENDIF.
      ENDIF.
    In the above logic if OK_CODE is 'SPOS', that is for saving the variant with the name <lfs_vari>.
    Similarly if the OK_CODE is other than, 'GET'....that is for retrieving the variant. But in case of getting the variant OK_CODE is not filled with 'GET', but variant will be filled. We should take variant filling as base and do as done above.
    It worked for me.....

  • Can't not display the table control in the report

    Hello frnds,
    I m create a module pool pgm using saptechnical  'Demo on using Table Control', 
    execute a report bush buttons are displayed but
    can't Dispaly the table ctrl in the report using screen paiter
    any help me, plz.
    Thanks in advance.

    Hi Kumar,
    Check thsi Program demo_sel_screen_with_tabstrip.
    and also a program on Subscreens in ABAPDOCU
    You need to combine both then only this is possible in Report PRograms
    Cheerz
    Ram

Maybe you are looking for