cancel
Showing results for 
Search instead for 
Did you mean: 

XML file to XML interface for SNC

Former Member
0 Kudos

Hi PI experts,

I'm working on a custom interface for SNC where in I need to create an interface which will pick up an  XML file for ASN and then pass it to the standard ASN interface in SNC(inbound) i.e."DespatchedDeliveryNotification_In".

I'm a beginner in PI so I would like to know if I need to map the standard SNC inbound ASN interface(target) to the incoming XML file structure,what is the first step in doing the mapping?

I already have the receiver and sender systems configured so I just need to create the "message mapping" from scratch to build this interface.

Can soemone please provide some pointers as to hwo should I get started with the creation of interface.

My main query is how to create a the source structure(for incoming XML file which I alreay have with me) to map to the std ASN XML interface?

Are there any tools in PI which can be used to create the structures to be used in mapping?

Any inputs are highly appreciated.

Thanks.

BR,

AD

Accepted Solutions (1)

Accepted Solutions (1)

nabendu_sen
Active Contributor
0 Kudos

Hi ,


Please close this thread as the question is resolved with which it started and mark the correct answer.


You can open a new thread of question with SNC issue you are facing.


Regards,

Nabendu.

Answers (2)

Answers (2)

former_member184720
Active Contributor
0 Kudos

>>>My main query is how to create a the source structure(for incoming XML file which I alreay have with me) to map to the std ASN XML interface?


You can find many online tools to convert xml to xsd. You just need to import that xsd as an external definition to do your mappings.


Free Online XSD/XML Schema Generator From XML - FreeFormatter.com

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

In our implementation, we are receiving IDoc XML file in 'DESADV.DELVRY03' format from partners through B2B.

Only the below Standard Mapping is available under SAP Standard Package:

DesadvDelvry03_DespatchedDeliveryNotification

http://sap.com/xi/SNC/Global/IC

SNC IC 7.02 (SWCV version varies as per your SNC System version)

But the transformation should be:

DESADV.DELVRY03  --> DespatchedDeliveryNotification_In

If you are receiving in some different file you need to create DT & MT manually with custom mapping.

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu for the reply!

I had a question regarding use of the std interface "DesadvDelvy03_DespatchedDeliveryNotification_01".

Since we already have the interface which post the ASN idocs in ECC,if we use the above std interface to replicate the ASN from ECC to SNC,will this cause a problem at the time of "Invoice creation" since invoice will be created in SNC directly and then flow to ECC?

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

If you use the Standard Proxy interface, there should not be any issue with Invoice creation at SNC side. These Standard Contents are provided by SAP and we did not face any problem.

But how the communications between SNC and ECC going to be Synchronized, that needs involvement of ECC team.

Regards,

Nabendu.

Former Member
0 Kudos

Hi Nabendu,

Can you please explain your scenario?Particularly the document flow for incoming ASN from supplier?I just want to ensure that what I understand is right.

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

In our case, B2B adapter actually transforming the EDI message to an IDoc XML file (DESADV.DELVRY03). Now PI is picking up the file through File Adapter and we have used below:

File --> Sender Interface: DESADV.DELVRY03 (Though we are not receiving ALE IDoc but IDoc XML, but we can use IDoc Structure as our Sender side, you can import DESADV.DELVRY03 from ECC just to use the structure)

Operation Mapping (XSLT Mapping provided by SAP): DesadvDelvry03_DespatchedDeliveryNotification_01

ABAP Proxy --> Receiver Interface: DespatchedDeliveryNotification_In (Already available with SNC Standard Content within PI, you need to activate the Proxy at SNC side).

Regards,

Nabendu.

nabendu_sen
Active Contributor
0 Kudos

Ok, let me describe communications between ECC and SNC:

Flow 1:


ECC (STPPOD.DELVRY03 - Sender IDoc) -->

Operation Mapping :StppodDelvry03_ReceivedDeliveryNotification_01 (XSLT Mapping provided by SAP) ->

SNC (ReceivedDeliveryNotification_In - Receiver Proxy)

Flow 2:


SNC (DespatchedDeliveryNotification_Out - Sender Proxy) -->


Operation Mapping :DespatchedDeliveryNotification_DesadvDelvry03_01 (XSLT Mapping provided by SAP) ->

ECC (DESADV.DELVRY03 - Receiver IDoc)



Regards,

Nabendu.


Former Member
0 Kudos

Perfect!

Thanks a ton Nabendu!

Just one last question....Can you please let me know what are the steps to activate proxy in SNC for the Receiver Interface: DespatchedDeliveryNotification_In?

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

Go to <SPROXY> transaction in SNC and check whether the Proxies are already activated or not (Most probably YES because they come as Standard). If not, check Section 3: ABAP Proxies in the below document:

Also: 'Go to Transaction: SPROXY where in you get to see all the objects designed in Integration Repository. As Proxies implement message interfaces in Integration Repository, navigate to the required inbound message interface, as we are creating a Server proxy. Right click to create the Proxy as shown in the below screenshot.'

SAPTechnical.COM - XI - ABAP Proxy communication

Regards,

Nabendu.

Former Member
0 Kudos

Thanks.

I do see the PROXY as active in SNC.

If possible,can you please send me the screenshots of the Receiver determination and Receiver agreement as they are defined in XI?

I'm stuck at the point to define these objects...Should I define the interface determination first?

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

You should start Configuration Wizard and then <Internal Communciation>, it would help to go through every step creation:

Please find below the Screen shots:

Receiver Determination:

Receiver Agreement:

Regards,

Nabendu.

Former Member
0 Kudos

You are the best!

Thanks a ton for all your inputs.

I was able to configured the XI objects.

But now the interface is not picking up the file from the FTP location.

I think the problem is with the file I guess.

I did import the IDOC strcuture for DesadvDelvy03 from ECC and everything looks good for the XI objects.

But do you know if there is any tool which I can use to create a file of the type XML for IDOC structure of type DesadvDelvy03?


Do I need to do any other settings?

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

If you just need XML to test your XI configuration, go to Operation Mapping / Message mapping and select 'Test' tab. Fill up the Fields with proper values and Export XML button (Extreme Right in the Pic with Arrow). Now you can save the XML as file.

 

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu!

I'm unable to generate a test instance from the Message mapping as the option is GRAYED out.

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

You need to first go to Edit mode, then Test tab will be available.

Check my answer at the below discussion:

Regards,

Nabendu.

Former Member
0 Kudos

I tried that but the "instance" icon is still mot active as shown below.

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

Why do you need Instance icon? You are not saving one of the Test instances, you need the XML. Under <Structure> (follow the screen shot), populate the fields manually (add Values to Fields) and then click <SRC> icon (just after #) and then you would be able to see the XML. Then Cntrl + A and Cntrl + V to a Text Editor (can use Notepad). Then Save the file with <.xml> extension.

Thats it.

Regards,

Nabendu.

Former Member
0 Kudos

Thanks again Nabendu!

There seems to be some bug/issue with this mapping as I don't see the XML structure but what I see is as shown below:

Can you please check in your system and let me know what you see for this same OM i.e.DesadvDelvry03_DespatchedDeliveryNotification_01?

Thanks again for your time and help.

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

I could see something like below:

My mapping is under SWCV - SNC IC 7.02. If you are using SNC 7.0, it should be SNC 7.0. But that would not create any issue. As you can see I can edit values under 'Test'. In my screen shot I am editing <TABNAM> field to populate EDI_DC40.

Now manually you can populate mandatory fields which are required to process this interface (Just Testing purpose).

Now switch to "Source Text View" and copy the XML into Notepad, Save as .xml file.

Now you can see:

Regards,

Nabendu.

Former Member
0 Kudos

Thanks again Nabendu!

One last question....

Did you import the IDOC structure from ECC or SNC?

nabendu_sen
Active Contributor
0 Kudos

You really don't need to import the IDoc it should available under SWCV <SAP APPL 6.0* >. Now * could 1 / 2 / 3 etc. Check with ECC team which version they want to use.

like below we are using SAP APPL 6.05:

Available to us:

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu!

I'm trying to figure out what I'm missing.

I can see this IDOC structure in my ESR when imported from ECC.But I dont see this structure under SNC s/w component.

Since I'm unable to see the source structure in the operation Mapping TEST tab,I thought it should be imported from SNC since the interface mapping we are using is under SNC SWC.

I can see what you have atatched in the screenshot but that is under the ECC SWC and I have also imported the same in ESR.

But what I'm unable to figure out is why is the source IDOC structure not visible under the TEST tab in operation mapping screen...Why do I see _empty doc when you can see the IDOC structure in your system?

Any idea if I'm missing any step?

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

Click 'Find' option

Search with string "DesadvDelvry03_DespatchedDeliveryNotification_01" and please provide me the screenshot of the Mappings what you can see.

Regards,

Nabendu.

Former Member
0 Kudos

This is what I see in the ESR when I search for the mapping interface:

nabendu_sen
Active Contributor
0 Kudos

Great. Most probably you are going to SNC 7.0 mapping. Now open the Operation Mapping,

Click Test tab , then SRC (Source Text View )and provide the screen shots (Whole ESR Screen). if you want to provide multiple screen shots, that is fine.

Regards,

Nabendu.

Former Member
0 Kudos

here you go.....

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

Please provide the "Definition" tab Full screen shot.

Regards,

Nabendu.

Former Member
0 Kudos
nabendu_sen
Active Contributor
0 Kudos

Okay, so this is the issue. You can see DESADV.DELVRY03 (Sender Interface) SWCV is showing some ID. That means the reference is missing. You may not have any SWCV named <SAP APPL 6.0* >. Just like I asked earlier,

Click 'Find' option

Search with string "DESADV.DELVRY03" and please provide me the screenshot of the IDocs what you can see. and if you find my posts helpful, you can always reward with points.

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu.

I was able to see the IDOC structure after importing the software component with that ID!

Thanks a ton again for all the pointers.

However now after creating the test file as per your earlier instructions,I tried testing the interface but I now see a error message on the SNC side as shown below:

Any pointers?

I have the creation date and time in the file in the header section but I'm still getting this error.

Regarding the points,wish I could give you 1 million points for helping me with my first PI interface.

However I will mark the thread as CORRECT ANSWER so that you will receive the points.

BR,

Andy!

Former Member
0 Kudos

When testing the mapping,in the target structure,I see a "T" in the header date/time field as shown below.

However my source structure has the date and time as shown below:

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

You are welcome.

Now your SNC error clearly pointing Proxy XML sent by PI is not matching with ABAP Proxy at SNC side. I will suggest you to Test the Proxy at SNC system.

How to Debug &amp; Test inbound PI PROXIES

SPROXY->choose ur interface->press F8(test/execute interface)->u will get a popout->check the last option( XML payload)->again execute->now put the payload there->execute-> under successfull execution u will get...message processed without error->under payload u can see the output.


Ref answer of :

Regards,

Nabendu.

nabendu_sen
Active Contributor
0 Kudos

Go to SXMB_MONI of SNC and provide the XML (which is actually sent to SNC)

Regards,

Nabendu.

Former Member
0 Kudos

Thanks Nabendu.

I tried debugging the proxy but couldnt find details.

at the end of debugging,the log is as shown below:

nabendu_sen
Active Contributor
0 Kudos

Go to Transaction <SXMB_MONI> at SNC system and provide the XML payload

You need to provide the Inbound Message (1st Node) > Payloads > Main (XML) Not the Response unlike above Picture, there would not be ay Response segment at SNC

Regards,

Nabendu.

Former Member
0 Kudos

Hi Nabendu,

Below is the XML you requested...

nabendu_sen
Active Contributor
0 Kudos

Hi Andy,

Try with this XML:

=======================================================================


<?xml version="1.0" encoding="UTF-8"?>

<DELVRY03>

   <IDOC>

      <EDI_DC40>

         <TABNAM/>

         <DOCNUM>1</DOCNUM>

         <DIRECT/>

         <IDOCTYP>DELVRY03</IDOCTYP>

         <MESTYP/>

         <SNDPOR>XXXXXXX</SNDPOR>

         <SNDPRT>LS</SNDPRT>

         <SNDPRN>XXXXX</SNDPRN>

         <RCVPOR/>

         <RCVPRN>XXXXXX</RCVPRN>

         <RCVLAD>4E3A577149A467A8E10000000AE1111</RCVLAD>

         <CREDAT>20150313</CREDAT>

         <CRETIM>024123</CRETIM>

         <REFINT>15222</REFINT>

         <REFMES>1</REFMES>

      </EDI_DC40>

      <E1EDL20>

         <VBELN>339729</VBELN>

         <TRATY>031</TRATY>

         <LIFEX>339729</LIFEX>

         <E1EDL18>

            <QUALF>OOO</QUALF>

         </E1EDL18>

         <E1ADRM1>

            <PARTNER_Q>LF</PARTNER_Q>

            <PARTNER_ID>0000911111</PARTNER_ID>

            <NAME1>SWSSSAS</NAME1>

            <STREET1>AQWWWW</STREET1>

            <CITY1>DDDDD</CITY1>

            <COUNTRY1>VVVVV</COUNTRY1>

            <REGION>XXXX</REGION>

         </E1ADRM1>

         <E1EDT13>

            <QUALF>015</QUALF>

            <NTANF>20150313</NTANF>

            <NTANZ>074444</NTANZ>

         </E1EDT13>

         <E1EDT13>

            <QUALF>007</QUALF>

            <NTANF>20150313</NTANF>

            <NTANZ>236666</NTANZ>

         </E1EDT13>

         <E1EDL24>

            <POSNR>000010</POSNR>

            <MATNR>WEE676767</MATNR>

            <CHARG>1172890.1</CHARG>

            <KDMAT>WEE676767</KDMAT>

            <LFIMG>1099.0</LFIMG>

            <VRKME>EA</VRKME>

            <LGMNG>1099.0</LGMNG>

            <MEINS>EA</MEINS>

            <KDMAT35>WEE676767</KDMAT35>

            <MATNR_EXTERNAL>WEE676767</MATNR_EXTERNAL>

            <E1EDL43>

               <QUALF>V</QUALF>

               <BELNR>4100022222</BELNR>

               <POSNR>00001</POSNR>

            </E1EDL43>

            <E1EDL41>

               <QUALI>001</QUALI>

               <BSTNR>1212029111</BSTNR>

               <POSEX>00001</POSEX>

            </E1EDL41>

         </E1EDL24>

      </E1EDL20>

   </IDOC>

</DELVRY03>

Regards,

Nabendu.

Former Member
0 Kudos

Tried with this but still getting the error :

Product ID is missing