cancel
Showing results for 
Search instead for 
Did you mean: 

Converting IDOC to XML

Former Member
0 Kudos

Hi,

I have an application where i have to convert an IDOC to XML format so that it can be handled by webmethods.

I want to know how to convert IDOC to XML. I have seen that in SAP there are two port types, XML and XML HTTP. Are they used for posting an IDOC in XML format at defined port.

When i tried to generated a test IDOC with port type as XML, it has created an xxx.XML file in application server but i an unable to display it.

1). Can any one pls. tell me how to convert IDOC to

XML??? What are the different methods ( if available)

2). DO i need to have any extra component for this??

3). what are XML and XML http ports are for.

Pls. help me as this is very urgent.

Thanks in advance.

Pratik

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Generally a SAP Adapter on the webMethods does this job. By using SAP Adapter, IDOCs can be exchanged between SAP R3 and webMethods. Further, there are build-in services which can convert the IDOC structure into an XML.

But if you want to exchange IDOCs as XML, this is possible starting from 4.7 version of SAP

hope this helps

BS

Former Member
0 Kudos

Hi,

In most of the interface scenarios, SAP will send IDoc to the EAI tool such as webMethods which will intern convert it into the the suitable format( Eg. XML ). webMethods has got built in services to convert IDoc to XML. I dont find any reason why u should do this at SAP side.

Regards,

Sameej T.K.

Former Member
0 Kudos

Hi,

thanks for your mail.at least someone has replied.

Yes, i am woring in SAP 4.7. I am able to send the IDOC to webmethod successfully without using Business connector. Now i want to receive an IDOC. that is IDOC is coming in XML format and i have to create an IDOC and then genrate an application document. Can you help me how to proceed for inbound XML idoc without Business connector.

Thanks in advance,

Pratik

Former Member
0 Kudos

Both BC and webmethods are similar products. So there is no need for BC, if you are already using webMethods.

Now that you are mentioning that the XML has reached webMethods. The service which is triggered when the xml reaches can convert this xml into a document using the service "xmlStringToXMLNode" and then "xmlNodeToDocument". both these services are in the wmPublic package and in xml folder.

Using this document (IDOC structure), you can proceed to generate the Application document using mapping.

HTH

BS