Professional Documents
Culture Documents
Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner About
About
Home / Community / Blogs + Actions
Andreas Muno
more by this author
MM (Materials Management)
ariba | ariba-sap erp 6.0 | aribaintegration | badi | cxml | former jive document | invoice
share
0 share tweet share
Follow RSS
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 1/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
As you are integrating your SAP ERP MM with the Ariba Network to digitize and automate
your purchase order to invoice and payment processes in collaboration with your suppliers,
you will at some point in time have to test proper processing of cXML messages such as
invoices coming in from your suppliers on the Ariba Network. Well, before you go about
real data from your real suppliers, you may want to test with some dummy supplier on the
network.
If you were to do do something as “daring” as implement one of the Business Add-Ins (or BAdI for short, even
though they are also goodies for you, for sure), you’d want to see how the data coming in with the cXML
message are going to be processed in your ERP system. Alright. Do something daring today. Implement a
BAdI.
This test guide shall lead you through the respective testing procedure. It is provided with best knowledge
and intent, based on SAP–internal development and test landscapes. Customizations in your landscapes
may be different and will have to be adapted accordingly.
A test account as a supplier (sic) on the Ariba Network (ask your Ariba AE or support contact to
provide you with one, or just use the attached cXML template and test data files)
An SAP ERP system, at least at ECC 6.0, with the Ariba Network Integration for SAP Business
Suite Add-On 1.0 installed. How to do that is described in this help.sap.com link (scroll down to
Installation and Upgrade Information, and apply notes for Foundation Component ARBFNDI1 and
2 as applicable to your ERP release level, and the note for SAP ERP Integration Component
ARBERPI1).
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 2/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
Buyers who correspond with their suppliers using the Ariba Network can obtain cXML files of the
invoices the suppliers send them. The supplier needs to log on to his Ariba account, go to one of the last
invoices sent and export the cXML file. The cXML downloads as a text file.
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 3/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
For your convenience, a sample xml text is copied below at XML Sample, and I attached a template and
my own test data file for you.
Select the Enterprise Services Browser and find package ARBFND1_PRX. (If you can’t find that package for
the heck of it, the add-on has not yet been installed. Get your basis team to install that for you following the
instructions mentioned above at “Preconditions”.)
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 4/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
With the cursor still on object cXMLInvoiceDetailRequest_In start the test with function key F8. A popup
window appears which you just need to confirm.
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 5/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
In the request template, you need to replace the message type “String 1” with “InvoiceDetailRequest”,
and replace everything between <cXML> and </cXMLMessageContent> with the respective content
from your cXML file (in the attached zip). In order to do that, you first need to open the cXML Editor
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 6/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
using keys Ctrl+F2. For practical purposes, we shall assume it is indeed the InvoiceDetailRequest that you
are planning on testing.
From the cXML test file (below and attached), copy only the text in between <cXML payloadID … and
</Request></cXML>, but not the first two lines
Figure 7 – Insert the content from the cXML file into the Test Service Provider editor
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 7/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
Use the XML checker (function key F9) to ensure a well-formed XML. The checker will return with errors
that are easy to solve.
Figure 8 – The checker will throw errors which are easy to solve
Confirm the error, and see in which line the checker highlights the issue. Most likely, the text file has
separated strings that belong together for the XML parser to recognize. Just mend those lines by rejoining
loose ends. Here are some examples:
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 8/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
In Figure 9, the highlight in line 88 and the position of the cursor show where the parser stumbled. Apparently,
the bracket was not closed. You can easily fix that. Position the cursor after PA</ and delete the trailing white
space.
Once the white space is eliminated, test again, until no further issues occur and the checker confirms
“XML is well-formed”.
Here some more samples for errors and how the fix looks.
Figure 11 – Parser throws “Error while parsing an XML stream: ”=’ expected’.”
Here you’ve got to fix the connection of the open bracket at the end of line 122. See Figure 12 below.
Figure 12 – Line 122 had an open bracket. Close it by deleting trailing white space of line 122
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 9/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
Once the checker confirms “XML is well-formed”, you can go on and test the request.
A Response tab will open and likely show some error due to missing customer-specific configuration.
Figure 15 – The Response tab shows errors, mostly due to missing configuration
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 10/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
In transaction SPRO, open the SAP Reference IMG (F5) and follow this path of the SAP Customizing
Implementation Guide:
Integration with Other SAP Components > SAP Business Suite Integration Component for Ariba >
Application-Specific Settings > SAP ERP Integration Component for Ariba > Assign Ariba Network ID to
Company Code. Enter the network ID from your cXML file introduced by brackets <To> <Credential
domain=”NetworkID”> <Identity>, e.g. “AN02000277436” and assign a valid company code.
Retest the Request. You may have to restart the test by returning to transaction SPROXY. Download your
XML file and reload it as you restart the test.
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 11/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
In order to implement the BAdI method for processing Invoices, consider methods
DEFINE_CUST_SPEC_PROCESSING and MAP_INVC_TO_BUS2081_IN_PRE.
Bonne chance!
This concludes the test procedure. Please let me know your results, and suggestions for improvement.
XML Sample
[This sample was taken from a test supplier on the Ariba Network and represents a test invoice for
services]
08:00″><Header>
<From>
<Credential
domain=”NetworkID”>
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 12/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
<Identity>AN02000277438</Identity>
</Credential>
<Credential
domain=”VendorID”><Identity>9010</Identity></Credential><Credential
domain=”PrivateID”><Identity>9010</Identity></Credential></From>
<To>
<Credential
domain=”NetworkID”>
<Identity>AN02000277436</Identity>
</Credential>
</To>
<Sender>
<Credential domain=”NetworkID”>
<Identity>AN01000000001</Identity>
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 13/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
</Credential>
<UserAgent>SCMSupplier</UserAgent>
</Sender>
</Header>
<Request
deploymentMode=”production”><InvoiceDetailRequest><InvoiceDetailRequestHeader invoiceDate=”2015-11-10T12:49:13-
08:00″
purpose=”standard”><InvoiceDetailHeaderIndicator/><InvoiceDetailLineIndicator/><InvoicePartner><Contact
role=”remitTo”><Name
Supplier1</Name><PostalAddress><Street>PO12129</Street><Street/><Street/><Street/><City>Pittsburg</City><State>P
A</State><PostalCode>15222</PostalCode><Country
isoCountryCode=”US”>United
States</Country></PostalAddress></Contact></InvoicePartner><InvoicePartner><Contact
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 14/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
role=”billTo”><Name
xml:lang=”en”>BestRun USA</Name><PostalAddress
name=”IDES
YORK</City><State>NY</State><PostalCode>10019</PostalCode><Country
isoCountryCode=”US”/></PostalAddress><Phone><TelephoneNumber><CountryCode
isoCountryCode=”US”>1</CountryCode><AreaOrCityCode> </AreaOrCityCode><Number>212-345-
0983</Number></TelephoneNumber></Phone><Fax><TelephoneNumber><CountryCode
isoCountryCode=”US”>1</CountryCode><AreaOrCityCode> </AreaOrCityCode><Number>212-345-
5693</Number></TelephoneNumber></Fax></Contact></InvoicePartner><InvoicePartner><Contact
role=”from”><Name
Supplier1</Name><PostalAddress><Street>.</Street><Street/><Street/><Street/><City>New
York</City><State>NY</State><PostalCode>10021</PostalCode><Country
isoCountryCode=”US”>United
States</Country></PostalAddress></Contact></InvoicePartner><InvoicePartner><Contact
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 15/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
role=”billFrom”><Name
Supplier1</Name><PostalAddress><Street>.</Street><Street/><Street/><Street/><City>New
York</City><State>NY</State><PostalCode>10021</PostalCode><Country
isoCountryCode=”US”>United
States</Country></PostalAddress></Contact></InvoicePartner><InvoicePartner><Contact
role=”soldTo”><Name
xml:lang=”en”>LOB NALA
BUYER2</Name><PostalAddress><Street>PO12129</Street><Street/><Street/><Street/><City>Pittsburg</City><State>PA</
State><PostalCode>15222</PostalCode><Country
isoCountryCode=”US”>United
States</Country></PostalAddress></Contact></InvoicePartner><InvoiceDetailShipping><Contact
role=”shipFrom”><Name
Supplier1</Name><PostalAddress><Street>PO12129</Street><Street/><Street/><Street/><City>Pittsburg</City><State>P
A</State><PostalCode>15222</PostalCode><Country
isoCountryCode=”US”>United
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 16/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
States</Country></PostalAddress></Contact><Contact
addressID=”3200″ role=”shipTo”><Name
xml:lang=”en”>Atlanta</Name><PostalAddress
street South</Street><City>ATLANTA</City><State>GA</State><PostalCode>30310</PostalCode><Country
isoCountryCode=”US”/></PostalAddress><Phone><TelephoneNumber><CountryCode
isoCountryCode=”US”>1</CountryCode><AreaOrCityCode/><Number>040-22707-
0</Number></TelephoneNumber></Phone><Fax><TelephoneNumber><CountryCode
isoCountryCode=”US”>1</CountryCode><AreaOrCityCode/><Number>040-22707-
101</Number></TelephoneNumber></Fax></Contact></InvoiceDetailShipping><PaymentTerm
payInNumberOfDays=”14″><Discount><DiscountPercent
percent=”3.000″/></Discount></PaymentTerm><PaymentTerm
payInNumberOfDays=”30″><Discount><DiscountPercent
percent=”2.000″/></Discount></PaymentTerm><PaymentTerm
payInNumberOfDays=”45″><Discount><DiscountPercent
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 17/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
percent=”0.00″/></Discount></PaymentTerm><Extrinsic
name=”invoiceSourceDocument”>PurchaseOrder</Extrinsic><Extrinsic
name=”invoiceSubmissionMethod”>Online</Extrinsic></InvoiceDetailRequestHeader>
<InvoiceDetailOrder><InvoiceDetailOrderInfo><OrderReference orderID=”4500025775″><DocumentReference
payloadID=”005056834D3E1ED5A1FBD5C2FFD76286″></DocumentReference></OrderReference></InvoiceDetailOrderInfo><Invo
lineNumber=”1000200010″><Description xml:lang=”en”>Gardening
Servies</Description></InvoiceDetailServiceItemReference><ServiceEntryItemReference serviceEntryDate=”2015-11-
2025126069885812817@216.109.98.100″></DocumentReference></ServiceEntryItemReference><SubtotalAmount><Money
currency=”USD”>1700</Money></SubtotalAmount><UnitOfMeasure>HUR</UnitOfMeasure><UnitPrice><Money
currency=”USD”>17</Money></UnitPrice><GrossAmount><Money
currency=”USD”>1700</Money></GrossAmount><NetAmount><Money
currency=”USD”>1700</Money></NetAmount></InvoiceDetailServiceItem></InvoiceDetailOrder><InvoiceDetailSummary><Su
btotalAmount><Money currency=”USD”>1700</Money></SubtotalAmount><Tax><Money
percentageRate=”0″><TaxableAmount><Money currency=”USD”>1700</Money></TaxableAmount><TaxAmount><Money
Exempt</Description></TaxDetail></Tax><GrossAmount><Money
currency=”USD”>1700</Money></GrossAmount><NetAmount><Money
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 18/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
currency=”USD”>1700</Money></NetAmount><DueAmount><Money
currency=”USD”>1700</Money></DueAmount></InvoiceDetailSummary></InvoiceDetailRequest>
</Request>
</cXML>
Alert Moderator
2 Comments
You must be Logged on to comment or reply to a post.
Former Member
Hi Andreas,
Thanks
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 19/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
Varun Goel
Former Member
Hi Andreas,
<text>Cannot determine last retry information for XML msg. ID 005056B11EF01ED5BF946C33B116ACE4; contact SAP”. This
message belongs to message class ARBFND_FRW.</text>
Upon further analysis, the source of this error message seems like a missing protocol “IF_WSPROTOCOL_SEQUENCE”. could
you please suggest if any other configurations are required.
Thanks
Varun Goel
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 20/21
9/10/2018 Testing Ariba Network integration cXML with SAP ERP MM | SAP Blogs
https://blogs.sap.com/2015/11/24/testing-ariba-network-integration-cxml-with-sap-erp-mm/ 21/21