on 06-25-2008 6:24 AM
Hi friends,
I have created a layout fo medruck for which i'm using the standard driver program. In one window i'm using the perform statement for collecting values from the program for which im using the itcsy structure intab & outab. Here in my internal table i'm getting 2 values. My second value is over-writing the first value and getting displayed in the lay-out.
This is myy code.
LOOP AT it_cdpos.
IF sy-subrc = 0.
READ TABLE outab INDEX 6.
MOVE it_cdpos-matnr TO outab-value.
SHIFT outab-value LEFT DELETING LEADING '0'.
MODIFY outab INDEX sy-tabix.
READ TABLE outab INDEX 7.
MOVE it_cdpos-desp TO outab-value.
MODIFY outab INDEX sy-tabix.
READ TABLE outab INDEX 8.
MOVE it_cdpos-meins TO outab-value.
MODIFY outab INDEX sy-tabix.
READ TABLE outab INDEX 9.
MOVE it_cdpos-value_old TO outab-value.
MODIFY outab INDEX sy-tabix.
READ TABLE outab INDEX 10.
MOVE it_cdpos-value_new TO outab-value.
MODIFY outab INDEX sy-tabix.
READ TABLE outab INDEX 11.
MOVE it_cdpos-prdat TO outab-value.
MODIFY outab INDEX sy-tabix.
READ TABLE outab INDEX 12.
MOVE it_cdpos-maktx TO outab-value.
MODIFY outab INDEX sy-tabix.
ENDIF.
ENDLOOP.
here only my latest value is updating, but i need all the values to get updated... PLZ help me...
Thanks and regards,
subbu.
self answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Change the code such that read the table with name instead of index and update the same.
ITCSY contain name and value, use the name while reding from input table and update outtable.
Bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sy-tabix will be same for all the Modify statements here...Thats wy the modification is done for the last read statement...
Rather u use
MODIFY outab INDEX 6.
MODIFY outab INDEX 7.
:
:
and so on ..in place of the modify statements that u have used....
Reward points...if the above helps....
Edited by: Rudra Prasanna Mohapatra on Jun 25, 2008 7:35 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your reply. My Problem is same field is having multiple values which is not getting displayed in my lay-out. Values are correctly getting updated in correct fields in outab. But in case of multiple values for same field... last values is over-writing the previous field value.
Subbu.
hi...
when u r modifying the out_tab index should be the index using which u have read the table... not the sy-tabix
check that
that should solve ur problem
regards
padma
Edited by: Padmavathi Palli on Jun 25, 2008 7:33 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.