cancel
Showing results for 
Search instead for 
Did you mean: 

Why the name change for internal structures?

Former Member
0 Kudos

If I model a structure in the ESR, using a name like dtXYZ, with attributes FirstName and LastName, why does SAP change the names to

DT_XYZ, FIRST_NAME, LAST_NAME when you look at them in the internal view of SPROXY? The external names are not changed.

They appear to be placing an underscore when the case changes when creating the data type proxy (via SPROXY) internal view.

Ideas?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

While you are creating proxy, several ABAP objects are created,

External view: is original view of service as it looks from outside.

Internal view: ABAP objects created by SOA framework of SAP.

Internal view is used by programmer for coding and framework is responsible between mapping external and internal view.

Why SAP generate its object: these objects are as per naming rules followed by SAP (limits on number of char, size etc) and there are no rule how they should be generated (i.e underscore etc).

There could be conflict as well with other objects thats why SAP ask to provide prefix so that conflict with other objects can be avoided.

As a programmer/Service developer we are only interested in ABAP objects or internal view, rest is taken care by SOA framework of SAP.

Regards,

Gourav

Former Member
0 Kudos

I completely agree with adding of the prefix for internal objects. What I am questioning is why they chose to change the name based on the case of the structure.

Try it - create a data type in the ESR using the values I supplied. Then go in SPROXY in your provider system and see how SAP changes the internal names.

If I define data type dtXYZ, then go in an implement the proxy with a prefix ZWS, then I get internal view object ZWSDT_XYZ. Why is the underscore added?

sivasatyaprasad_yerra
Active Contributor
0 Kudos

Underscore( _ ) will be added in the variable, wherever ESOA framework gets capital letter in the variable name. So, in case if the variable is declared as EmpFirstName then generated object will have EMP_FIRST_NAME.

Former Member
0 Kudos

Correct, this was my finding as well. My question is, why did they do this? Was it to make the internal name different than the external? I dont see the logical reason why they needed to do this.

Former Member
0 Kudos

Hi,

Well you are right there is apparently no reason to change name. But not always xml names and xsd types are compatible with abap data type and abap field name rules (i.e. lenght of string).

I belive they change data type based on preset rule of verb, noun and adjective.

So if you give something like FirstName it become First_Name.

But if you give only Name it will remain Name (or NAME as it is not case sensitive in ABAP).

So if you give fieldname which doesn;t make any sense like "xyzswdroeks" they will not be able to break it. And only breaking of it will be after 4-5 chars.

But as I said before it is not a concern of ABAPer and outside world as nothing change for outside world and ABAPer will focus on internal view.

Regards,

Gourav

Answers (0)