Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

Former Member
0 Likes
3,213

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.

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.

0 REPLIES 0