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 Views

Ash_ok
Contributor
0 Likes
5,158

Hi !

Am trying to create a CDS view between PRHI (WBS Element hierarchy) and PRPS (WBS Elements) to get both internal and external numbers of WBS Elements in their hierarchical format.

I am able to use the 'UP' / 'DOWN' columns of PRHI in my CDS view but calling either PRHI-LEFT or PRHI-RIGHT is giving an 'Unexpected word <left> / <right>' error. Is there an escape sequence to call table field names with either LEFT or RIGHT ? PRHI-UP and PRHI-DOWN seem to work normally. And, yes, I am using an alias for PRHI as well as PRPS.

TIA,

Ashok.

1 ACCEPTED SOLUTION
Read only

steck_andreas
Newcomer
4,006

I have used a database view to give the fields "left" and "right" in PRHI alias names. The view can then be used in the CDS view and you can avoid the reserved terms in the CDS view:

CDS view:

Hi !

Am trying to create a CDS view between PRHI (WBS Element hierarchy) and PRPS (WBS Elements) to get both internal and external numbers of WBS Elements in their hierarchical format.

I am able to use the 'UP' / 'DOWN' columns of PRHI in my CDS view but calling either PRHI-LEFT or PRHI-RIGHT is giving an 'Unexpected word <left> / <right>' error. Is there an escape sequence to call table field names with either LEFT or RIGHT ? PRHI-UP and PRHI-DOWN seem to work normally. And, yes, I am using an alias for PRHI as well as PRPS.

TIA,

Ashok.

5 REPLIES 5
Read only

chandu_bhanuri
Explorer
0 Likes
4,006

I am facing similar issue, please provide solution in case if you are able to resolve it.

Read only

sgkrish07
Explorer
4,006

Can anyone please answer this question?

Read only

Former Member
0 Likes
4,006

I am facing the same issue. Did you find a resolution?

Read only

steck_andreas
Newcomer
4,007

I have used a database view to give the fields "left" and "right" in PRHI alias names. The view can then be used in the CDS view and you can avoid the reserved terms in the CDS view:

CDS view:

Read only

0 Likes
4,005

Nice outside the box solution !