on 2024 Feb 26 2:50 AM
Hello experts,
I have created CDS table function like below
Class:
The output:
I want to remove the highlighted entries using the subquery/CASE or conditions in AMDP. please suggest possible options/statements in AMDP
Request clarification before answering.
Hello Sankar,
I understand that you need to remove adjancent duplicates from your data.
For acheiving this there is ROW_NUMBER() function in SQL. attaching code for reference.
output table =
select
client as client ,
bukrs AS bukrs,
ANLN1 AS ANLN1,
ANLN2 AS ANLN2,
AFABE as AFABE,
BZDAT as BZDAT,
row_number ( ) OVER ( PARTITION BY client, BUKRS, ANLN1, ANLN2, AFABE
ORDER BY BZDAT ASC ) AS rank_asc
from faav_anep;
select
client as client ,
bukrs AS bukrs,
ANLN1 AS ANLN1,
ANLN2 AS ANLN2,
AFABE as AFABE,
BZDAT as FDT
from :output_table
WHERE rank_asc = 1 ;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.