Skip to Content
-1
May 09, 2018 at 05:24 PM

ABAP CDS Select for current user ($session.user) or all

1631 Views Last edit May 09, 2018 at 07:13 PM 2 rev

Hello Experts,

I have a big CDS view (SALESHEADER - lots of conditions) used by another CDS view (SLS_HDR). My requirement is to read SLS_HDR CDS records for current user.

I used, where kunnr = $session.user, it worked.

Now the need is to read ALL the record if the $session.user doesn't even exist in kunnr in SLS_HDR. I thought of using CDS table function, but limitation with table function is that, i can't use CDS view in CDS table function.

Can anyone guide how to solve this issue. Please help.

Thanks,

Anurag.