Handling Long Field Names in OData / RAP API’s
Share

Requuirement:-

While working with OData services in SAP, you might encounter an issue when sending long field
names like: PuchaseOrdernosendtosalesforcesystem

In such cases, your CDS view might throw an error due to the length or naming restriction.

1.jpg

Error Description

2.jpg

 

Solution

Use the annotation below to define the desired long field name explicitly:

@odata.property.name: ‘PuchaseOrdernosendtosalesforcesystem’

3.jpg

After adding this annotation, activate your CDS view, and then create:

  • Service Definition
  • Service Binding (V4)

Output on POSTMAN / SAP Gateway

4.jpg5.jpg

This simple technique helps you maintain meaningful field names without breaking technical limits in Odata API’s.

Thanks

Dinesh Kumar

 

  Read More Technology Blog Posts by Members articles 

#abap

By ali