Exploring Invoice Flow

Objective

After completing this lesson, you will be able to identify how to configure invoice flows and define the types of invoices supported by CIG.

Invoice Flow

An invoice is a commercial document issued by a seller, to a buyer, indicating the products, quantities, and agreed prices for products or services the seller had provided the buyer.

Suppliers send invoices from Ariba Network to buyers on the SAP ERP or SAP S/4HANA system.

Types of Invoices supported:
  • PO-based Invoice.
  • Non-PO based Invoice with or without accounting information.
  • Header-level Credit Memos against Purchase Order based invoices created on Ariba Network and then reconciled in the SAP Ariba Procurement Solution.
  • Header-level Credit Memos against Non-PO Invoices created in the SAP Ariba Procurement Solution.
Invoices supported can be of following categories:
  • Standard Invoice
  • Service Invoice
  • Summary Invoice
  • Direct Invoicing of Purchase Order Service Items
  • ERP-Initiated Invoice
Additional Information:
  • Although the invoice for the Service Sheets contains taxes and other charges, the SAP Ariba AddOn does not process the taxes in the service sheet.
  • To receive Invoices created against Purchase Order service lines, Buyer Administrators are required to use the service-based invoicing functionality on SAP ERP or SAP S/4HANA.
  • The S.-Based IV indicator on the Invoice tab of the purchase order contains service lines.
    • This option is required to create separate line items for each service line in the invoice created on SAP ERP or SAP S/4HANA.
Pre-requisites:
  • Ariba AddOn package should be downloaded in your SAP system.
  • Ensure that the parameter INVOICE_ENABLED is set.
  • SAP Cloud Connector is installed & configured (for Direct Connect option).
  • Supported middleware should be configured (for Mediated Connect option).
  • CIG is enabled through your AN Buyer Account & you have P User info.
  • SAP system information is sent to CIG.
  • AN Buyer & Supplier relationship should exist.
  • Purchase Order configuration should be in place.

Invoice Flow – Configuration in Ariba Network

Specify Default Transaction Rules

Steps

  1. Login to your Ariba Network Buyer account.

    • Click on Administration
    • Click on Configuration
    SAP Ariba interface showing Administration dropdown with Configuration selected, vendor enablement status metrics, and Vendor summary panel on right.
  2. Click on Default Transaction Rules.

    SAP Ariba configuration screen displaying company settings options, with Default Transaction Rules highlighted and Done buttons shown for navigation.
  3. Specify the rules by checking boxes against individual rules & click Save.

    Invoice Rules configuration page in SAP Ariba displaying checkbox options for various supplier invoice permissions and requirements, some selected.

    Note

    Specifying Invoice Transaction Rules is completely based on business requirements of individual customer.

    There are many Invoice Rules listed in Ariba Network. Based on business requirements, customer needs to enable:

    • General Invoice Rules
    • PO Invoice Field Rules
    • PO and Non-PO Invoice Field Rules
    • Invoice Address Rules
    • Blanket Purchase Order Invoice Rules
    • Invoice Payment Rules
    • VAT Rules

Invoice Flow – Configuration in CIG

In this lesson we will focus on the configurations in CIG that are very specific to Invoice integration:

  • Enable CIG for your Ariba Network Buyer Account.
  • Provide Basic Information in the project in CIG for "Product = Ariba Network".
  • Define Connection information to establish connectivity between CIG & your SAP system.
  • Define Cross Reference for Parameter for Invoice (Doc Type – InvoiceDetailRequest)
  • Define Cross References for UOM.
  • Define Cross Reference for Lookup Table not required for Ariba Network Invoice Integration.
  • Review project configuration & Confirm the Project.
  • Test the Project.
  • Deploy the Project.

Cross-Reference Configuration - Parameter

You need to define values in the parameter fields that you want to map. The transactions & the related parameters are added by the administrator. You can define the values for both test & production environments.

Follow these steps to define parameters:

Steps

  1. Select the Document Type = InvoiceDetailRequest in Parameters tab & click Add.

    SAP Cloud Integration Gateway interface showing Cross Reference Configuration with document types, test/production status, and Add button highlighted.
  2. Edit the entry.

    SAP Cloud Integration Gateway table listing document types with ReceiptRequest entry highlighted, showing Test/Production statuses and Edit action selected.
  3. Enter values for the parameters in the TEST.

    Environment and PROD Environment & click Save. If you want to have different value in PROD Environment, uncheck the box Use same values.

    SAP Cloud Integration Gateway configuration screen for ReceiptRequest, showing TEST/PROD environments, input fields, Use same values, and Save button.
  4. Enter parameter values for another Document Type as needed or click Next.

    SAP Cloud Integration Gateway page in Project Wizard showing Cross Reference Configuration, document types dropdown, and Next button highlighted.
    • Invoice Header Text ID: Provide the text ID of a specific comment field at header level of your invoice in SAP system that you would want to map in an invoice received from Ariba Network.
    • Add cXML Payload as an Attachment: Check this box to download the cXML payload & attach it to an invoice when the invoice is created in the SAP ERP system.
    • Invoice Port Name: Maintain value of your SAP’s logical system ID. In SAP, port name is a required field while processing an incoming IDoc. If this value is missing, IDoc processing will fail in SAP system.
    • Invoice LS Enabled: Maintain X in uppercase (means True).
    • Invoice Default Lang: Always maintain en for English.

    Note

    Text ID: The Text ID is an identifier to differentiate between various types of texts / comments. In SAP system, you can find more than one text / comment fields at header as well as line item level. Each of these text / comment fields are identified by a unique Text ID.

Invoice Flow – Configuration in SAP System – Global Settings

Ensure that following configurations of Global Settings section are in place:

  • Define Authorizations
  • Enable Integration through Middleware (For Mediated Connectivity customers only)
  • Maintain Certificates
  • Create RFC Destination
  • Create Port Definition
  • Configure Receiver Port
  • Create Logical System
  • Send SAP Information to CIG
  • Maintain Parameters for Attachments Support
  • Map Variants & Partitions (Not applicable for Ariba Network Integration)
  • Maintain BAdIs as per your requirements

Invoice Flow – Configuration in SAP System – General Settings

To navigate to general settings in SAP ERP and SAP S/4 HANA for Ariba Network Transactions

  • Run the transaction code SPRO – The Customizing: Execute Project screen appears.
  • Click SAP Reference IMG – The Display IMG screen appears.
  • Navigate to –
    • Integration with Other SAP ComponentsSAP Ariba Cloud Integration GatewayAriba Network IntegrationGeneral Settings
SAP Display IMG screen showcasing Ariba Network Integration expanded to reveal General Settings, with hierarchical structure and menu options displayed.

Ensure that following configurations of General Settings section are in place:

  • Setup the Interface
  • BAdIs for Setting Up Interface
  • Create Partner Profile for House Bank
  • Configure Document Status Update
  • Enable Supply Chain Collaboration (based on requirement)
  • Enable Vendors
  • Maintain Vendor for the Outbound Transaction
  • Enable External Format Conversion
  • Plant Specific Time Zone Conversion

Invoice Flow – Configuration in SAP System – Transaction Specific Settings

SAP Display IMG interface showing Ariba Network Integration expanded with Application Specific Settings highlighted, listing configuration activities underneath.

To configure Ariba Network transactions:

  • Run the transaction code SPRO – The Customizing: Execute Project screen appears.
  • Click SAP Reference IMG – The Display IMG screen appears.
  • Navigate to:
    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings

All the supported transactions for Ariba Network Integration are listed under Application Specific Settings.

Information on how to configure each of the supported Ariba Network transactions is detailed out in SAP Ariba Cloud Integration Gateway Configuration Guide.

In this section, we will look into the configurations of a sample IDOC inbound (Invoice) transaction required on the SAP AddOn to map the transactions and messages to cXML and send it to Ariba Network.

To receive an Invoice sent by suppliers from Ariba Network to SAP System, you need to perform following activities:

  • Maintain Parameters for Invoice
  • Maintain SAP Company Code for Each of the Partners
  • Maintain Tax Code between the External System & the SAP Tax Codes
  • Maintain the Posting Keys & Document Types for Each Company Code
  • Implement Customer Exit for Invoices with Service Type Line Items
  • Enable Attachments & Comments for Invoices
  • Map cXML Partner to ERP Invoicing Party

Note

There are some pre-requisites and limitations for the Invoice scenario. Please refer to the CIG Overview Guide & CIG Configuration Guide for details.

Maintain Parameters

  • Run the transaction code SPRO – The Customizing: Execute Project screen appears.
  • Click SAP Reference IMG – The Display IMG screen appears.
  • Navigate to:
    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
  • Expand the Invoice section & click IMG-Activity for "Maintain Parameters for Invoice"

The Parameters – Invoice screen appears.

  • Maintain parameters as mentioned in the table.

Parameter NameDescriptionSupported Values
INVOICE_ENABLEDEnable or disable the SAP Ariba provided enhancements for Invoice.
  • Variable Name: INVOICE_ENABLED
  • Field Name: Leave it empty
  • Number: 0000
  • Low: X to enable or blank
INVOICE_PARK_NO_ACCEnable or disable the parking of non-PO invoices without accounting details received from Ariba Network.
  • Variable Name: INVOICE_PARK_NO_ACC
  • Field Name: Leave it empty.
  • Number: 0000
  • Low: X (to enable) or leave it blank (to disable).
INV_HDR_PRK_NOSES_POGRX_ENBEnable or disable the SAP Ariba provided enhancements to park the invoice created directly from a service purchase order before initiating the service entry sheet.
  • Variable Name: INV_HDR_PRK_NOSES_POGRX_ENB
  • Field Name: Leave it empty.
  • Number: 0000
  • Low: X (to enable) or leave it blank (to disable).
SAP IMG screen displaying the navigation path to Maintain Parameters for Invoice under SAP Ariba Cloud Integration Gateway settings.
SAP Parameters - Invoice screen showing variable names, field names, and values, such as INVOICE_ENABLED and INVOICE_PARK_NO_ACC.

Maintain SAP Company Code for Each Partner

SAP IMG screen displaying the navigation path to Maintain SAP Company Code for Each of the Partners under Invoice settings.
SAP Change View screen for EDI: Assign Name in the Invoice <-> Company Code showing Partner Type, Number, and Code.
Table showing Partner Type, Partner Number, Company Code Name in the invoice, and Company Code for three listed entries.

This step is needed to set EDI profile for invoice processing. This allows IDOCs from outside the system to be posted for a specific company code. If this is not maintained, an error may occur.

  • Navigate to:
    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
  • Expand Invoice section & click IMG-Activity for "Maintain SAP Company Code for Each of the Partners"

The Change View "EDI: Assign Name in the Invoice <-> Company Code": Overview screen appears.

  • Click New Entries.
  • Maintain SAP company code for each of the partners & click Save.

Maintain Tax Code Between External System & SAP Tax Codes

SAP Display IMG screen showing the navigation structure and options under SAP Ariba Cloud Integration Gateway for customization settings.
SAP IMG screen showing the highlighted option Maintain Tax Code between the External System and the SAP Tax Codes under Invoice.
SAP Change View screen for EDI: Conversion of External Tax Rate <-> Tax Code showing Partner Type, Tax Type, and Rate details.

Buyer users need to maintain Tax Code mappings between the external system & SAP tax codes.

To maintain the Tax Code mappings:

  • Navigate to:
    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
  • Expand the Invoice section & click IMG-Activity for "Maintain Tax Code between the External System and the SAP Tax Codes"
  • The Change View "EDI: Assign Name in the Invoice <-> Company Code" screen appears.
  • Click New Entries.
  • Maintain SAP company code for each of the partners & click Save.

Maintain Posting Keys & Document Types for Each Company Code

SAP Display IMG screen showcasing the navigation menu for SAP Ariba Cloud Integration Gateway, including Global and Application Specific Settings.SAP IMG screen highlighting the option Maintain the Posting Keys and Document Types for Each Company Code under Invoice settings.
SAP IMG screen highlighting the option Maintain the Posting Keys and Document Types for Each Company Code under Invoice settings.

Buyer users need to maintain Posting Keys & Document Types for each Company Code. When SAP system receives invoices from Ariba Network, it creates and stores the invoice through the IDoc.

  • Navigate to:
    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
  • Expand the Invoice section & click IMG-Activity for "Maintain the Posting Keys and Document Types for Each Company Code "

The Change View "EDI-INVOIC: Program Parameters": Details screen appears.

  • Click New Entries to create an entry at the vendor or logical system level in the Partn. Type field
SAP screen for New Entries: Details of Added Entries showcasing partner type, partner number, company code, and posting details configuration.
  • Enter the Partner No. & Company Code.
  • Enter a value for the following keys in the Posting Details section:
    • G/L db.pstg ky: Enter a value for the General Ledger Debit Memo Posting Key: 40 (For example)
    • G/L cr.pstng ky: Enter a value for the General Ledger Credit Memo Posting Key: 50 (For example)
    • Vend deb.pstng ky: Enter a value for the Debit Memo Posting Key for the Vendor: 21 (For example)
    • Vend cred.pstng ky: Enter a value for the Credit Memo Posting Key for the Vendor: 31 (For example). Invoice doc. type: Enter a value for the Document Type: RE (For example)
    • Cred.memo doc. type: Enter a value for the Document Type: KG (For example)
  • Click Save.

Implement Customer Exit for Invoices with Service Type Line Items

Buyer users need to add customer exits to invoices with service type line items to make specific integration requirements.

Steps

  1. Navigate to:

    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
    SAP Display IMG screen showing Invoice settings with the highlighted option Implement Customer Exit for Invoices with Service Type Line Items.
  2. Expand the Invoice section & click IMG-Activity for "Customer Exit for Invoices with Service Type Line Items"

    Note

    Standard SAP IDoc (INVOIC) doesn’t support Service Invoicing. So, this exit is handling Service Invoicing functionality.

    Implement this exit to call the provided "includes".

    The Project Management of SAP Enhancements screen appears.

  3. Enter name of the Project. If you already have an existing SAP project for enhancement MRMH0002, use the same project.

    SAP screen for Project Management of SAP Enhancements highlighting project field, project ID ZTRAIN, and create button for configurations.
  4. Click Create & enter a description in the Short Text field.

    SAP screen for Attributes of Enhancement Project ZTRAIN showing project title Service Invoice, administrative data, and save button highlighted.
  5. Click Save.

  6. In the Create Object Directory Entry popup, specify your Z or Y package & save the package to a transport request or select Local Object.

    SAP screen displaying Attributes of Enhancement Project ZTRAIN with the Create Object Directory Entry popup and local object button highlighted.
  7. Click Enhancement assignments.

    SAP screen for Attributes of Enhancement Project ZTRAIN showing Enhancement Assignments tab highlighted, administrative data, and project status inactive.

    The SAP Enhancements in Enhancement Project ﹤object name﹥ page appears.

  8. Input value MRMH0002 in the Enhancement field & then press Enter.

    SAP screen for SAP Enhancements in Enhancement Project ZTRAIN showing MRMH0002 enhancement ID highlighted with text description for EDI inbound.
  9. Click Components.

    SAP screen for Attributes of Enhancement Project ZTRAIN showing Components tab highlighted, administrative data, Service Invoice text, and project status.
  10. Double-click EXIT_SAPLMRMH_011. The program INCLUDE - ZXM08U22 appears.

    SAP screen displaying Display ZMRMH with function exit EXIT_SAPLMRMH_011 highlighted under MRMH0002 Logistics Invoice Verification: EDI inbound enhancement project.
  11. Double-click INCLUDE - ZXM08U22 in the Function Builder: Display EXIT_SAPLMRMH_011 page to create the program.

    SAP Function Builder screen displaying function module EXIT_SAPLMRMH_011 with source code, import/export parameters, and include ZXMO8U22 highlighted.
  12. Enter the include: INCLUDE ARBCIG_INCL_INCOMING_INVOICE01 IF FOUND. Click Save & then click Activate.

    ABAP Editor screen displaying include ZXMO8U22 with highlighted line for INCLUDE arbciq_incl_incoming_invoice01 IF FOUND and toolbar icons.
  13. Repeat Step 9 – 12 to create the customer exit for EXIT_SAPLMRMH_014 for program INCLUDE ZXM08U25.

    SAP Function Builder screen displays EXIT_SAPLMRMH_014 function module with source code, highlighting INCLUDE ZXMO8U25 and toolbar navigation options.
  14. Enter the include: INCLUDE ARBCIG_INCL_INCOMING_INVOICE03 IF FOUND. Click Save & then click Activate.

    ABAP Editor screen shows include ZXMO8U25 with highlighted line for INCLUDE arbCIG_incl_incoming_invoice03 IF FOUND and toolbar icons.
  15. Repeat Step 9 – 12 to create the customer exit for EXIT_SAPLMRMH_015 for program INCLUDE ZXM08U26.

    SAP ABAP screen showing Function Module EXIT_SAPLMRMH_015 with include ZXMO8U26 highlighted in the source code tab.
  16. Enter the include: INCLUDE ARBCIG_INCL_INCOMING_INVOICE02 IF FOUND. Click Save & then click Activate.

    SAP ABAP Editor screen displaying Include ZXMO8U26 with highlighted code line for arb_cig_incl_incoming_invoice02 IF FOUND logic.
  17. Go back to the Project Management of SAP Enhancements screen & Activate the customer exit.

    SAP Project Management screen for Enhancements with project ZTRAIN highlighted, options for attributes, enhancement assignment, components, and documentation.

Enable Attachments and Comments

Buyer users can activate the following event type linkage to enable attachments and comments for invoices.

Standard SAP IDOC doesn’t support attachments & comments, so this event linkage needs to be activated to handle the attachments & comments.

Steps

  1. Navigate to:

    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
  2. Expand the Invoice section & click IMG-Activity for "Enable Attachments and Comments for Invoices"

    The Change View Event Type Linkages: Details screen appears.

    SAP Display IMG screen showing Ariba Cloud Integration settings with Enable Attachments and Comments for Invoices option highlighted under Invoice.
  3. Click New Entries.

  4. Add a new entry with following values:

    • Object Category: BO BOR Object Type
    • ObjectType: IDPKINVOIC
    • Event: MASSINPUTFINISHED
    • Receiver Type: ARBCIG_INVOIC
    • Receiver Call: Function Module
    • Receiver Function Module: ARBCIG_INB_IDOC_SUCCESS_EVENT
    • Event delivery: Using tRFC (Default)
    • Check Linkage Activated box.
    • Behavior Upon Error Feedback: System defaults
    • Receiver Status: No errors
    SAP screen for adding entries showing BOR Object Type, event MASSINPUTFINISHED, and linkage settings with receiver function module highlighted.

    Click Save.

Map cXML Partner to ERP Invoicing Party

In this activity, you can specify a different invoicing party for incoming cXML invoices. This is used if you want to post an incoming invoice to a different vendor other than the vendor in the purchase order.

Steps

  1. Navigate to:

    • Integration with Other SAP Components
    • SAP Ariba Cloud Integration Gateway
    • Ariba Network Integration
    • Application Specific Settings
    SAP Display IMG screen showing the structure with options for Service Sheet, Service Sheet Response, and Invoice configurations underlined.
  2. Expand the Invoice section & click IMG-Activity for "Map cXML Partner to ERP Invoicing Party"

    Map cXML Partner to ERP Invoicing Party option highlighted, positioned between Enable Attachments and Consignment Withdrawal Invoice.
    • The Change View "Incoming Invoice: Map cXML Partner to ERP Invoicing Party screen appears.
    Change View screen displays 'Incoming Invoice: Map cXML Partner to ERP Invoicing Party' table with various column headings and data.

    Map cXML Partner to ERP Invoicing Party

  3. Click New Entries.

    New Entries screen shows 'Overview of Added Entries' table with columns for cXML VendorID, ERP Invoicing Party, and Reverse Mapping.
  4. Maintain cXML VendorID & Invoice Partner and click Save.