on 02-28-2005 4:43 AM
How does MODIFY command works in internal table without header line.
Following is the code I am using but it is not working:
LOOP AT lt_migo_badi_new INTO lt_migo_badi_wa.
MOVE i_line_id TO lt_migo_badi_wa-line_id.
MODIFY TABLE lt_migo_badi_new FROM lt_migo_badi_wa
TRANSPORTING
line_id WHERE line_id = '0000'.
ENDLOOP.
Hi,
Try it without the WHERE condition. First of all WHERE is not required as the MODIFY statement is being called from within the loop. Secondly as per your WHERE condition, it will modify only for line_id = '0000' which won't be satisfied as you are moving some value to line_id just before the MODIFY statment. Also check whether sy-subrc = 0 immediately after MODIFY to ensure that it's working.
regards,
Madhavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
MOdify statement depends on the type of tables you basically use. If you are changing the table using The table key, then use the following statement.
<b> MODIFY TABLE <itab>
FROM <wa> [TRANSPORTING <f1> <f 2> ...</b>].
If you are changing several lines using a condition, then use
<b>MODIFY <itab>
FROM <wa> TRANSPORTING <f1> <f 2> ... WHERE <cond>.</b>
The above commands are applicable for all table types.
for further reference click the link below
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm
If you are working on index tables then use the following to change single line..
<b> MODIFY <itab> FROM <wa> [INDEX <idx>] [TRANSPORTING <f1> <f 2> ... ].</b>
for further reference click the link below
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb37b2358411d1829f0000e829fbfe/content.htm
Regards,
Vara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the following code.
Regards
Vinay
LOOP AT lt_migo_badi_new INTO lt_migo_badi_wa.
MOVE i_line_id TO lt_migo_badi_wa-line_id.
MODIFY lt_migo_badi_new FROM lt_migo_badi_wa
TRANSPORTING line_id WHERE line_id = '0000'.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is the value of SY-SUBRC after the operation? Secondly, what is the type of your internal table (standard, sorted, hashed). The documentation says that: <b>If the table has the type SORTED TABLE or HASHED TABLE, the TRANSPORTING list may not contain key fields.
</b>
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.