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

Sapscript To XML

Former Member
0 Likes
1,750

Hi All,

I need to convert one sapscript output to an XML File.Anybody worked on this, please help me with the solution

Regards

Sarath

6 REPLIES 6
Read only

GauthamV
Active Contributor
0 Likes
1,086

Use this function module.

SAP_CONVERT_TO_XML_FORMAT

Also check this.

[Convert to XML|https://forums.sdn.sap.com/click.jspa?searchID=22192829&messageID=5090311]

Read only

Former Member
0 Likes
1,086

HI

this function module can be a help to you.

CALL FUNCTION 'FB_CONVERT_FORM_TO_XML'
    EXPORTING
      i_formname             =  "-------->Give the form name
*   IMPORTING
*     E_XML                  =
*   EXCEPTIONS
*     NO_NAME                = 1
*     NO_FORM                = 2
*     NO_ACTIVE_SOURCE       = 3
*     CONVERSION_ERROR       = 4
*     ILLEGAL_FORMTYPE       = 5
*     GENERATION_ERROR       = 6
*     OTHERS                 = 7
            .
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

regards

sarvesh

Read only

Former Member
0 Likes
1,086

Hi,

You can use these FM's.

SAP_CONVERT_TO_XML_FORMAT

FB_CONVERT_FORM_TO_XML

Below two function modules can be used to convert the data in an internal table to XML format.

Step 1: Convert to Data Object Model using

'SDIXML_DATA_TO_DOM'

Step 2: Conver to XML using

'SDIXML_DOM_TO_XML'

regards

Gokul

Read only

Former Member
0 Likes
1,086

Try this,

CALL TRANSFORMATION st_trans

SOURCE para = struc1

RESULT XML xml_tab.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'fnale.xml'

FILETYPE = 'ASC'

tables

data_tab = xml_tab.

Regards,

Joan

Read only

0 Likes
1,086

HI Joan,

what the value for st_trans .

regards

Sarath

Read only

Former Member
0 Likes
1,086

Hi,

You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.

In R3 also, you can download into XML format. However, it's not sure about uploading.and please refer to the program 'SF_XSF_DEMO'.

In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.

Regards

Kiran