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

Convert xstring to itab

Former Member
0 Likes
4,061

Hi ! :

Well, i have to convert a xstring data ( reposrc-data ) into readable format.

I did a while ago but i can't remember how.

became the xstring and was kept in an itab.

I try with :

HR_RU_CONVERT_HEX_TO_STRING

SCMS_BINARY_TO_XSTRING

SCMS_XSTRING_TO_BINARY

but they don't work.

Do you know what function or method i need to use?

Thank you so much!

8 REPLIES 8
Read only

Former Member
0 Likes
2,751

Please try LXE_COMMON_XSTRING_TO_STRNGTAB.

Regards,

Debaraj

Read only

0 Likes
2,751

Thank you for answer, but is not the solution

first, and had been looking for, so I decided to ask the forum because I could not find the solution.

I have the data type, for example :

FF00700000121F9D0269DFFA7EDCC481F0BF62F5A12B45B7A76C1F4F772739E06CAD038C0CEC6DF

that it's come from one variable type rawstring (reposrc-data) and represent source code.

and i need convert this data into itab, so i can use function "INSERT REPORT prog FROM itab".

but i don't know how to do it.

thank you for answer anyway!

regards.

Read only

0 Likes
2,751

Try like this

pass your xstring to SCMS_XSTRING_TO_BINARY get the binary_tab, then pass the binary tab to binary_tab in 'SCMS_BINARY_TO_TEXT' and get the text in table TEXT_TAB

or use class cl_abap_conv_in_ce method create, pass the xstring to input and the encoding, after this call method read of the same class and get your data in importing parameter data.

Read only

0 Likes
2,751

Hi Pablo,

Try using HR_XSTRING TO STRING.

Also try this link, online help could be of help to you.

[Uploading Files and Manipulating their Content|http://help.sap.com/saphelp_nw04/helpdata/en/ba/78d3c747b24546ab1c1499a054d8a5/content.htm]

Regards

Abhii

Read only

0 Likes
2,751

thanks for all the answers, but i can't find a solution.

Abhii, i try with the link that you give me but doesn't work.

As result, that function return something like this :

y#p######issuUeAe#d?bo!+E.Sec.l#Ow'9al####imubQA^#%a##/:pyjC#N##uAOessE"LVuf<ss#Cv5z#

same result for other functions like SCMS_BINARY_TO_TEXT.

sorry to have taken their time.

Regards!

Read only

0 Likes
2,751

Hi Pablo,

If you want to get rid of the special characters, then use REGEX command.

Refer below thread :

Regards

Abhii

Read only

0 Likes
2,751

>

> thanks for all the answers, but i can't find a solution.

> Abhii, i try with the link that you give me but doesn't work.

> As result, that function return something like this :

> y#p######issuUeAe#d?bo!+E.Sec.l#Ow'9al####imubQA^#%a##/:pyjC#N##uAOessE"LVuf<ss#Cv5z#

>

> same result for other functions like SCMS_BINARY_TO_TEXT.

>

> sorry to have taken their time.

> Regards!

So these data must have been serialized (so you got them in xstring format) and now you will have to deserialize them. For this you can use [CALL TRANSFORMATION|http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION_SHORTREF.htm] but you must know the target type. This could be any data so you must know the source structure in order to deserialize it.

Regards

Marcin

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,751

Please search in SDN before posting.