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.
Figure 1 Ariba Network - Supplier View of an Invoice
Figure 2 cXML downloads as text file
Figure 3 cXML Text File Sample
In the SAP ERP system, use transaction SPROXY.
Figure 4 SPROXY - Enterprise Service Browser - ARBFND1_PRX
Doubleclick on Object cXMLInvoiceDetailRequest_In to obtain the object details displayed in figure 4 on the right hand side.
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 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
<?xml version="1.0"encoding="UTF-8"?> and <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.028/InvoiceDetail.dtd">.
Figure 7 - Insert the content from the cXML file into the Test Service Provider editor
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:
Figure 9 - XML parser found an open bracket and threw an error
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.
Press Execute button or use function key F8.
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
Typical errors related to missing configuration are identified as
In order to eliminate message 028, assign a company code to the network ID in customizing.
In transaction SPRO, open the SAP Reference IMG (F5) and follow this path of the SAP Customizing Implementation Guide:
In transaction se80, you can set a breakpoint in class CL_ARBERP_MAP_IN, METHOD: IF_ARBFND_APPL_IN~EXECUTE_APPLICATION_INBOUND, at “me->call_define_cust_spec_pro_badi”.
Or you set a breakpoint in class CL_ARBERP_MAP_IN, method CALL_DEFINE_CUST_SPEC_PRO_BADI.
In order to implement the BAdI method for processing Invoices, consider methods DEFINE_CUST_SPEC_PROCESSING and MAP_INVC_TO_BUS2081_IN_PRE.
Implement the BAdI from the IMG (Figure 16).
Bonne chance!
This concludes the test procedure. Please let me know your results, and suggestions for improvement.
[This sample was taken from a test supplier on the Ariba Network and represents a test invoice for services]
<cXML payloadID="1447188553507-8319620044300512987@216.109.98.100" timestamp="2015-11-10T12:49:13-
08:00"><Header>
<From>
<Credential
domain="NetworkID">
<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>
</Credential>
<UserAgent>SCMSupplier</UserAgent>
</Sender>
</Header>
<Request
deploymentMode="production"><InvoiceDetailRequest><InvoiceDetailRequestHeader invoiceDate="2015-11-10T12:49:13-
08:00"
invoiceID="INV025775" invoiceOrigin="supplier" operation="new"
purpose="standard"><InvoiceDetailHeaderIndicator/><InvoiceDetailLineIndicator/><InvoicePartner><Contact
role="remitTo"><Name
xml:lang="en">9010 LOB Nala
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
role="billTo"><Name
xml:lang="en">BestRun USA</Name><PostalAddress
name="IDES
US INC"><Street>1230 Lincoln Avenue</Street><City>NEW
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
xml:lang="en">9010 LOB Nala
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="billFrom"><Name
xml:lang="en">9010 LOB Nala
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
xml:lang="en">9010 LOB Nala
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><Contact
addressID="3200" role="shipTo"><Name
xml:lang="en">Atlanta</Name><PostalAddress
name="default"><Street>867 1 300 Peach tree
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
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
iceDetailServiceItem invoiceLineNumber="1" quantity="100"><InvoiceDetailServiceItemReference
lineNumber="1000200010"><Description xml:lang="en">Gardening
Servies</Description></InvoiceDetailServiceItemReference><ServiceEntryItemReference serviceEntryDate="2015-11-
10T12:43:16-08:00" serviceEntryID="SES25775" serviceLineNumber="1"><DocumentReference payloadID="1447188196796-
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
currency="USD">0.00</Money><Description xml:lang="en"></Description><TaxDetail category="Tax Exempt"
percentageRate="0"><TaxableAmount><Money currency="USD">1700</Money></TaxableAmount><TaxAmount><Money
currency="USD">0.00</Money></TaxAmount><Description xml:lang="en">NALA LOB
Exempt</Description></TaxDetail></Tax><GrossAmount><Money
currency="USD">1700</Money></GrossAmount><NetAmount><Money
currency="USD">1700</Money></NetAmount><DueAmount><Money
currency="USD">1700</Money></DueAmount></InvoiceDetailSummary></InvoiceDetailRequest>
</Request>
</cXML>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |