2006 Dec 02 9:14 AM
Hi everyone,
Im have 2 internal tables.
say ITAB and JTAB
In ITAB In JTAB
say <b>hr pln</b> say <b> hr qty</b>
1-2 20 1-2 5
2-3 30 2-3 10
3-4 40 3-4 20
4-5 60
5-6 90
Now my requirment is i want to move JTAB-qty to
ITAB with respect to ITAB-hr.
Plz send me the logic.
Its vry urgent.
thanks in advance.
2006 Dec 02 9:22 AM
Try this,
LOOP AT ITAB.
READ TABLE JTAB WITH KEY HR = ITAB-HR.
IF SY-SUBRC EQ 0.
ITAB-QTY = JTAB-QTY.
MODIFY ITAB TRANSPORTING QTY.
ENDIF.
ENDLOOP.
or this,
FIELD-SYMBOLS: <FS_ITAB> LIKE LINE OF ITAB.
LOOP AT ITAB ASSIGNING <FS_ITAB>.
READ TABLE JTAB WITH KEY HR = <FS_ITAB>-HR.
CHECK SY-SUBRC EQ 0.
<FS_ITAB>-QTY = JTAB-QTY.
ENDLOOP.
Regards
Kathirvel
2006 Dec 02 9:22 AM
Try this,
LOOP AT ITAB.
READ TABLE JTAB WITH KEY HR = ITAB-HR.
IF SY-SUBRC EQ 0.
ITAB-QTY = JTAB-QTY.
MODIFY ITAB TRANSPORTING QTY.
ENDIF.
ENDLOOP.
or this,
FIELD-SYMBOLS: <FS_ITAB> LIKE LINE OF ITAB.
LOOP AT ITAB ASSIGNING <FS_ITAB>.
READ TABLE JTAB WITH KEY HR = <FS_ITAB>-HR.
CHECK SY-SUBRC EQ 0.
<FS_ITAB>-QTY = JTAB-QTY.
ENDLOOP.
Regards
Kathirvel
2006 Dec 02 9:44 AM
2006 Dec 02 9:45 AM
hi ,
if kathirvel solved ur problem, pls mark him 10 points.
rgds
Anver
2006 Dec 02 9:39 AM
hi,
chk this.
loop at itab.
read table jtab with key hr = itab-hr transporting qty.
if sy-subrc = 0.
itab-qty = jtab-qty.
modify itab transporting qty.
endif.
endloop.Regards
Anver
2006 Dec 02 9:46 AM
Hi Stanley
Hope your problem is solved, kinldy close the thread. If the posts are helpful please reward points which were helpful to you.
Regards
Kathirvel
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |