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

Returning XML string from RFC

Former Member
0 Likes
625

Hi experts,

Suppose in an RFC i have some data in the internal table. Can I convert this data to an xml string and return this xml string to the people who call this RFC .

Regards,

Sanath.

4 REPLIES 4
Read only

GrahamRobbo
SAP Mentor
SAP Mentor
0 Likes
514

Yes you can.

[Asking Good Questions in the Forums to get Good Answers|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17662] [original link is broken] [original link is broken] [original link is broken];

Cheers

Graham Robbo

Read only

Marcel_Wahl
Product and Topic Expert
Product and Topic Expert
0 Likes
514

Hi Sanath,

Hope you read the thread about "good questions"... - What is the question in there?

Basically you can transform any serialzable*1 abap variable into an xml stream

using statement CALL TRANSFORMATION ID SOURCE lt_my_table RESULT XML lv_xml.

It can be re-transformed as:

CALL TRANSFORMATION ID SOURCE XML lv_my_xml RESULT lt_my_table.

Just use the help on this statement

*1 serializable means the data objects must not contain any object references anywhere.

additionally it is not recommended to have string or any x-type values in there.

Regards, M.

Read only

Former Member
0 Likes
514

Hi,

Convert Internal table data to PDF and then to Binary.

Regards

Shruti

Read only

0 Likes
514

Shruti, there is a big divination talent in that answer