2014 Jun 12 10:51 AM
Hi Experts,
I would like to download the XML format of an IDOC. For example, I would like to have something like this with all the fields of the IDOC:
<?xml version="1.0" encoding="UTF-8"?>
<ZORDERS01 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Schemas/zorders01.xsd">
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<DOCNUM>0000000000004711</DOCNUM>
<DIRECT>1</DIRECT>
<IDOCTYP>ORDERS01</IDOCTYP>
<CIMTYP></CIMTYP>
<SNDPOR>SAPP01</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>aaaaaaaaaa</SNDPRN>
<RCVPOR>aaaaaaaaaa</RCVPOR>
<RCVPRN>aaaaaaaaaa</RCVPRN>
</EDI_DC40>
<E1EDK01 SEGMENT="1">
<BSART>ZOPE</BSART>
<LIFSK>03</LIFSK>
</E1EDK01>
<E1EDK14 SEGMENT="1">
<QUALF>006</QUALF>
<ORGID>20</ORGID>
Is there any transaction that enables to download the structure of an IDOC in this format?
Thanks,
Vitish.
2014 Jun 12 11:02 AM
Hi Vitish,
Please use the procedure mentioned below, which may help you what you intend to
- Input t-code IDOC
- In selection screen, select 'Analyse IDOC field values
- Press F8
- Input your IDOC number
- Check mark on 'Also evaluate empty fields
- Click on 'Output in internal form' : this is very much important thing
- The execute
- You will see all the data
- Then go to 'List'>Save/send option from where you can achieve your purpose.
Please validate the same at your end, let me know in case you need any further inputs from my end.
BR/Thanks
Pranav Agrawal
2014 Jun 12 11:51 AM
Hi pranav,
Thanks for your reply. But i am not getting the output i wanted. Below is teh output i get when i follow your suggestions:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|Seg.type |Qualified segment ID| | | |
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|Segm.Name |Q |Fld Name |Description |Fld Cont. |
|EDIDC | |MANDT |Client |390 |
|EDIDC | |DOCNUM |IDoc number |0000000000213061 |
|EDIDC | |DOCREL |SAP Release for IDoc |731 |
|EDIDC | |STATUS |Status of IDoc |53 |
|EDIDC | |DOCTYP |IDoc Type | |
|EDIDC | |DIRECT |Direction for IDoc |2 |
|EDIDC | |RCVPOR |Receiver port (SAP System, EDI subsystem) |SAPD51 |
|EDIDC | |RCVPRT |Partner Type of Receiver |LS |
|EDIDC | |RCVPRN |Partner Number of Receiver |D51TDEX310
but this is not what i want.
I would like output like this:
<?xml version="1.0" encoding="UTF-8"?>
<ZORDERS01 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Schemas/zorders01.xsd">
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<DOCNUM>0000000000004711</DOCNUM>
<DIRECT>1</DIRECT>
<IDOCTYP>ORDERS01</IDOCTYP>
<CIMTYP></CIMTYP>
<SNDPOR>SAPP01</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>aaaaaaaaaa</SNDPRN>
<RCVPOR>aaaaaaaaaa</RCVPOR>
<RCVPRN>aaaaaaaaaa</RCVPRN>
</EDI_DC40>
<E1EDK01 SEGMENT="1">
<BSART>ZOPE</BSART>
<LIFSK>03</LIFSK>
</E1EDK01>
<E1EDK14 SEGMENT="1">
<QUALF>006</QUALF>
<ORGID>20</ORGID>
2014 Jun 12 11:28 AM
Hi Vitish.
For this
T-Code-> IDOC
Click on analyse field values Radio button
F8
Give IDOC no.
Click on push button "Output In Internal Form"
F8
then click on menu button
List->Export->Local File
Choose radio button "XML'
then give ur desired location ur file is downloaded
2014 Jun 12 4:46 PM
2014 Jul 04 7:35 AM
Hi Vitish,
Use function module 'OUT_IDOC_XML_TRANSFORM' to download IDoc in XML format. IDoc number and file path to be provided as input.
Regards,
SG
2019 Jun 12 6:11 PM
2014 Jul 04 2:33 PM
Refer this link may be helpful
http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=153388639
2019 Jun 12 6:12 PM