Correct mapping of NUMC
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 NUMC to Edm.Decimal or Edm.IntXX per best practicesfrom SP8 - But how? 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?
Krishna Kishor Kammaje replied
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.