Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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