‎2007 Jan 11 2:28 PM
Hi,
I am using <i>ASSIGN COMPONENT name OF STRUCTURE struc TO <fs></i> to move a value from a dynamic structure to a field. Ex:
<b>DATA: my_structuture TYPE REF TO data.
FIELD-SYMBOLS: <my_struct> TYPE ANY,
<input> TYPE ANY.
ASSIGN COMPONENT i_zmapparam-zinfield OF STRUCTURE
<my_struct> TO <input>.</b>
what I would like to know is how I can map the field <input> to a field and add it to a new dynamic table.
I would appreciate any suggestions - thank you.
Kind regards,
Michael Nielsen
Message was edited by:
Miroslav Holecy
‎2007 Jan 11 2:38 PM
try this..
lets say new_table is ur dynamic table , then
FIELD-SYMBOLS : <it_final> TYPE STANDARD TABLE,
<wa_final> TYPE ANY,
<w_field> TYPE ANY.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcatalog
IMPORTING
ep_table = new_table
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN new_table->* TO <it_final>.
*********CREATE WORK AREA****************************
CREATE DATA new_line LIKE LINE OF <it_final>.
ASSIGN new_line->* TO <wa_final>.
<wa_final>-field1 = <input>.