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

Help com RFC - parameter Xstring

carlos_valentini3
Participant
3,339

erros-xstring.pngGood Morning.

I am creating an RFC and managed an Enterprise Service (SOAP)

The RFC should receive a parameter of type Xstring. This parameter will convert to binary (SCMS_XSTRING_TO_BINARY).

However when testing, the error of the attached image is occurring.

How can I pass an Xtring value as a parameter?

1 ACCEPTED SOLUTION
Read only

carlos_valentini3
Participant
2,482

As suggested by Sandra Rossi I am passing as string and inside the RFC again converting to xstring, the error has been solved. Thank you all.

5 REPLIES 5
Read only

Tomas_Buryanek
Product and Topic Expert
Product and Topic Expert
2,482

Everything we can tell you is in the error message.

Somewhere in your program you are probably trying to decode Base64 string and it fails.

-- Tomas --
Read only

Sandra_Rossi
Active Contributor
2,482

The first bytes "89504E47..." in your log, correspond to the bytes of a PNG file, but they are not encoded in base64. If you define a parameter of type XString, and you create a Web service around, then SAP framework expects a Base64 string and decodes it into an Xstring. Solution: call your web service with your PNG encoded into Base64. Another solution, maybe, is to map to a different type in your service definition (tab "Types").

Read only

isuru_fernando24
Explorer
2,482

I would check the possibility of encoding and decoding using ABAP class CL_HTTP_UTILITY.

Read only

isuru_fernando24
Explorer
0 Likes
2,482

I would check the possibility of encoding and decoding to base64 using CL_HTTP_UTILITY.

Read only

carlos_valentini3
Participant
2,483

As suggested by Sandra Rossi I am passing as string and inside the RFC again converting to xstring, the error has been solved. Thank you all.