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

Similar Messages

  • Distinct values from dynamic internal tabls

    Hi All,
    I have a dynamic internal tables like <dy_table> , i want to get distinct  values from this internal tables,
    how to do that, structure of dynamic internal tables is dynamic acc. to user conditions.
    regards,
    Anuj

    Hi Anuj
    Just try this,
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = tb_fields_for_it
    IMPORTING
    ep_table = gp_dyn_table.
    ASSIGN gp_dyn_table->* TO <gt_table>.
    ASSIGN LOCAL COPY OF INITIAL LINE OF <gt_table> TO <fs_table>.
    LOOP AT tb_output.
    *To assign value for serial number.
    ASSIGN COMPONENT 1 OF STRUCTURE <fs_table> TO <ls_field>.
    <ls_field> = tb_output-sno.
    UNASSIGN <ls_field>.
    *To assign value for Sales Organization.
    ASSIGN COMPONENT 2 OF STRUCTURE <fs_table> TO <ls_field>.
    <ls_field> = tb_output-vkorg.
    UNASSIGN <ls_field>.
    *To assign Rate for its respective Condition type.
    LOOP AT tb_konp WHERE knumh = tb_output-knumh.
    READ TABLE tb_fieldcat1 WITH KEY fieldname = tb_output-kschl.
    IF sy-subrc EQ 0.
    lv_count = tb_fieldcat1-col_pos.
    ASSIGN COMPONENT lv_count OF STRUCTURE <fs_table> TO <ls_field>.
    IF tb_konp-konwa EQ '%'.
    tb_konp-kbetr = tb_konp-kbetr / co_10.
    <ls_field> = tb_konp-kbetr.
    ELSE.
    <ls_field> = tb_konp-kbetr.
    ENDIF.
    ENDIF.
    ENDLOOP.
    lv_count = lv_count + 1.
    APPEND <fs_table> TO <gt_table>.
    CLEAR <fs_table>.
    ENDLOOP.
    Hope this proves helpful to you.

  • Deleting from Dynamic Internal table

    Hi,
    How can we delete data from dynamic internal table...
    I have a dynamic internal table <fs_dyn_table> which is of type any and can have any fields...
    I want to delete all those records which have a value of '10' in a field named field1
    I have written my delete statement in the following manner..
    DELETE <fs_dyn_table> WHERE field1 = '10'.....but it is not working...it gives me an error...stating that the line type of table must be statically defined.

    Hi,
    Loop on the internal table into a field-symbol of line type same as the internal table.
    Use assign component statement and then delete the corresponding record.
    Regards,
    Ankur Parab

  • 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

  • Populate Final internal table from Dynamic internal table

    Hello,
    I have ti display data in ALV grid whose structure is fixed. I am dynamically selecting data iin an internal table.
    Now from this dynamic internal table, i need to populate my final internal table whose structurte is fixed.
    Please help.
    Rgds,
    Himanshu

    Hello Himanshu,
    When you say dynamic internal table there are two things one is the actual structure and other one is field table that holds information for all the fields used to create dynamic internal table.
    No if you want to move data from dynamic table to fixed internal table then you can try as follows:
    1.
    field-symbols <field_name> TYPE C.
    field-symbols <field_value> TYPE C.
    Now you either use
    LOOP AT fields_itab.
    ASSIGN fields_itab-fieldname to <field_name>.
    ASSIGN COMPONENT <field_name> OF STRUCTURE <structure_name> TO <field_value>
    Now you move value from <field_value> to required field in fixed internal table.
    i.e.
    itab-fieldname = <field_value>.
    Other way to do this:
    If you fields order is constant then you can also use index in assign component statement.
    do <no_of_fields> times.
        ASSIGN COMPONENT sy-index OF STRUCTURE <structure_name> TO <field_value>.
    rest is same as first method.
    Hope this help!
    I have given sudo code and you need to work on it little.
    Thanks,
    Augustin.

  • How to delete data from dynamic internal table

    Hi,
    I have dynamic internal table and I have some slection screen fields , using these selection screen fields
    (select -options), I have to filter the data? assigning will work with READ , but I have select options not the parametre,
    and also delete will not work for dynamic table..
    as we cannot use assigning with delete..
    So how to do this?
    and one more thing is , I cannot filter the data while selection( in select, I cannot filter the data-> as it's not coming directly from table, it's coming from buffer),
    so now after selection of data, I need to filter the data from dynamic table.
    Is there any way to do this?
    Regards,
    Mrunal

    Hi matt,
    I tried with below code as  you said. But I am getting dump. can you help?
    here is my piece of code.
    FIELD-SYMBOLS: <LS_DATA> type any,
                               <LT_DATA> TYPE table,
                                <L_FIELD> type any.
        ASSIGN <l_buffer_entry>-dataptr->* TO <LS_DATA>.
        ASSIGN <l_buffer_entry>-dataptr->* TO <LT_DATA>.
    LOOP AT <LT_DATA> ASSIGNING <LS_DATA>.
    ASSIGN COMPONENT 'BUKRS' OF STRUCTURE <LS_DATA> TO <L_FIELD>.
    IF <L_FIELD> NOT IN SO_BUKRS.
    DELETE <LT_DATA>.
    ENDIF.
    UNASSIGN <L_FIELD>.
    ASSIGN COMPONENT 'BELNR' OF STRUCTURE <LS_DATA> TO <L_FIELD>.
    IF <L_FIELD> NOT IN SO_BELNR.
    DELETE <LT_DATA>.
    ENDIF.
    UNASSIGN <L_FIELD>.
    ENDLOOP.
    and here is the description of my dump:->>>
    You attempted to access an unassigned field symbol
    (data segment 32772).
    This error may occur for any of the following reasons:
    - You address a typed field symbol before it is set using ASSIGN
    - You address a field symbol that points to a line in an internal table
      that has been deleted
    - You address a field symbol that had previously been reset using
      UNASSIGN, or that pointed to a local field that no longer exists
    - You address a global function interface parameter, even
      though the relevant function module is not active,
      that is it is not in the list of active calls. You can get the list
      of active calls from the this short dump.

  • Populate data from dynamic internal table

    Hi
    I have dynamic internal table <lt_paxxxx>. Iam fillling <lt_paxxxx> in the following way.
    select * into table <lt_paxxxx> from (infty-dbname).
    I have to pass data of <lt_paxxxx> to another internal table lt_final.
    'lt_final' should contain fields like <lt_paxxxx>, infty name, DB name.
    Could you please help me out how to pass <lt_paxxxx> data to 'LT_FINAL'.

    loop at <it_table>
           into <is_table>.
        loop at it_fieldcatalog
             into is_fieldcatalog.
          assign component is_fieldcatalog-fieldname
                 of structure <is_table>
                 to <field1>.
          concatenate 'IT_TABLE-'
                              is_fieldcatalog-fieldname
                             into w_field.
         assign (w_field) to <field2>.
         check sy-subrc eq space.
          move <field1> to <field2>.
        endloop.
       append it_table
      endloop.
    regards

  • How To Read Field Values Form Dynamic Internal Table

    Hi,
    I Created a dynamic internal table using.
    FIELD-SYMBOLS: <gt_table> TYPE STANDARD TABLE,
                   <wa_gt_table>,
                   <l_fvalue> TYPE ANY.
    This Interanl table is working well, and all values are populated to an ALV.
    Now I try to set a link
    for that I am using below code
          READ TABLE <gt_table> ASSIGNING <l_fvalue> index rs_selfield-tabindex.
          IF sy-subrc EQ 0.
            insplot = <l_fvalue>-prueflos.
    Now it is showing a syntax error :
    the data object <l_fvalue> has no structure and there for no component called prueflos
    Regards
    Nausal

    Hi,
    Refere following code
    Local Field Symbol
      FIELD-SYMBOLS: <lf_any> TYPE ANY.                     "Changed data
      LOOP AT <gf_dyna_table> ASSIGNING <gf_dyna>.
        DO.
          ASSIGN COMPONENT sy-index OF STRUCTURE <gf_dyna> TO <lf_any>.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          IF ls_attach-line IS INITIAL.
            ls_attach-line = <lf_any>.
          ELSE.
            CONCATENATE ls_attach-line <lf_any> INTO ls_attach-line
                                                SEPARATED BY lc_tab.
          ENDIF.
        ENDDO.
        CONCATENATE lc_cret ls_attach-line  INTO ls_attach-line.
      Append Changed Data to attachement table
        APPEND ls_attach TO gt_attach.
      Clear
        CLEAR : ls_attach.
      ENDLOOP.
    Regards,
    Prashant

  • How to pass data from dynamic internal table to standard internal table

    hi experts,
    below is the piece of code which i have used in my requirement but the data is not moved.
    LOOP AT <tab> ASSIGNING <tab1>.
      MOVE-CORRESPONDING <tab1> TO wa.
      append wa TO  gt_outtab.
    ENDLOOP.
    here
    <tab> - dynamic internal table.
    <tab1>-dynamic internal table work area.
    gt_outtab - standard internal table.
    wa- standard internal table work area.
    i am not getting what additional thing i have to write.
    pls help me in this regard.
    thankx in advance.
    soham.p.

    Hello soham p ,
    I am also using the same logic but in my program it is working fine so you declare the fieldsymols like this and try and also check the dynamic internal contain the data or not.
    FIELD-SYMBOLS : <y_i_table>  TYPE STANDARD TABLE,
                                 <y_wa_table> TYPE ANY.
      LOOP AT <y_i_table> ASSIGNING <y_wa_table>.
        MOVE-CORRESPONDING <y_wa_table> TO y_wa_vfscaid.
        APPEND y_wa_vfscaid TO y_i_vfscaid.
        CLEAR y_wa_vfscaid.
      ENDLOOP.

  • Data from dynamic internal table to be downloaded to App server

    Dear Friends,
    I have a a dynamically generated internal table  and it contains huge data.And my requirement is to download the same data with a deliminator into a text file in application server.
    Can you pls help me with the code....
    Thanks,
    jeevan.

    Hello Jeevan,
    PFB a code snippet for your requirement:
    DATA: v_dataset TYPE fileextern VALUE './test335.txt',
          v_dref TYPE REF TO data,
          v_data TYPE string.
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
                   <wa> TYPE ANY,
                   <val> TYPE ANY.
    CREATE DATA v_dref TYPE STANDARD TABLE OF ('T001').
    ASSIGN v_dref->* TO <itab>.
    SELECT * FROM ('T001') INTO TABLE <itab> UP TO 20 ROWS.
    OPEN DATASET v_dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    CHECK sy-subrc = 0.
    LOOP AT <itab> ASSIGNING <wa>.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE <wa> TO <val>.
        IF sy-subrc = 0.
          CONCATENATE v_data <val> INTO v_data SEPARATED BY ';'.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      TRANSFER v_data TO v_dataset.
      CLEAR v_data.
    ENDLOOP.
    CLOSE DATASET v_dataset.
    @Others: The OP wants to add a delimiter to the fields of a dynamic table.
    >
    jeevan kumar wrote:
    > I have a a dynamically generated internal table  and it contains huge data.And my requirement is to download the same data with a deliminator into a text file in application server.

  • Removing a character in a value from the internal table

    Hi guys!
    <b>example: i_table-field = "10,20"</b>
    I want to remove " " because creating csv creates this automatically because it has a value that includes comma. I am also using comma separator for my program so if I would remove the " " before splitting the values there will also be an effect on my program... can anyone can help me with this?
    thanks in advance! good day guys!

    Hi Michael,
    In the scenario of yours, you are left with two options.
    1. Format the XLS file properly before converting it to CSV. here If you convert the quantity, currency columns to the text columns then you will not get " into CSV file.
    2. Define the quantity, currency fields in your internal table as of type char. For eg. Curr of length 18, should be defined as fields of CHAR20 (two characters for " "), then once you separate all the fields based on comma, just repalce all the occurances of " using REPLACE.
    But what I suggest is better use option 1. The decision is totally depend on the number of time you want to use the program.
    Reward points if useful.
    Regards,
    Atish

  • Followup Question: Removing a character in a value from the internal table

    Hi guys!
    example: i_table-field = "10,20"
    I want to remove " " because creating csv creates this automatically because it has a value that includes comma. I am also using comma separator for my program so if I would remove the " " before splitting the values there will also be an effect on my program... can anyone can help me with this?
    thanks in advance! good day guys!
    Follow-up:
    I have resolved with my problem regarding " " but I found out that splitting the file with comma splits the "10,20" which is a single value for a field.
    it was also split into two values: (before removing the " ")
    "10
    20"
    can anyone can help me with this? thanks in advance! good day guys!

    Hi Atish,
    1. Format the XLS file properly before converting it to CSV. here If you convert the quantity, currency columns to the text columns then you will not get " into CSV file.
    What do you mean convert the quantity, currency columns to the text columns? Does this mean by changing the cell format into currency? when I made this the format change other values ie: 150000000772 turned to 150,000,000,772. Which I think will also split to values:
    150
    000
    000
    772
    But converting from xls to csv really removed the " ".
    So I resolved removing the " " with your answers before.. my problem now is that in a single field value 10,20. they are also separated. I need them to be in a singe value. thanks!

  • Need information on Dynamic internal table

    Hi All,
    I need some information on dynamic internal table.
    I want what are the field names and the values in dynamic internal table.
    Is there any function module, which tells us the field names and values of corresponding fields from a dynamic internal table ?
    Thank you very much in advance.

    Hi,
    Program to display/edit database tables dynamically.
    REPORT  zdyn_table_display.
    PARAMETERS: p_table TYPE tabname OBLIGATORY,
                p_rows  TYPE I.
    * Creation of dynamic internal table
    DATA: lv_dref             TYPE REF TO data.
    FIELD-SYMBOLS: <fs_table> TYPE STANDARD TABLE.
    DATA: lv_table  TYPE  string.
    START-OF-SELECTION.
    * Dynamic internal table.
      CREATE DATA lv_dref       TYPE TABLE OF (p_table).
      ASSIGN lv_dref->* TO <fs_table>.
      IF sy-subrc  EQ 0.
    *    EXIT.
      ENDIF.
    data i type i.
    * Get the data
      SELECT  *
            FROM (p_table)
            UP TO p_rows ROWS
            INTO TABLE <fs_table>.
      CONCATENATE 'Table contents : ' p_table INTO lv_table.
    * display the table control.
      CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
        EXPORTING
          header            = lv_table
          tabname           = p_table
          no_button         = space
        TABLES
          table             = <fs_table>
        EXCEPTIONS
          no_more_tables    = 1
          too_many_fields   = 2
          nametab_not_valid = 3
          handle_not_valid  = 4
          OTHERS            = 5.
      IF sy-subrc  EQ 0.
        EXIT.
      ENDIF.
    Getting internal table definition 
    Try this...
    DATA : l_descr_ref TYPE REF TO cl_abap_structdescr.
    l_descr_ref ?= cl_abap_typedescr=>describe_by_data( itab ).
    Now l_descr_ref->components holds the entire list of fields in itab.
    Thanks & Regards,
    ShreeMohan

  • Smartforms - pass dynamic internal tables

    Hello experts,
    In my smartform print program, I have created a dynamic internal table using method CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE where in my dynamic internal table <DYN_TABLE> is declared as
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>.
    I am populating <DYN_TABLE> and passing it on to my smartform. Now my question is, inside my smartform, how can I declare this dynamic table <DYN_TABLE> in form interface? Please let me know. Thanks.

    This could be one of the solution.
    1. Create table type using data element EDI_SDATA (char 1000) , say ZTTDYN .
    2. Use this as importing paramter your smarform.
    3. In print program transfer the content from dynamic internal table to internal table define using ZTTDYN. You can comma seperate then fields.
    4. Pass this comma separated internal table to smartform.
    5. And finally proces this data in smartform.

  • Logic for retreiving the values from a dynamic internal table

    Hi all,
    I have an issue with the logic to fetch data from a dynamic internal table into fields. let me give you guys an example the sy-tfill = 9 (subject to vary). I need to populate the fields.
    Regards,
    Sukumar

    Hi,
    this is for printing out the info in a dynamic table,
    it will work likewise to insert data.
    PARAMETERS:
      p_tabnam TYPE tabname DEFAULT 'DB_TABLE_NAME'.
    DATA:
      lv_dref TYPE REF TO data,
      ls_dd03l LIKE dd03l,
      lt_fieldname TYPE TABLE OF fieldname,
      ls_fieldname TYPE fieldname.
    FIELD-SYMBOLS:
      <fs> TYPE STANDARD TABLE,
      <wa_comp> TYPE fieldname,
      <wa_data> TYPE ANY,
      <wa_field> TYPE ANY.
    REFRESH lt_fieldname.
    SELECT * FROM dd03l INTO ls_dd03l
                       WHERE as4local = 'A'
                         AND as4vers  = '0000'
                         AND tabname  = p_tabnam
                       ORDER BY position.
      ls_fieldname = ls_dd03l-fieldname.
      APPEND ls_fieldname TO lt_fieldname.
    ENDSELECT.
    IF NOT ( lt_fieldname[] IS INITIAL ).
      CREATE DATA lv_dref TYPE TABLE OF (p_tabnam).
      ASSIGN lv_dref->* TO <fs>.
      SELECT * FROM (p_tabnam) INTO TABLE <fs>.
      WRITE:
        / 'CONTENTS OF TABLE', p_tabnam.
      LOOP AT <fs> ASSIGNING <wa_data>.
        SKIP.
        WRITE:
          / 'LINE', sy-tabix.
        ULINE.
        LOOP AT lt_fieldname ASSIGNING <wa_comp>.
          ASSIGN COMPONENT sy-tabix OF STRUCTURE <wa_data> TO <wa_field>.
          WRITE:
            / <wa_comp>, <wa_field>.
        ENDLOOP.
      ENDLOOP.
    ENDIF.
    grtz
    Koen

Maybe you are looking for

  • Types of alerts in PI 7.3

    Hi , May i know the types of alerts in sap pi 7.3

  • Need help writing a script to traverse through files in a directory

    I want to go through a directory and sub directories and convert files into jpg ones I have this code I've been using: mkdir jpegs; sips -s format jpeg *.png --out jpegs This is great for one directory at a time But, what I want is to apply this to a

  • Can I watch sky go from my iPad through my apple tv

    Can I watch sky go from my iPad through my apple tv

  • Text related

    In SD, it is possible to give a pop-up screen during Modernity and Invoicing when certain text-blocks exist : - ORDER ENTRY : when customer memo is foreseen (can be copied from masterdata) when customer account memo is foreseen (can be copied from ma

  • Mapping Number with the Name

    Hi I am using Nokia 5700. i have saved say a mobile number 9823345658 on my phone and saved it as XYZ. so whenever i dial this number it will show that i am dialing XYZ. But the problem comes now, when i changed either of the 2nd or 3rd or 4th digit