Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8635

Extract values of column into table with filtering for initals / duplicates

$
0
0

Hello,

 

with the new "corresponding" syntax it's easy to extract the values of a specific column of an internal table into another table.

E.g. I have a "data table" which has columns for foreign keys. Those columns can contain duplicates but also empty keys. Is it possible with e.g. only one line of code to extract those keys and also to delete duplicates / filter initial values?

 

Here is my current coding but I would like to get rid of the "delete" statements:

 

    lt_key = CORRESPONDING #( lt_data MAPPING key = ref_key ).
    DELETE lt_key WHERE key IS INITIAL.
    DELETE ADJACENT DUPLICATES FROM lt_key.


Thanks

Patrick


Viewing all articles
Browse latest Browse all 8635

Trending Articles