Skip to Content
0
Jan 07, 2008 at 06:02 AM

Looping Problem-Index

27 Views

Dear all,

I am unable to get the index read correctly for my IT_DISPLAY table.There are 2 values in plaf table and multible in display table.

how to get the correct index value for my display table?since currently it is on plaf table.due to this index problem,my values get moved incoreectly

code is as follows

SORT IT_AFPO BY PLNUM.

SORT IT_PLAF BY PLNUM.

LOOP AT IT_AFPO INTO WA_AFPO.

LOOP AT IT_PLAF INTO WA_PLAF.

W_INDEX = SY-TABIX.

IF WA_PLAF-PLNUM = WA_AFPO-PLNUM.

MOVE:WA_PLAF-GSMNG TO WA_DISPLAY-GAMNG.

MODIFY IT_DISPLAY INDEX W_INDEX FROM WA_DISPLAY TRANSPORTING GAMNG.

ENDIF.

CLEAR:WA_PLAF,WA_DISPLAY.

ENDLOOP.

CLEAR:WA_AFPO.

ENDLOOP.