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: 

numc field in CDS condition

former_member625844
Participant
0 Kudos
1,830

I wrote a CDS view like below

define view z_cds_09
  with parameters  pon : ebeln
  as select from   ekko
    join  ekpo  on ekpo.ebeln = ekko.ebeln and ekpo.ebelp = 10

And it has error ' Data type confilct for EKPO.EBELP', I also tried 'ekpo.ebelp = '10'' and still not working. So what's the correct way to compare a NUMC field? Thx.

1 ACCEPTED SOLUTION

geert-janklaps
SAP Mentor
SAP Mentor
918

Hi,

You'll need to use ekpo.ebelp = '00010' to do the comparison. (ebelp is a numc field of 5 characters, so you'll need to add the leading zero's to do a proper comparison)

Best regards,

Geert-Jan Klaps

1 REPLY 1

geert-janklaps
SAP Mentor
SAP Mentor
919

Hi,

You'll need to use ekpo.ebelp = '00010' to do the comparison. (ebelp is a numc field of 5 characters, so you'll need to add the leading zero's to do a proper comparison)

Best regards,

Geert-Jan Klaps