Problem with dynamic internal table updation

Hello Folks,
  I created  a dynamic internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = i_fieldcat
      IMPORTING
        ep_table                  = i_dyntab
      EXCEPTIONS
        generate_subpool_dir_full = 1
        OTHERS                    = 2.
ASSIGN i_dyntab->* TO <f_dyntable>.
and created a work area
CREATE DATA wg_f_split LIKE LINE OF <f_dyntable>.
    ASSIGN wg_f_split->* TO <f_wg_dyntable>.
My requirement is that , i have to loop a normal internal table and append those records to the filed symbol internal table.
READ TABLE i_normal_itab INTO wg_split INDEX wl_rows-index.
      IF sy-subrc EQ 0.
        ASSIGN wg_split to <f_wg_dyntable>.
         APPEND <f_wg_dyntable> to <f_dyntable>.
       endif.
here i am geeting dump as "MOVE src TO dst" ... i can get the data in the work area FSymbol but cannot append it in Internal table Field Symbol.. Please help..
<Added code tags>
Edited by: Suhas Saha on Aug 3, 2011 10:52 AM

Hello Sandra,
Thanks for the reply..
First i tried  appending the normal work area to the fieldsymbol  internal table.
  append wg_split to <f_dyntable>
This is hiting dump the same dump and so i created a fieldsymbol work area. ( <f_wg_dyntable>.)and tried to append the field symbol internal table with this work area. which is again giving the dump
APPEND <f_wg_dyntable> to <f_dyntable>. ( Again a Dump)
Edited by: Charan-SAP on Aug 2, 2011 9:40 PM
Edited by: Charan-SAP on Aug 2, 2011 9:42 PM

Similar Messages

  • Using where condition with dynamic internal table

    Hi Friends.
    How to use where condition with dynamic internal table ?
    Regards,
    Amit Raut

    Hai Amit
    REPORT  ZDYNAMIC_SELECT                         .
    TABLES: VBAK.
    DATA: CONDITION TYPE STRING.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    END OF ITAB.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    CONCATENATE 'VBELN' 'IN' 'S_VBELN.'
    INTO CONDITION SEPARATED BY SPACE.
    SELECT VBELN POSNR FROM VBAP INTO TABLE ITAB
    WHERE (CONDITION).
    LOOP AT ITAB.
    WRITE 'hello'.
    ENDLOOP.
    Thanks & Regards
    Sreenivasulu P

  • How to upload data with dynamic internal table

    Hi,
    I have to upload the basic , sales, purchasing view data by using bapi depend on check box selected for views.
    i have filled fieldcatalog for selected views and pass the field catalog structure to dynamic int table and
    import it into the field symbol <fs_data>. this field symbol assigned to <fs_1>.
    then callED the 'GUI_UPLOAD '  and  when i pass field symbo for function module i am getting first 10 rows 0f the file .
    flat file has basic data,sales ,purchase fields data
    ex: i was selected basicview and purchase view and execute i am getting basic,sales view data.
    how can i get only basic and purchase data.

    hi ,
    please find code.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = lt_fieldcatalog
        IMPORTING
          ep_table                  = <fs_data>
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc <> 0.                                         "#EC NEEDED
      ENDIF.
    So <FS_1> now points to our dynamic internal table.
      ASSIGN <fs_data>->* TO <fs_1>.
    Next step is to create a work area for our dynamic internal table.
      CREATE DATA new_line LIKE LINE OF <fs_1>.
    A field-symbol to access that work area
      ASSIGN new_line->*  TO <fs_2>.
      ASSIGN new_line->*  TO <fs_3>.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = p_f
          filetype                = 'DAT'
        TABLES
          data_tab                = <fs_1>
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • Working with dynamic internal tables

    Hi,
    I've created dynamic internal table and then assigned it to field symbol structure.
    This is part of the code.
    wa_tab  = cl_abap_structdescr=>create( comp_tab ).
      i_tab   = cl_abap_tabledescr=>create( wa_tab ).
      create data i_table type handle i_tab.
      assign i_table->* to <f_tab1>.
    As a second step I am populationg that structure <f_tab1> with data using dynamic select:
    select (sel_list) from (p_table)
            into table <f_tab1>
            up to p_row rows.
    So far so good but I need to copy the data from <f_tab1> into internal table with the same structure and to use that internal table on a later stage as a driver table in select...for all entries.
    How can I doo that ?
    Thanks,
    Stefan
    <Code tags added>
    Edited by: Suhas Saha on Oct 27, 2011 4:23 PM

    Hello Stefan,
    You might be interested in reading this thread How to use dynamic internal table with FOR ALL ENTRIES.
    Do let us know if you find any alternative solution
    Cheers,
    Suhas

  • How to do parallel processing with dynamic internal table

    Hi All,
    I need to implement parallel processing that involves dynamically created internal tables. I tried doing so using RFC function modules (using starting new task and other such methods) but didn't get success this requires RFC enabled function modules and at the same time RFC enabled function modules do not allow generic data type (STANDARD TABLE) which is needed for passing dynamic internal tables. My exact requirement is as follows:
    1. I've large chunk of data in two internal tables, one of them is formed dynamically and hence it's structure is not known at the time of coding.
    2. This data has to be processed together to generate another internal table, whose structure is pre-defined. But this data processing is taking very long time as the number of records are close to a million.
    3. I need to divide the dynamic internal table into (say) 1000 records each and pass to a function module and submit it to run in another task. Many such tasks will be executed in parallel.
    4. The function module running in parallel can insert the processed data into a database table and the main program can access it from there.
    Unfortunately, due to the limitation of not allowing generic data types in RFC, I'm unable to do this. Does anyone has any idea how to implement parallel processing using dynamic internal tables in these type of conditions.
    Any help will be highly appreciated.
    Thanks and regards,
    Ashin

    try the below code...
      DATA: w_subrc TYPE sy-subrc.
      DATA: w_infty(5) TYPE  c.
      data: w_string type string.
      FIELD-SYMBOLS: <f1> TYPE table.
      FIELD-SYMBOLS: <f1_wa> TYPE ANY.
      DATA: ref_tab TYPE REF TO data.
      CONCATENATE 'P' infty INTO w_infty.
      CREATE DATA ref_tab TYPE STANDARD TABLE OF (w_infty).
      ASSIGN ref_tab->* TO <f1>.
    * Create dynamic work area
      CREATE DATA ref_tab TYPE (w_infty).
      ASSIGN ref_tab->* TO <f1_wa>.
      IF begda IS INITIAL.
        begda = '18000101'.
      ENDIF.
      IF endda IS INITIAL.
        endda = '99991231'.
      ENDIF.
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = pernr
          infty           = infty
          begda           = '18000101'
          endda           = '99991231'
        IMPORTING
          subrc           = w_subrc
        TABLES
          infty_tab       = <f1>
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        subrc = w_subrc.
      ELSE.
      ENDIF.

  • Coloring an ALV Cell with DYNAMIC INTERNAL TABLES

    Hello Gurus,
    I need your help regarding coloring of a cell in my ALV Grid report with DYNAMIC tables.
    I have used the call method in calling my ALV. (CALL METHOD gr_alvgrid->set_table_for_first_display).
    Now my problem is, I can not bring out the cellcolor succesfully, I always ended up to dump (GETWA_NOT_ASSIGNED = You attempted to access an unassigned field symbol     
    (data segment 32807).                                  
    What I have done:
    I've created 2 internal tables:
    *1st table
    *After appended all of my columns to  gt_fieldcat
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gt_fieldcat
        IMPORTING
          ep_table        = gp_both.
      ASSIGN gp_both->* TO <i_xtab1>.
    *2nd table
    Appended these column for CellColor
      CLEAR wa_gtfldcat.
      wa_gtfldcat-fieldname = 'CELLCOLOR'.
      wa_gtfldcat-ref_table = 'CALENDAR_TYPE'.
      wa_gtfldcat-ref_field = 'COLTAB'.
      APPEND wa_gtfldcat TO gt_fieldcat.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = gt_fieldcat
        IMPORTING
          ep_table        = gp_alvgrid.
      ASSIGN gp_alvgrid->* TO <i_xtab2>.
    *Work Areas for tab1 and tab2
    CREATE DATA dref1 LIKE LINE OF <i_xtab1>.
      ASSIGN dref1->* TO <wa_xtab1>.
      CREATE DATA dref2 LIKE LINE OF <i_xtab2>.
      ASSIGN dref2->* TO <wa_xtab2>.
    *Move contents of table1 to table2 and modify cellcolor column
    LOOP AT <i_xtab1> ASSIGNING <wa_xtab1>.
    *-----Cell color assignment
        DESCRIBE TABLE gt_fieldcat.
        DO sy-tfill TIMES.
          READ TABLE gt_fieldcat INTO wa_gtfldcat INDEX sy-index.
          ASSIGN COMPONENT wa_gtfldcat-fieldname
            OF STRUCTURE <wa_xtab1> TO <fs4>.
          IF sy-subrc NE 0. EXIT .ENDIF.
          ASSIGN COMPONENT wa_gtfldcat-fieldname
            OF STRUCTURE <wa_xtab2> TO <fs3>.
          IF sy-subrc NE 0. EXIT .ENDIF.
            <fs3> = <fs4>.
        ENDDO.
        ASSIGN COMPONENT 'CELLCOLOR' OF STRUCTURE <wa_xtab2> TO <fs3>.
        IF sy-subrc = 0.
          PERFORM modify_cell_color USING 'ZZMATNR' <fs3>.
        ENDIF.
        APPEND <wa_xtab1> TO <i_xtab2>.
    ENDLOOP.
    *Call ALV
    gs_layout-ctab_fname = 'COLORCELL'
        CALL METHOD gr_alvgrid->set_table_for_first_display
          EXPORTING
            is_layout                     = gs_layout
          CHANGING
            it_outtab                     = <i_xtab2d>[]
            it_fieldcatalog               = gt_fieldcat
            it_sort                       = lt_sort
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4.
        IF sy-subrc <> 0.
    *--->Exception handling
        ENDIF.
    FORM modify_cell_color  USING p_fieldname   TYPE lvc_fname
                                  pt_cellcolor  TYPE table.
      DATA l_cellcolor TYPE lvc_s_scol.
      CLEAR l_cellcolor.
      l_cellcolor-fname = p_fieldname.
      l_cellcolor-color-col = 6.       " Red.
      l_cellcolor-color-int = 0.
      l_cellcolor-color-inv = 0.
      INSERT l_cellcolor INTO TABLE pt_cellcolor.
    ENDFORM.                    " MODIFY_CELL_COLOR

    Hi,
    The internal tabl which you are using to display the output should have one column in the end.
    The cell in this column will contain an internal table of type 'lvc_s_scol'.
    The contents of this internal table will be the field names of all other columns of your main internal table in the field FNAME and the required color in the field COLOR.
    Please note that the field COLOR will have a hex value for different colors.
    In the stucture is_layout  whihc you pass to the method 'set_table_for_first_display'
    the name of this last column should be given to the field 'ctab_fname'.
    This will help you to give the colors to each cell.
    for example
    I have my data table as follows:-
    ITAB1
    MATNR  MAKTX        COLOR_TAB
    1           ABC            FNAME  COLOR  NOKEYCOL
                                    MATNR 8000
                                    MAKTX 8000
    2          XYZ             MATNR 10000
                                  MAKTX  10000
    So my internal table ITAB1 had 3 columns MATNR MAKTX and COLOR_TAB.
    And COLOR_TAB will contain an internal table with 3 columns FNAME COLOR and NOKEYCOL.
    The value to importing parameter IS_LAYOUT-CTAB_FNAME will be COLOR_TAB.
    This will help you to assign various colors to the cell of the internal table ITAB.
    When you have to change any color, then you will have to just change the entries in cell COLOR_TAB for the particular row and cell.
    Regards,
    Ankur Parab

  • How to write a perform with dynamic internal table

    Hi to all experts,
    i have to read infotype 2001 2003 2002 with same pernr, begin date, end date im calling hr_read_infotype three times
    can i write a single perform and call it three how to pass different tables (2001, 2002, 2003).

    try the below code...
      DATA: w_subrc TYPE sy-subrc.
      DATA: w_infty(5) TYPE  c.
      data: w_string type string.
      FIELD-SYMBOLS: <f1> TYPE table.
      FIELD-SYMBOLS: <f1_wa> TYPE ANY.
      DATA: ref_tab TYPE REF TO data.
      CONCATENATE 'P' infty INTO w_infty.
      CREATE DATA ref_tab TYPE STANDARD TABLE OF (w_infty).
      ASSIGN ref_tab->* TO <f1>.
    * Create dynamic work area
      CREATE DATA ref_tab TYPE (w_infty).
      ASSIGN ref_tab->* TO <f1_wa>.
      IF begda IS INITIAL.
        begda = '18000101'.
      ENDIF.
      IF endda IS INITIAL.
        endda = '99991231'.
      ENDIF.
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = pernr
          infty           = infty
          begda           = '18000101'
          endda           = '99991231'
        IMPORTING
          subrc           = w_subrc
        TABLES
          infty_tab       = <f1>
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        subrc = w_subrc.
      ELSE.
      ENDIF.

  • Problem in dynamic internal table

    hello experts,
    i have developed a report the out put is as shown:
    first screen:  i will be entering one 'z' or 'y' table name dynamically.
    second screen: a popup screen with checkboxes and the field names of above particular table entered.
                           when user selects the checkboxes or fieldnames.
                            only those fieldnames with data should be displayed in the next list. 
        for example:
       when user enters table name: ZGEB_0X_FBIW_CSA
    a pop-up screen displays as shown below:
                     fieldnames
    checkbox1  mandt
    checkbox2 sender
    checkbox3 receiver    (i hav done upto this )
    when user selects checkbox1 & 2:
    (but i am not getting how to get below screen after selecting the checkboxes)
    only the data of mandt and sender should be displayed in the next list
    i.e.  mandt   sender    
         710        ttttt
    pls help me in this regard
    thanx in advance
    soham.p.

    Hi Soham
    In the secodn screen create two button BACK and Next.
    When you click on Next it will take you to the third screen.
    In the PBO of the third screen by defualt all the fields will be visible now
    based on checkbox entry loop the next screen and modify the fields which you don`t want to display.
    LOOP AT SCREEN.                                               
         CHECK screen-name = ZTAB-MATNR.
            screen-input = '0'.                                        
         MODIFY SCREEN.                                             
      ENDLOOP.     
    Regards
    Neha

  • SET_TABLE_FOR_DISPLAY - Edited value from dynamic internal table need to be captured

    Hi all,
    I have created  2 tabstrip screns which contain ALV GRID DISPLAY  in a container with dynamic internal table and editable columns .I want to capture the edited value from this ALV GRID display.I have used SET_TABLE_FOR_DISPLAY  and for this dynamc internal table is passed which is Field symbol and editable columns have to be captured for further updation into another ztable.
    When i used check_changed_data  i am getting dump as field symbol not assigned.
    Below is the code :  How can i get edited column value from below code
    call method alv_list->set_table_for_first_display
        exporting
                is_layout                     = gs_layout
        changing
          it_outtab                     = <fs_dynamic_table>
          it_fieldcatalog               = it_fieldcat[]
        exceptions
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          others                        = 4.
      if sy-subrc <> 0.
    * Implement suitable error handling here
      endif.
    Kindly help me to solve this.
    With Thanks,
    Dina.

    please provide more info about the dump to try to help you
    as max said, it could be because the field symbol is not global and if its global maybe you are not refering well to the column
    i assume that you are using "ASSIGN COMPONENT comp OF STRUCTURE struc TO <fs>" to capture the value changed
    validate always the sy-subrc after the assignment.
    but the check changed data have parameters that have the old and new values
    please provide more info...
    Regards

  • Dynamic internal table column issue

    Hi
    i have ALV report with dynamic internal table.after i build the internal table and fieldcatalog i have problem  i.e. when grid is displayed then one of the column value is coming in the next column.i populated col_pos in field catalog also and in the debug mode data is populated correctly for respective columns in fieldcatalog and dynamic internal table. But when it is displayed i have this problem.
    any inputs on this?

    Hi Moorthy,
    Did you perform an ALV consistency check?
           Check the below given links as well.
    The Consistency Check - ALV Grid Control (BC-SRV-ALV) - SAP Library
    SAP ALV Consistency Check
    Regards,
    Philip.

  • How to delete records from dynamic internal table.

    Hi Experts,
    Need urgent help!!!
    Issue is with Dynamic internal tables.
    Below is code written by me :
    FORM select_query USING Lw_tabnam
                      TYPE  t682i-kotabnr.
      DATA :  lw_line  TYPE REF TO data,
              lw_line1 TYPE REF TO data.
        CREATE DATA Lw_line    TYPE (lw_TABNAM).
        ASSIGN      Lw_line->* TO   <WA_tbl>.
        CREATE DATA LW_LINE    TYPE STANDARD TABLE OF (Lw_tabnam)
                               WITH NON-UNIQUE DEFAULT KEY.
        ASSIGN      Lw_line->* TO <TBL>.
        SELECT * FROM  (Lw_tabnam)
                 INTO CORRESPONDING FIELDS OF TABLE <TBL>
                 WHERE (t_keys).
    Endform.
    code is working fine.
    here even the table name and where condition are dynamic,everything is fine upto this point.
    Now i have to delete some record from <TBL> based on some conditons.
         for ex : ( here lc_fieldname is KUNNR)
          loop at t_kunnr.
              lw_tabix = sy-tabix.
            Read table <tbl>
                    with key (lc_fieldname) = t_kunnr-kunnr ASSIGNING <wa_tbl>.
            If sy-subrc = 0.
            *Delete
            delete <tbl> from <wa_tbl>
    delete <tbl> index  lw_tabix.
            Endif.
         Endloop.
    The above delete statement doesn't work ,even we can't use index as it gives a syntax error " something related to "index is not allowed in standard table or hash table.
    Can you help me ab't how to delete records in Dynamic internal table?
    Other option that i am thinking of is to create a static table of type dynamic table.
    means, data itab type standard table of <tbl> .I know the syntax is wrong ,however is there any way to do this?
    Thanks in advance ,
    If you have any suggestion ab't this then do let me know.
    bye,
    Gaurav.

    Hi
    I wrote this code and it works fine:
    DATA LW_TABNAM(10) VALUE 'LFA1'.
    DATA : LW_LINES TYPE REF TO DATA,
           LW_LINE  TYPE REF TO DATA.
    FIELD-SYMBOLS: <TABLE> TYPE TABLE,
                   <WA>    TYPE ANY.
    CREATE DATA LW_LINES TYPE TABLE OF (LW_TABNAM)
    WITH NON-UNIQUE DEFAULT KEY.
    ASSIGN LW_LINES->* TO <TABLE>.
    CREATE DATA LW_LINE TYPE (LW_TABNAM).
    ASSIGN LW_LINE->* TO <WA>.
    DO 10 TIMES.
      APPEND INITIAL LINE TO <TABLE>.
    ENDDO.
    SY-TABIX = 4.
    DELETE <TABLE> INDEX SY-TABIX.
    WRITE SY-SUBRC.
    I hope it help you
    Max

  • Populating two dynamic internal tables and displaying the O/p as ALV

    I want to develop a abap prototype program report for the SD document flow analysis...
    There is a Fm : RV_ORDER_FLOW_INFORMATION in which if we pass the Sales order number it returns the flows as VBFA_TAB.
    I need to populate two dynamic ITAB1 and ITAB2
    the structure of ITAB1 should be like ColNm1....ColNmn
    The values for ColNm1 will be Sales Order ColNm2 as Delivery or smthng else depending on  field vbtyp_n.
    ITAB 2 should have the corresponding values accly to ITAB1.
    Then we need to display in ALV o/p.
    The tables should be populated dynamically.
    Can anybody throw some light on it and plz do write back with sample code to do the logic of it.

    Search in SDN with Dynamic internal tables.
    you get lot of code samples and Discussions related to Dynamic internal tables.
    you can also check with this class CL_ALV_TABLE_CREATE

  • Read dynamic internal table

    hi all,
    i am working with dynamic internal table. how to use a read statement for the dynamic internal table.
    Thanks

    hi
    try with this sample code.
    DATA: tab TYPE TABLE OF mara,
          field_key TYPE char100.
    FIELD-SYMBOLS: <tab> TYPE ANY TABLE,
                   <wa> TYPE ANY.
    SELECT * UP TO 10 ROWS FROM mara INTO TABLE tab[].
    ASSIGN tab[] TO <tab>.
    field_key = 'MATNR'.
    READ TABLE <tab> ASSIGNING <wa>
    WITH KEY (field_key) = '000000000000000200'.
    Cheers,
    Madhu

  • Problem in processing internal table

    Hi All,
    Im facing some problem with an internal table with header.
    This is Xvbkd with heaer line.
    Header     100     0000000049     000010                         EXW     China
    1     100     0000000049     000000                         CIF     HK
    2     100     0000000049     000010                         CIF     HK
    3     100     0000000049     000020                         CIF     HK
    Now I want modify the internal table of 2nd record. The data above has modified in the header.but not reflected in the body.
    Here is my code:
    SELECT SINGLE inco1 inco2
                            INTO (knvv-inco1, knvv-inco2)
                            FROM knvv
                            WHERE kunnr EQ w_shipto
                              AND vkorg EQ vbak-vkorg
                              AND vtweg EQ vbak-vtweg
                              AND spart EQ vbak-spart.
                        IF sy-subrc EQ 0 AND
                            knvv-inco1 NE space or
                            knvv-inco2 NE space.
                          MOVE: knvv-inco1 TO wa_xvbkd-inco1,
                                knvv-inco2 TO wa_xvbkd-inco2.
                         READ table xvbkd with key vbeln = xvbap-vbeln
                                                    posnr = xvbap-posnr.
                          IF sy-subrc = 0.
                          xvbkd-inco1 = wa_xvbkd-inco1.
                          xvbkd-inco2 = wa_xvbkd-inco2.
                          modify table xvbkd from wa_xvbkd transporting  inco1 inco2.
                         endif.
                        ENDIF.
    Requirement: is the 2nd record(item 10) in above internal table has to reflect the change with EXW and China.
    Pls help me with ur valuable suggestions.
    Regards,
    Priya

    try,
    SELECT SINGLE inco1 inco2
                            INTO (knvv-inco1, knvv-inco2)
                            FROM knvv
                            WHERE kunnr EQ w_shipto
                              AND vkorg EQ vbak-vkorg
                              AND vtweg EQ vbak-vtweg
                              AND spart EQ vbak-spart.
                        IF sy-subrc EQ 0 AND
                            knvv-inco1 NE space or
                            knvv-inco2 NE space.
                          MOVE: knvv-inco1 TO xvbkd-inco1,
                                knvv-inco2 TO xvbkd-inco2.
                         READ table xvbkd with key vbeln = xvbap-vbeln
                                                    posnr = xvbap-posnr.
                          IF sy-subrc = 0.
                          modify xvbkd index sy-tabix.
                         endif.
                        ENDIF.
    Regards,
    John
    Edited by: jvanpelt on Jul 16, 2010 9:36 AM

  • Dynamic internal table operations

    Hi,
    I have an issue with dynamic internal table wherein I need to write  a  select statement with For All Entries on dynamic internal table and populating the record into another dynamic internal table.
    I am trying with the code below but its not working.
    SELECT (FLD)
    FROM (T_TABLE)
    INTO CORRESPONDING FIELDS OF TABLE <DYN1_TABL>
    FOR ALL ENTRIES IN <DYN_TABL>
    WHERE KEY_FNAME = <DYN_TABL>-KEY_FNAME.
    FLD is the dynamic field.
    T_TABLE is the dynamic database table.
    DYN1_TABL is the dynamic internal table
    DYN_TABL is the dynamic internal table
    KEY_FNAME is the dynamic key field of T_TABLE.
    Pls help me on this issue.
    Response with code snippets will be appreciated.
    Thanks in advance.

    Thanks for your reply Nikki but my issue is to reference  a field in dynamic internal table to be used with 'For All Entries' satement.
    like for static we use
    For All Entries in Itab where <fieldname> = itab-<fieldname>
    I was looking for the same statement for dynamic tables

Maybe you are looking for