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
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.