cancel
Showing results for 
Search instead for 
Did you mean: 

Sending PO Attachment from SRM via PI(cXML) to Ariba

Former Member
0 Kudos

Hello ,

I am working on a requirement to send Attachments in PO Header from SAP SRM --> PI using cXML -->   ARIBA.

We are using Ariba Adapters in PI as per the Ariba Network Adapter guide to send PO create and change information and this is working fine.A new node under Payloads for attachments is visible in PI .

We are able to see the new PO and change PO documents in Ariba but not the attachment.

Ariba needs the document to be sent as either of the below;

1. URL of the document in the standard cXML tags as per Page 135 of the guide.

<Comments>

<Attachment>

<URL> “Attachment URL”</URL>

</Attachment>

</Comments>

2. Embedded in the Payload from PI.


We are pursuing the URL approach but the standard cXML has multiple <Comments> tag and the guide is not clear on a specific one to use.

 

A . Pls. help to identify the specific node in cXML that Ariba is looking for the URL of the attachment.


B. How to generate this URL ? Pls. help with examples of this URL .



Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Harish,

we are passing attachment url to the comment which comes under itemout.

/cXML/Request/OrderRequest/ItemOut/Comments.

we are storing the attachments in HTTP enabled location.

URL will be something like this: http://host:port/sap/ebp/docserver/attachmentname?phioget&KpId=xxxxxxxxxxxxxxx&KpClass=xxxxx&sap-cli...

Thanks&Regards,

Akhila.A

Former Member
0 Kudos

Hello Akhila,

Thank you for the reply .

I will try to send the URL as mentioned and update the test result.

Also the Ariba guide mentions about not to be sending the HTTP or '/' tags in the URL and wants to be encoded using UTF8 as per below comments;

___________________________________________________

Attachment URL's with Special Characters need to be encoded before sending to AN. Please find the steps to be performed to encode the Attachment URL.

Steps To Encode Attachment URL:

• Please use UTF-8 Encoding for Special Characters and escape the URL to send Attachments.

• The special characters need to be encoded in UTF-8 similar to what is given in below link.

http://www.w3schools.com/tags/ref_urlencode.asp

• We have tested =,&,[,] with UTF-8 encoding and it worked fine. Attachment went to AN with PO. Please do not encode "http://" in the URL. To check for supported protocol adapter uses substring from java String API to look for "http:" and "https:"

• If : is encoded then adapter recognizes this as unsupported protocol.

• Underscore (_) needs to be escaped as %5F

___________________________________________________

Pls. let me know if you used any encoding standards to convert the tags to UTF-8 before sending to Ariba Adapter or just sending out the complete URL.

Thanks,

Harish Kurup.

Former Member
0 Kudos

Hello Akhila,

I tried sending the complete link under the path /cXML/Request/OrderRequest/ItemOut/Comments but it never made it to Ariba.

I created a Change PO and even a new PO both did not make it to Ariba after I added the URL to the above path.


I used the URL  :           http://host:port/sap/ebp/docserver/HeaderAttachment.txt?

phioget&KpId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&KpClass=XXX_X_XXX&sap-client=XXX/HeaderAttachment.txt

Pls. guide the encoding for the URL.

Former Member
0 Kudos

I have tried to send an Encoded URL over to Ariba network but that too has failed;

We still don't see any attachments at the Ariab end.

http%3A%2F%2Fhosts%3Aport%2Fsap%2Febp%2Fdocserver%2FHeaderAttachment.txt%3Fphioget%26KpId%3DXXXXXXXXXXXXXX%26KpClass%3DBBP_P_DOC%26sap-client%3Dclient%2FHeaderAttachment.txt

Former Member
0 Kudos

Hi Harish,

Can you please try to encode only the file name which comes between /docserver/ and ?phioget .and keep rest all same and push to Ariba.

use the below code to encode the filename .

URLEncoder.encode(filename , "UTF-8");

This is how we have achieved.

Thanks&Regards,

Akhila.A

  

Former Member
0 Kudos

Hi Akhila,

Thank you for the reply.

Can you pls. share the actual complete URL you had tried. You may mask the host and port no , but keep the rest for better understanding.

Thanks again for the help.