cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc into SAP via XML and HTTP

Former Member
0 Kudos

Hello all,

I'm trying to set up an interface in SAP Enterprise 6.20 which receives a standard IDoc via XML posted via HTTP. I have created a service in transaction SICF called xml_idoc which uses the CL_HTTP_IDOC_XML_REQUEST class. Is this all that is required for an IDoc to be sent to SAP via XML? I.e. the IDoc would be posted to http://<r3_server_ip>/sap/xml_idoc which would use the CL_HTTP_IDOC_XML_REQUEST class method IF_HTTP_EXTENSION~HANDLE_REQUEST to extract the IDoc from the XML and post it. If the above service is all that's necessary, how can I create a test harness to post XML IDocs to the xml_idoc service?

The sending system is not BC or webmethods or XI and none of those systems are available to use in the interface.

Kind regards,

Higgers.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Steve,

I found that the creation of the service is all you have to do if your ALE is already prepared to receive IDOC's from the givensender. I had some trouble on activating the service with the right security options. I was successful using the SAP Standard User and sending the HTTP Request using the user/password combination of a valid SAP User.

Karl Heinz

Former Member
0 Kudos

Hi Steve and Karl,

could I use this method to send XML IDOC into the Integration Engine and then have it perform a mapping on the IDOC?

Is the IDOC adapter involved in the method? And does the method support IDOC versioning?

e.g.

The XML IDOC we receive looks like this.

<INVOIC02>

<EDI_DC40>

<MANDT>102</MANDT>

<DOCNUM></DOCNUM>

<DOCREL>620</DOCREL>

<STATUS></STATUS>

<DIRECT>1</DIRECT>

<OUTMOD>2</OUTMOD>

<IDOCTYP>INVOIC02</IDOCTYP>

<MESTYP>INVOIC</MESTYP>

<STDMES>INVOIC</STDMES>

<SNDPOR>SAPSRD</SNDPOR>

<SNDPRT>LS</SNDPRT>

<SNDPRN>SRD_102</SNDPRN>

<RCVPOR>A000000029</RCVPOR>

<RCVPRT>KU</RCVPRT>

<RCVPFC>AG</RCVPFC>

<RCVPRN>0000100058</RCVPRN>

<CREDAT></CREDAT>

<CRETIM></CRETIM>

<SERIAL></SERIAL>

</EDI_DC40>

<E2EDK01005>

<MANDT>102</MANDT>

<DOCNUM>0000000000265220</DOCNUM>

<SEGNUM>000001</SEGNUM>

<PSGNUM>000000</PSGNUM>

<HLEVEL>01</HLEVEL>

<CURCY></CURCY>

<WKURS></WKURS>

<ZTERM></ZTERM>

<BSART>INVO</BSART>

<BELNR></BELNR>

<NTGEW></NTGEW>

<BRGEW></BRGEW>

<GEWEI></GEWEI>

<FKART_RL></FKART_RL>

<RECIPNT_NO></RECIPNT_NO>

<FKTYP></FKTYP>

</E2EDK01005>

...

As you can see the IDOC type is INVOIC2 and the release is 6.20. Further versioning is done in the elements, e.g. E2EDK01005

Looking forward to read your answers.

Best regards,

Jacob Vandborg

Former Member
0 Kudos

Hi Jacob,

if you talk about Integration Engine, I suppose you are working with the XI.

The service I'm working with is only a service in WAS. You could use the IDOC-Adapter or the Plain HTTP Adapter of the XI to send your IDOC to the Integration Engine. Please refer to help.sap.com for detailed description. I didn't worked with the XI, yet:-)

Karl Heinz

Former Member
0 Kudos

Hello everybody,

I am also doing the same thing.

But when i am passing the IDoc Xml data to this service, I am getting the Response code as 409(Conflict).

What could be the resion for this?

Whether i am passing the IDoc data in wrong XML format?

Andbody have some sample structure for any simple IDoc then please share with me.

I can check with that structure.

Thanks in Advance,

Bhavik

Former Member
0 Kudos

Hi Bhavik,

the format of the IDOC is nothing else than the XML representation of an IDOC. There is nothing else around. For tests I worked with the structure described below.

Concerning your error you should check if you access the WAS with a correct user/passwd combination. Further the complete ALE settings must be configured to receive IDOC's from the partner used in the IDOC header.

Good luck:-)

Karl Heinz

<ALEAUD01>

<IDOC BEGIN="1">

<EDI_DC40 SEGMENT="1">

<TABNAM>EDI_DC40</TABNAM>

<MANDT>030</MANDT>

<DOCREL>620</DOCREL>

<DOCNUM>001003001</DOCNUM>

<STATUS>30</STATUS>

<DIRECT>1</DIRECT>

<OUTMOD>2</OUTMOD>

<EXPRSS />

<TEST />

<IDOCTYP>ALEAUD01</IDOCTYP>

<CIMTYP />

<MESTYP>ALEAUD</MESTYP>

<MESCOD />

<MESFCT />

<STD />

<STDVRS />

<STDMES />

<SNDPOR>ABC</SNDPOR>

<SNDPRT>LS</SNDPRT>

<SNDPFC />

<SNDPRN>ZCASIFCSRV</SNDPRN>

<SNDSAD />

<SNDLAD />

<RCVPOR />

<RCVPRT>LS</RCVPRT>

<RCVPFC />

<RCVPRN>SAPBW3</RCVPRN>

<RCVSAD />

<RCVLAD />

<CREDAT>20050520</CREDAT>

<CRETIM>162647</CRETIM>

<REFINT />

<REFGRP />

<REFMES />

<ARCKEY />

<SERIAL />

</EDI_DC40>

<E1ADHDR SEGMENT="1">

<MESTYP>ABCTYP</MESTYP>

<MESCOD>ABC</MESCOD>

<MESFCT>ABC</MESFCT>

<MESTYP_LNG>ABC_LNG</MESTYP_LNG>

<E1STATE SEGMENT="1">

<DOCNUM>1</DOCNUM>

<STATUS>2</STATUS>

<STACOD>3</STACOD>

<STATXT>4</STATXT>

<STAPA1>5</STAPA1>

<STAPA2>6</STAPA2>

<STAPA3>7</STAPA3>

<STAPA4>8</STAPA4>

<STATYP>I</STATYP>

<STAMQU>10</STAMQU>

<STAMID>11</STAMID>

<STAMNO>12</STAMNO>

<STAPA1_LNG>13</STAPA1_LNG>

<STAPA2_LNG>14</STAPA2_LNG>

<STAPA3_LNG>15</STAPA3_LNG>

<STAPA4_LNG>16</STAPA4_LNG>

</E1STATE>

</E1ADHDR>

</IDOC>

<ALEAUD01>

Former Member
0 Kudos

hi

I am krishna i am also involved in this type of proejct my requierments is alos the same

i want to receive an IDoc through HTTP in XMl format without using third party tools

How you are proceeding what is the procedure you involved in that plz send to me vbak24@yahoo.co.in

so that i will igve you the solution which i know

if possible to send the blueprint / architecture i think you ar enot using any thrid party tools right

thanks

krishna