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

ALV TO XML

achraf_smaali
Explorer
0 Likes
2,436

Hi Experts !!

I have created an ALV which shows some Data!!

Now I want to add a parameter in my selection screen which work as follows, When I click on it, it let me choose the path or the target where I want to download my XML file (like the browse button).

Then what should I do to create an XML file which contain only the data returned by the function module 'REUSE_ALV_GRID_DISPLAY' ?!!

Can you please help in doing this?

Thanx in Advance.

Regards,

SMAALI Achraf

Edited by: SMAALI90 on Mar 22, 2011 11:45 AM

Edited by: SMAALI90 on Mar 22, 2011 11:46 AM

1 ACCEPTED SOLUTION
Read only

Kiran_Valluru
Active Contributor
0 Likes
2,048

Hi Smamli,

Pls refer the code to convert Internal table data to XML in this lnk [Convert to XML|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b2dcbdfc-0801-0010-97bd-b3f39420759c?quicklink=index&overridelayout=true]

If u want to use transformations refer this link http://help.sap.com/abapdocu_70/en/ABENABAP_ST.htm

Hope this will be helpful to u.,

Thanks

Regards

Kiran

8 REPLIES 8
Read only

Former Member
0 Likes
2,048

Hi

May be you can create a transformation template and call the CALL TRANSFORMATION with ABAP data to XML string with the transformation template. ABAP data will be nothing but your internal table which you had passed for FM REUSE_ALV_GRID_DISPLAY. And then the XML return string can be downloaded to the file path specified.

Or

Other option might be to use the FM SAP_CONVERT_TO_XML_FORMAT by passing the internal table data passed to the FM REUSE_ALV_GRID_DISPLAY and get the XML data in the return format.

Regards

Ranganath

Edited by: Ranganath Ramesh on Mar 22, 2011 11:59 AM

Read only

0 Likes
2,048

I don't know why!! but this FM doesn't work with, Cuz I got this Error Msg : 'Function SAP_CONVERT_TO_XML_FORMAT not found' I'm using ECC6

Read only

0 Likes
2,048

This FM is in the software component SAP_APPL, currently my system Release is 604 and Level is 0003 for this component.

Read only

0 Likes
2,048

Sorry but I don't understand what are you trying to tell me, Is there any other solution or an example of Transformation template?

Read only

0 Likes
2,048

Hi

Please check the document posted by kiran kumar Reddy it gives you in detail on how to create XML transformation templates and download the XML file after conversion.

Regards

Ranganath

Read only

0 Likes
2,048

Ok I'm gonna take a look and you'll get my answer!!

thank in advance aal of you

Read only

Kiran_Valluru
Active Contributor
0 Likes
2,049

Hi Smamli,

Pls refer the code to convert Internal table data to XML in this lnk [Convert to XML|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b2dcbdfc-0801-0010-97bd-b3f39420759c?quicklink=index&overridelayout=true]

If u want to use transformations refer this link http://help.sap.com/abapdocu_70/en/ABENABAP_ST.htm

Hope this will be helpful to u.,

Thanks

Regards

Kiran

Read only

Former Member
0 Likes
2,048

 CALL TRANSFORMATION Z_XML_XLS
        SOURCE XML  li_upload
        RESULT excelMeta = ls_excelmeta
               excelDataTab = li_xls_row .