cancel
Showing results for 
Search instead for 
Did you mean: 

Correct mapping of NUMC

Former Member
0 Kudos

Hi,

After upgrade to SAP_GWFND 740 SP7 we are getting some errors due to mapping of NUMC to edm.string. Can anyone tell me the correct and recommended way of mapping NUMC to an EDM datatype?

From the best practices here OData Best Practices - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library I can tell that mapping to decimal and int is not recommendend. In SAP note 1977590 it is described that mapping to string will give error whilst mapping to decimal might only give a warning. Also in this post it is described that a warning is the outcome. But I can't find anywhere describing the best way to map NUMC.

Can anyone guide me?

Best regards

Jan

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor

Hello Thomas,

Map to Edm.String with max length respectively.

Regards,

Ashwin

Former Member
0 Kudos

Hi , and others,

The problem is that when we try to use edm.string with max length 8 as shown below for mapping numc of length 8 we get the compile error below. Do you think it is a product error -> OSS?

kammaje_cis
Active Contributor
0 Kudos

Jan, What you are seeing is actually a warning (appears as an error, I agree). Service Builder allows you to generate runtime artefacts and the service will work as expected. There are other errors for which service builder will stop you from generating runtime artefacts.

Coming to the right mapping,

Since we do not have a exact mapping type in ABAP, If you expect a number I would map to a integer/decimal, else I would map to a string. It has worked in my scenarios. My two cents.

Former Member
0 Kudos

Yes that is also what we have found now. A bit misleading that it actually looks like an error in the tool.

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

NUMC should can be mapped to Edm.String

I done test with importing DDIC structure /BI0/SFISCYEAR having data element FISCYEAR of type NUMC with length 4 and it created property having EDM type as string with max length 4.

So somewhere in the standard code, the mapping happens between DDIC fields with corresponding EDM types and for NUMC it is Edm.String.

Regards,

Chandra