Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

delete adjacent duplicates

hi ,

please correct the following code...

1.if not t_knvv is initial.

2.sort t_knvv by kunnr eikto.

3.delete adjacent duplicates from t_knvv comparing kunnr eikto.

4.select bukrs eikto

5.from lfb1

6.into table t_lfb1

7.for all entries in t_knvv

8. where eikto = t_knvv-eikto.

9.endif.

t_knvv has 2 flds kunnr,eikto and has one row of data( i can see this when i debug in line 1). now when i press F5 and see the value of t_knvv-eikto in lline 8 , it is showing null and i dont get any selection into table t_lfb1.

i dont understand what is wrong..please correct this..

Thanks,

Challa.

Tags:
Former Member
Former Member replied

Here is the updated code.

2.sort t_knvv by kunnr eikto.

3.delete adjacent duplicates from t_knvv comparing kunnr eikto.

1.if not t_knvv[] is initial.

4.select bukrs eikto

5.from lfb1

6.into table t_lfb1

7.for all entries in t_knvv

8. where eikto = t_knvv-eikto.

9.endif.

t_knvv has 2 flds kunnr,eikto and has one row of data( i can see this when i debug in line 1). now when i press F5 and see the value of t_knvv-eikto in lline 8 , it is showing null and i dont get any selection into table t_lfb1.

Check above code. Also as you are using FOR ALL ENTRIES, also populate LIFNR into table T_LFB! in order to get all unique entries.

Hope this helps.

ashish

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question