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

serialize data to a xstring?

Former Member
0 Likes
549

hi, is it possible to serialize a bunch of data to an xstring and reconstruct it from there?

a.e.:

DATA: mydata TYPE ANY,

myxstring type xstring.

ZCL_DATA=>get_data( imorting data = mydata ).

??? here i wanna put the data in a xstring, but how ?

??? myxstring = data_to_xstring( mydata )

ZCL_DATA=>save_data( exporting xstring = myxstring ).

...

ZCL_DATA=>load_data( importing xstring = myxstring ).

??? here i wanna restore the data.

??? data = xstring_to_data( myxstring )

ZCL_DATA=>put_data( exporting data = mydata ).

-


the structure of the data should not be lost during this operation, and the data could be of an complex type.

how can i realize this?

thanks ronald

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
485

Hi grafl,

1. use the command EXPORT to put data in xstring.

2. just copy paste to get a taste of it.

3.

report abc.

data : t001 like t001 occurs 0 with header line.

data : str type xstring.

*----


select * from t001 into table t001.

<b>export t001 to data buffer str.</b>

regards,

amit m.

2 REPLIES 2
Read only

Former Member
0 Likes
486

Hi grafl,

1. use the command EXPORT to put data in xstring.

2. just copy paste to get a taste of it.

3.

report abc.

data : t001 like t001 occurs 0 with header line.

data : str type xstring.

*----


select * from t001 into table t001.

<b>export t001 to data buffer str.</b>

regards,

amit m.

Read only

0 Likes
485

woohoo

thank u very much.

this gonna make my life 100% easier