Application Development and Automation 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: 
Read only

Web Services from ABAP function modules return values- leading zeros

Former Member
0 Likes
511

I am using several web services from SAP CRM (5.0) that were created from Function modules ( I am assuming that that they are in ABAP).

I can call the web services fine and they work as expected, but I am seeing a lot of leading zeros in the return values of fields in tables from the Web service.

The ABAP er’s are telling me that they cannot see the leading zero’s.

So my question is where these are appended to the values in the whole process. When I execute the Function Module in SAP CRM from transaction SE37 I can see the leading zeros. So I think that this is something that has to be handled by the ABAP er’s and not in the client consuming the web service.

Are the functions in SAP CRM that can remove leading zeros for fields in a table (that is an export parameter?)

Jawahar

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
436

Hello Jawahar

If you run your (RFC-enabled) function modules using the SAP-GUI (i.e. in dialog) then the GUI automatically replaces leading zero when the function module returns any data. However, calling the same function module remotely you will always see these leading zeros.

These so-called conversion exits are defined as attribute of domains in the ABAP dictionary. If the function module used for the WebService is a standard fm then you have little chances to get rid of the leading zero. Perhaps the WebService has some attribute to suppress conversion exits or activate them when retrieving the data.

Regards,

Uwe

2 REPLIES 2
Read only

uwe_schieferstein
Active Contributor
0 Likes
437

Hello Jawahar

If you run your (RFC-enabled) function modules using the SAP-GUI (i.e. in dialog) then the GUI automatically replaces leading zero when the function module returns any data. However, calling the same function module remotely you will always see these leading zeros.

These so-called conversion exits are defined as attribute of domains in the ABAP dictionary. If the function module used for the WebService is a standard fm then you have little chances to get rid of the leading zero. Perhaps the WebService has some attribute to suppress conversion exits or activate them when retrieving the data.

Regards,

Uwe

Read only

0 Likes
436

Thank you for the reply.

jawahar