Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
belan
Explorer
Integration of SAP ERP system with external invoicing system via SAP XI.

Preamble.

This article describes an example of a solution for integrating the SAPERP system with an external invoice generation system. The article is presented from the point of view of SAPERP implementation team in terms of logistics and will be useful for them. The solution architecture, composition and main function of the functional modules are described.

Content.

Preamble. 1

Content. 1

Introduction. 1

General architecture of the solution. 1

Master data for exchange. 2

Chain using the purchase order. 3

Mapping data from SAP and from a vendor to Ascendo. 4

Document chain withoutpurchase order. 7

Addition Integration Monitor. 9

Conclusion. 9

 

Introduction.

When the SAP ERP system was implemented at some enterprise in the EU, the client used, among other things, the ASCENDO invoice accounting system in the existing system landscape.It is intended for the following functions:

  • for scanning and loading printed forms of invoices received from suppliers,

  • for data recognition,

  • for the formation of an invoice document,

  • to define account assignment parameters,

  • for reconciliation and posting of an invoice,

  • for the formation of payment documents.


The customer decided to keep this system. Our project team from SAP-side implemented integration with this system. Developments for integration from the external system were conducted by a group from Ascendo.

General architecture of the solution.

As an exchange infrastructure between SAP ERP and the external invoicing system, the SAP XI system was used.In SAP ERP, functional modules were developed. It allowed to push data from SAP ERP to SAP XI for further sending to the external system. And also receive data from SAP XI in SAP ERP and form documents based on them.

The integration process from a technical point of view included:

  • The main SAP ERP system.

  • External system for the formation and release of Ascendo invoices.

  • SAP XI exchange


From an organizational point of view, the process was divided into:

  • Exchange of master data in manual or automatic mode.

  • Formation of invoices using purchase orders.

  • Formation of invoices without the use of purchase orders.


From the point of view of the user interface, the following objects were used in the exchange process:

  • Standard transactions SAP ERP for the maintenance of master data.

  • A general corporate interface for maintaining additional settings in SAP ERP.

  • Standard SAPERP transactions for the creating of purchase orders, goods receipts (services).

  • Standard XI monitor and developed transaction in the SAP ERP of the integration monitor.

  • Standard functionality of SAP XI.

  • External system for the formation and release of invoices.


Master data for exchange.

It was intended to exchange the following data as master data (Figure 11.):

  • Account Assignment Objects:

    • General ledger accounts.

    • Cost centers.

    • Plant maintenance orders, controlling orders, production orders, sales orders.

    • WBS-elements.



  • Purchasing groups.

  • Vendor masters.

  • Codes and rates of currencies.


The material-stock GL-accounts are used as account assignment for goods receipt to warehouse. Also, the purchasing group was used as an additional sign in account assignment in all invoices.It corresponded to the subdivision - the applicant of the requirements or the warehouse, on which the material was receipt.For services and investments, the classic account assignment objects were used.The composition and format of these master data in SAP ERP and the external system was synchronized.Some of the master data was adapted through intermediate tables.For example, the code for some GL-accounts in Ascendo,  consisted of four characters, the vendor code consisted of connecting the fields of the supplier's number, country, bank account number. Further synchronization of master data was assumed based on the results of running periodic tasks for the execution of functional modules in SAP ERP.The updated data tables were transferred through the SAP XI to the external system.The functional modules responsible for downloading the master data had tuning parameters. Organizational levels and frequency of exchange for the transmitted data can be configured through the corporate-wide configuration management interface (ZSPRO).The purchasing group table is rarely changeable, so it was downloaded to the external system and it is supposed to be manually updated.



Figure 1. Transferring the master data to the external system.

Chain using the purchase order.

Most purchases of materials and services in the enterprise are expected through the creation of a purchase order in the SAP ERP system. Goods receipt or services entry sheet is also generated only in SAP ERP. However, in the external system it is necessary to use up-to-date and detailed information about orders and actual parishes. Each saving of an order and a material document to it, initiates the launch of a functional module for transferring data from the purchase order and from the material document. In this way, changes in orders and the entire history of PO items, including reversing documents, are also transmitted.

Figure 2 shows the scheme for generating an invoice using a purchase order. After receiving data from the SAP and from the supplier from the incoming invoice, these data are compared in Ascendo-system. The user exercising (controlling) such binding checks the correctness of account assignment, amounts and other attributes. If the result of the check is positive, the invoice in Ascendo is sent for approval. At the same time, data is sent from Ascendo to SAP in the form of an XML file corresponding to the saved invoice. This received package starts the execution of the function module in the SAP ERP, creating a parked invoice in SAP.This function module is based on BAPI_INCOMINGINVOICE_CREATE1.Based on the results of the creation of a parked invoice from SAP to Ascendo, confirmation is coming to change the status of the invoice. After approval of the invoice to Ascendo,a message is sent to SAP ERP where the function module post the parked invoice.The functionality also includes the possibility of rejecting the invoice during the reconciliation process.Cancelation of the invoice and subsequent creation of the corrective is performed only for technical purposes in SAPERP using standard transactions.



Figure 2. Generating invoices for purchase orders.

Mapping data from SAP and from a vendor to Ascendo.

The data received from SAP was automatically matched against the data obtained from the invoice scan by the SAP purchase order number or manually through the search for other attributes. (Seetable 1).




















































Data in Ascendo from SAP Data in Ascendo from vendor
Organizational data of the company (company code) Organizational data of the company (company code)
User
Numbers of purchase order/item, addition numbers
PO date, goods receipt date PO date,invoice date
Information about the supplier Information about the supplier
Terms of payment Terms of payment
Currency Currency
ID and text of the material (service) ID and text of the material (service)
Actual quantity, unit of measure, value from the goods receipt from the order item Actual quantity, unit of measure, value from the invoice items
Account assignment (GL-account, cost center, internal order, WBS-element, purchasing group)
Scan-copy of original invoice


 

Table 1. Mapping data from SAP and from the vendor from Ascendo.

The Ascendo system works through the WEB-interface. The Matched data of header looks in the interface, as shown in Figure 3.



Figure 3. Matching of the headers data of invoice and data from SAP in the Ascendo system.

When you assign data to the Ascendo invoice from the SAP purchase order, the item data is also pulled up. In Figure 4, you can see an example for material items. In this case, the "Material data" tab contains lines that indicate:

  • Purchase order

  • Material

  • Quantity.

  • P

  • Value.

  • Order item

  • Text of PO-item.

  • Goods receipt item number, composed of several numbers.

  • User.




Figure 4. An example of the obtained item data items from SAP.

Account assignment data is also transferred from SAP. For materials arriving at the warehouse, an example in Figure 5, you can see the stock GL-account number from 4 symbols, the purchasing group code of the corresponding unit (warehouse, workshop), the cost of the item and the login of the approval user. In addition, there is a line in which you can specify deviations between the cost from the order (goods receipt) and the invoice.



Figure 5. An example of the received account assignment data from PO-items of SAP.

Figure 6 shows an example of data transferring PO-item with service from SAP to Ascendo.The transmitted information is like the material items.In this case, the service number is transmitted instead of the material number.The number of the automatically generated goods receipt document consists of the purchase order number - the number of PO-item - the year of the material document - the material document number - the item number of the material document.

For example: 2500639295-00010-2018-5003283530-0001



Figure 6. Example of received PO-item with service from SAP.

The traditional account assignment is necessarily transferred for services, among other things.In this case, this is a plant maintenance order 835010002155. In the Ascendo interface, you can see this on another tab, Figure 7.The general ledger account 3209020011 is automatically converted to Ascendo GL-account 5513 by mapping table.The purchasing group KPM corresponds to a certain subdivision (workshop).The first line of the account assignment displays the VAT amount and the GL-account 2641 for its accounting.



Figure 7. An example of the received account assignment data for services items from SAP.

The corresponding function module in the SAP ERP system is created a parked invoice after saving the invoice and sending it for approve. Then after approval in Ascendo, the invoice is posted in the SAP ERP. Figure 8 shows the posted invoice. It been created in SAP ERP for the purchase order for services, based on integration with Ascendo.



Figure 8. An example of the invoice created in SAP ERP based from Ascendo data.

Document chain without purchase order.

Some periodically purchased services under framework agreements (electricity, water, rent) were posted in SAP without a purchase order (Figure 9).In this case, the pre-configured account assignment variant (cost center, GL-account, purchasing group) and data from supplier invoice are matching by financial manager in Ascendo. After entering the account assignment and checking the invoice, the user saves it. Next a XML file is created in the Ascendo and sent to the SAP. Next, the function module in the SAP ERP creates a preliminary act with reference to the contract (Z-document) based on the received XML file.At the same time, if you save to Ascendo, the invoice is sent there for approval.After full agreement in Ascendo the second XML-file is transferred to SAP ERP.Based on the second XML file, the function module in SAP creates an accounting document - an invoice posting.After the creation in SAP ERP of the preliminary act and the accounting document in Ascendo, a report on the successful action is received from SAP and this changes the status of the invoice.



Figure 9. Generating invoices without purchase orders.

In Figure 10, you can see the integration of the invoice in Ascendo and the automatically created on its basis an accounting document in SAP.It also includes a link to the contract and additional numbers. SAPERP also automatically creates a controlling document.



Figure 10. Example of data mapping of Ascendo-SAP without a purchase order.

Addition Integration Monitor.

To receive and send data to SAP ERP, functional modules and tables were created that contained received / transmitted data.For the convenience of tracking the status of documents, as well as for the convenience of correcting wrong situations, the transaction "Integration Monitor" was developed in SAP ERP.The use of the monitor was especially useful during the testing of complex examples.With the help of this functionality, it was possible to simulate a certain action in the Ascendo system without having the technical ability to fully study the "foreign side" when integrating systems.In addition, we used the functionality of SAPXI, which allowed us to analyze the status of the exchange. Figure 11 shows the interface of the integration monitor.



Figure 11. The interface of the integration monitor in SAP ERP.

Conclusion.

Integration of SAP ERP with the external invoicing system of Ascendo was launched from the time of the general Go-Live productive start (January). Three months of pilot operation of the SAP ERP system showed good performance. With work in Ascendo is used by one user from the financial department and by the CEO who personally approving of certain invoices.

Verification of the comparison of data received from SAP and data from the incoming invoice from the supplier was the most time-consuming for users at the initial stage. However, this allowed to regulate the order, to eliminate the existing gap between the received and paid invoices and the corresponding operations for the purchase of materials and services.

At present (April 2018) the system has been completely transferred to the support mode.