11-20-2008 5:57 AM
Hi Friends.,
How to modify the internal table without using MODIFY statement?
Thanks,
Naveen.I
11-20-2008 6:02 AM
Hi Naveen,
please note if i am not wrong.
how can you expect the system to modify an interanl table without we write a code which is given by the ABAP Key words.
please use modify statement.
and i think even if you use field symbols then also the FS will not modify your internal table.
may subroutines if you pass the value by reference and the form gets executed till the end , you may modify the values.
hope this will serve your purpose.
thanks and regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Nov 20, 2008 7:03 AM
11-20-2008 5:58 AM
Hi,
Use Field Symbols
Something like this
DATA : itab TYPE TABLE OF string,
wa TYPE string.
FIELD-SYMBOLS : <wa> TYPE string.
wa = 'ABC'.
APPEND wa TO itab.
wa = 'ABC'.
APPEND wa TO itab.
wa = 'ABC'.
APPEND wa TO itab.
LOOP AT itab ASSIGNING <wa>.
<wa> = 'DEF'.
ENDLOOP.
Regards
Edited by: Rajvansh Ravi on Nov 20, 2008 7:02 AM
11-20-2008 6:02 AM
Hi Naveen,
please note if i am not wrong.
how can you expect the system to modify an interanl table without we write a code which is given by the ABAP Key words.
please use modify statement.
and i think even if you use field symbols then also the FS will not modify your internal table.
may subroutines if you pass the value by reference and the form gets executed till the end , you may modify the values.
hope this will serve your purpose.
thanks and regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Nov 20, 2008 7:03 AM
11-20-2008 6:03 AM
11-20-2008 6:03 AM
Following way you can modify the internal table...
Modify... {TABLE itab}|{itab INDEX idx} FROM wa [TRANSPORTING comp1 comp2 ...] [result].
Modify... itab FROM wa TRANSPORTING comp1 comp2 ... WHERE log_exp.
Modify... { ASSIGNING <fs> [CASTING] }
| { REFERENCE INTO dref }.
Edited by: avinash kodarapu on Nov 20, 2008 11:34 AM
Edited by: avinash kodarapu on Nov 20, 2008 11:34 AM
11-20-2008 6:23 AM
Hi,
you cannot modify internal table without using modify statement.
yes if you want to jst add new record in internal table use append ststemet.
Thanks & Regards
11-20-2008 8:30 AM
MODIFY itab.
MODIFY itab INDEX sy-tabix.
MODIFY itab TRANSPORTING name1 s_customer WHERE kunnr = itabkunnr
11-20-2008 9:21 AM
If this is just a question to know if it can be done, then you could transfer a row to a workarea, delete the row from the table, modify the workarea and append it back to your internal table
You may then need to sort your table
However practically.. this would never be done