Application Development 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: 

Properties name in custom odata with more than 40 chars ?

FabienHenique
Participant
0 Kudos

Hello community,

We have a customer requirement where we need to build an odata service in SEGW with some property name arround 50 chars.

It seems that there is a limitation to 40, do you know if it's possible to jump over this?

  • SAP Managed Tags:
1 ACCEPTED SOLUTION

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

Names of properties of OData V2 services are based on the following domain.

Therefore it is not possible to use longer names for the properties of an OData V2 service.

/iwbep/med_external_name char(40)

It might be an option to use an OData V4 service instead.

The class

lo_primitive_property type ref to /iwbep/if_v4_med_prim_prop

has a method set_edm_name( ) which takes parameters of the following type

type /iwbep/if_v4_med_types=>ty_e_med_edm_name where

ty_e_med_edm_name type c length 128

When building an OData V4 service I we recommend NOT to use SEGW but to use a plain code based implementation instead.

ceterum censeo RAP esse utendam
  • SAP Managed Tags:
4 REPLIES 4

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

On which release are you working?

750, 751, 752 ?

Or are you running on top of an SAP S/4HANA Release?

Kind regards,

Andre

ceterum censeo RAP esse utendam
  • SAP Managed Tags:

FabienHenique
Participant
0 Kudos

Hello andre.fischer ,

Customer is still on ECC EHP8, 750.

  • SAP Managed Tags:

Andre_Fischer
Product and Topic Expert
Product and Topic Expert

Names of properties of OData V2 services are based on the following domain.

Therefore it is not possible to use longer names for the properties of an OData V2 service.

/iwbep/med_external_name char(40)

It might be an option to use an OData V4 service instead.

The class

lo_primitive_property type ref to /iwbep/if_v4_med_prim_prop

has a method set_edm_name( ) which takes parameters of the following type

type /iwbep/if_v4_med_types=>ty_e_med_edm_name where

ty_e_med_edm_name type c length 128

When building an OData V4 service I we recommend NOT to use SEGW but to use a plain code based implementation instead.

ceterum censeo RAP esse utendam
  • SAP Managed Tags:

Thanks Andre, It works like a charm!

  • SAP Managed Tags: