2009 Oct 29 9:18 AM
Hi!!!
I wants to modify a dynamic itab in a Z-programme which takes inputs. But I can not use the normal itab modifying syntax for it. Therefore I needs to find out a way to modify this itab and it is really essential for my programme.
Please help me on this...
Thanking You,
Yohan.
Hi!!!
I wants to modify a dynamic itab in a Z-programme which takes inputs. But I can not use the normal itab modifying syntax for it. Therefore I needs to find out a way to modify this itab and it is really essential for my programme.
Please help me on this...
Thanking You,
Yohan.
2009 Oct 29 9:25 AM
Hello,
did you try using field symbols?
Field-Symbols: <line> like line of myTab.
LOOP AT myTab assining <line>.
<line>-mycomonent = 'a'.
ENDLOOP.
Does that help?
2009 Oct 29 9:25 AM
2009 Oct 29 9:42 AM
Thanks for the prompt replies.
Dear Amit,
I have already done the things mention in the link you sent me. This is ok for when I loop the dynamic itab step by step. So it will modify the itab, line by line. But, what I wants to do is modify an itab field which have the same key in multiple lines.
For an example say in my structure I have material #. I wants to update all the rows of column 'material description' which have the same material #.
This is where I have stucked...
Please help me...
Thanking you,
Yohan.
2009 Oct 29 10:12 AM
You so mean to do this without loop and assigning?
I donu2019t know the way changing the Dynamic internal tables without a loop whereas we do have the option for modify the static internal tables without loop like:
itab FROM wa TRANSPORTING comp1 comp2 ... WHERE log_exp
2009 Oct 29 11:53 AM
2009 Oct 29 1:12 PM
DATA: lp_data TYPE REF TO DATA.
FIELD-SYMBOLS: <wa> TYPE ANY,
<field1> TYPE ANY.
CREATE DATA lp_data LIKE LINE OF input_table.
ASSIGN lp_data->* TO <wa>.
READ TABLE input_table WITH KEY ('FIELD1') = val1 ('FIELD2') = val2 INTO <wa>.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <wa> TO <fld>.
<fld> = 'New Value'.
MODIFY TABLE input_table FROM <wa>.Might give you some ideas. Also have a look at some of my posts from last month - I think I've covered something similar.
matt
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |