cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent extra space being removed by SAP Gateway

Former Member
0 Kudos

Hello Experts,

Thank you for reading this.

I have a simple SAP GW scenario where I have implemented Get Entity Set method to get data via a RFC call to backend. In the return structure of the RFC we have a field(char80) which bears double spaces, for certain input. Example, 'Xyz &  abc', mind the double space between '&' and 'abc'.

I need the output to be similar. But, GW response shows output as 'Xyz & abc', i.e., without the extra space, but I need it exactly as it comes from backend.

After debugging I found out that RFC call is fine and also content of lr_entityset at the end of GET ENTITY SET method, also has the extra space, as desired. Somewhere later this may be operated on.

Could not find exactly where this extra space is getting removed.

I would like to know if there is a way to prevent this, especially without trying to modify/enhance any standard code.

Regards,

Addy

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Experts,

Still have not found a resolution to this one. Please guide towards any alternative approaches.

Looping

Thank you.

Regards,

Addy

brian_zhu
Explorer
0 Kudos

Hi Addy,

i do not have this issue as i am on Netweaver 740, sp8. here is the test i have done on my system.

i think the GW SP is the direction for you to solve the problem.

regards,

Yueqiang

Former Member
0 Kudos

Hello Yueqiang,

Thanks for your reply.

I am on SAP NW 740 SP09. I still see an anomaly in output.

In the Original Payload view the extra spaces are removed, but in the Data Explorer view the spaces are as it is. This is still a problem for us, since output in browser is inline with Original Payload view, i.e., without extra spaces.

Please let me know, if any more information is required.

Can you also confirm if in your case these two views show different content.

Please find below screenshots.

Regards,

Addy

brian_zhu
Explorer
0 Kudos

hi Addy,

you are correct that i did have different values for the Json and XML format.

In this case, Json format is the correct one.

i also tried that in advanced rest client of chrome,  only Json could return the correct format.

regards,

Yueqiang

Former Member
0 Kudos

Hello Yueqiang,

Thanks for confirming.

Would really like to know if there is a workaround to get correct value in XML as well.

Are there any chances of having any SAP Note to resolve this.

Regards,

Addy

EkanshCapgemini
Active Contributor
0 Kudos

Hi,

Looping .

Regards,

Ekansh