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

Creating a Xstring component in a structure

Former Member
0 Likes
5,208

Hi,

I am trying to create an string component in a structure, but when I enter XSTRING in the data type field, I always get the error, enter a valid value. Any Idea how I can resolve this?

I'm thankful to any and every help.

Regards,

Riswan

1 ACCEPTED SOLUTION
Read only

Kartik2
Contributor
0 Likes
2,830

Hi,

Mostly we do not store data in xstring format. One thing what you can do is use the type RAW, convert you data to RAW data and then store it and for processing you can convert it back from RAW to xstring format.

Regards,

kartik

4 REPLIES 4
Read only

Kartik2
Contributor
0 Likes
2,831

Hi,

Mostly we do not store data in xstring format. One thing what you can do is use the type RAW, convert you data to RAW data and then store it and for processing you can convert it back from RAW to xstring format.

Regards,

kartik

Read only

Former Member
0 Likes
2,830

Thanks a lot for the reply. Actually I have a service that returns the bytestream of a pdf in XSTRING format. I want to store that stream in a structure and return the structure to the requesting client.

The pdf is exported from the service in XSTRING format, so to store it I need a XSTRING in my structure. Any conversion (i.e XSTRING to RAW or XSTRING  to STRING) results in the corruption of the pdf document and I am not able to open it in the client side.

Since XSTRING is an predefined type in ABAP, why am I not able to use it in the structure?

Read only

0 Likes
2,830

Hi,

In DDIC, types have different names than in ABAP. If you know ABAP but not DDIC, when you press F4 at the DDIC type field, the only difficulty is to know the equivalence. See there: SAP Library: Mapping of the ABAP Data Types (you will see that XSTRING in ABAP corresponds to RAWSTRING in DDIC.)

Sandra

Read only

Former Member
0 Likes
2,830

Thanks Sandra. I tried using RAWSTRING and it solved my problem.

Best Regards,

Riswan