10-09-2007 5:16 AM
Hi i have some record in internal table.Based on one field or two field i have to add another field for some matching records lke " DELETE ADJACENT DUPLICATES " so can u help me pls
10-09-2007 5:22 AM
declare internal table will all fields
loop at internal table
check your first or seconde field
if value is true add value in third field
modify tbale at this place
endif.
endloop.
10-09-2007 5:22 AM
You can do this to populate value for other fields.
LOOP AT ITAB.
L_TABIX = SY-TABIX.
SELECT <FIELD> FROM <TABLE> INTO ITAB-<FIELD3>
WHERE FIELD1 = ITAB-FIELD1 AND
FIELD2 = ITAB-FIELD2.
IF SY-SUBRC EQ 0.
MODIFY ITAB INDEX L_TABIX TRANSPORTING FIELD3.
ENDIF.
ENDLOOP.
Why do you need Delete Adjacent duplicates? It is used to delete adjacent duplicate records from internal table.
What is your exact requirement?
ashish
10-09-2007 5:24 AM
Hi,
if u want to add numeric fields based on other fields(char , dat e, time..), then u can use " COLLECT statement".
revt back if any issues,
reward with points if helpful,
Regards,
Naveen