2008 Mar 11 2:03 PM
Hi Friends,
I have an internal table itab1 which has a column called zpo_number .
I am getting the PO from a BAPI call storing in a field w_ponumber.
I have the code below . THe table itab1 has rows all having the same matnr .
How can I modify all the rows of the table with the same w_ponumber ?
Thanks!
Loop at itab1
...
babpi call get po number
w_ponumber.
MODIFY itab1
endloop.
2008 Mar 11 2:09 PM
Loop at itab1
at first.
babpi call get po number
w_ponumber.
MODIFY itab1 TRANSPORTING w_ponumber WHERE
matnr = itab1-matnr.
endat.
endloop
Hi Friends,
I have an internal table itab1 which has a column called zpo_number .
I am getting the PO from a BAPI call storing in a field w_ponumber.
I have the code below . THe table itab1 has rows all having the same matnr .
How can I modify all the rows of the table with the same w_ponumber ?
Thanks!
Loop at itab1
...
babpi call get po number
w_ponumber.
MODIFY itab1
endloop.
2008 Mar 11 2:09 PM
Loop at itab1
at first.
babpi call get po number
w_ponumber.
MODIFY itab1 TRANSPORTING w_ponumber WHERE
matnr = itab1-matnr.
endat.
endloop
2008 Mar 11 2:14 PM
I tried that .. I am getting an error that
"No component exists with the name w_ponumber "
The itab1 has field name z_ponumber .
Please advise .
2008 Mar 11 2:17 PM
write as :
Loop at itab1
at first.
babpi call get po number
w_ponumber.
z_ponumber = w_ponumber.
MODIFY itab1 TRANSPORTING z_ponumber WHERE
matnr = itab1-matnr.
endat.
endloop
2008 Mar 11 2:41 PM
LOOP AT T_CHILD .
MOVE T_CHILD-EBELN TO Z_EBELN.
MOVE T_CHILD-TXZ01 TO Z_TXZ01.
READ TABLE T_CHILD INDEX Z_INDEX INTO T_ZCHILD .
MOVE Z_EBELN TO T_ZCHILD-EBELN.
MOVE Z_TXZ01 TO T_ZCHILD-MATNR.
MODIFY T_CHILD FROM T_ZCHILD INDEX Z_INDEX TRANSPORTING EBELN MATNR.
ENDLOOP.This is the code for modification of internal table
2008 Mar 11 2:45 PM
simplicity change to your original code provided:
Loop at itab1
...
babpi call get po number
w_ponumber.
itab1-z_ponumber = w_ponumber.
MODIFY itab1
endloop.
-
Or -
Loop at itab1
...
babpi call get po number
itab1-z_ponumber.
MODIFY itab1
endloop.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |