Skip to Content

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

select distinct fields into itab

Is it possible to create a select distinct statement for a structure where only one field should be distinct.


data: ta_vbrk type standard table of vbrk. 

select vbeln vkorg vtweg (distinct kunag)
  into corresponding fields of ta_vbrk
  where auart = 'xxxx'
     and vtweg = 'yy'

My goal is to fill out the four fields ta_vbrk record but only for the kunag once.

I hope that's clear. It's hard to state when you don't know how to do it

Former Member
Former Member replied

Select all rows and then do a delete duplicates on column3 afterwards. There is no such functionality in SQL. Do not forget to sort the internal table before deleting the duplictaes.

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