Ansicht
Dokumentation

LOG_EDI_MM_IV_CE_MAP - BAdI: Change Invoice Data After Standard Mapping (EDI)

LOG_EDI_MM_IV_CE_MAP - BAdI: Change Invoice Data After Standard Mapping (EDI)

rdisp/max_wprun_time - Maximum work process run time   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Invoice Verification (MM-IV) component. You can use this BAdI to change fields, for example. It is called within the execution of the B2B SOAP service Supplier Invoice - Create (B2B, Inbound, Asynchronous) (technical name: InvoiceRequest_In), (namespace http://sap.com/xi/EDI/Buyer). The following scenarios are supported:

  • Change dedicated header fields
  • Change dedicated item fields (deleting and adding items is not supported)
  • Replace the header tax table completely with a new table (the table can also be empty depending on the use case)
  • Interrupt processing by issuing error messages

The parameters HEADERMAPPED, ITEMSMAPPED and HEADERTAXMAPPED contain the result of the standard inbound processing logic.

The following has to be considered:

  • All contained values are in internal format. This means the typical conversions have already been done:
  • Amount conversions (example: payload contains gross invoice amount of 100 JPY, internal format is 1.00)

  • Alpha conversions (example: the invoicing party is passed as 12345678, internal format is 0012345678)

  • Unit conversions (ISO format to SAP internal format)

  • Material conversions (External material id to internal material ID)

  • Key determinations have been done (company code, invoicing party). If key fields could not be determined, this BAdI is not called.
  • The three-way match was performed, ITEMSMAPPED contains the internal view for invoice items. This means, ITEMSMAPPED may contain more items then actually contained in the XML payload.
Example:
The referenced purchase order is subject to goods-receipt-based invoice verification (EKPO-WEBRE).
Two pallets were delivered with a single delivery note.
A separate goods receipt has been posted for each pallet, or the goodsreceipt contains two items, one for each pallet.
The payload contains a single item that includes both pallets.
-> The payload contains a single item.
-> ITEMSMAPPED contains two items.
-> The fields SupplierInvoiceInternalItemID and SupplierInvoiceExternalItemID contain both item IDs.
  • SAP S/4HANA Extensibility is supported for header and items:
  • Parameter HEADERMAPPED is linked to extension context MM_SI_HEADER

  • Parameter ITEMSMAPPED is linked to extension context MM_SI_ITEM

  • A change to an invoice node must be indicated by the corresponding change indicator. If the node is not marked as changed, changes are ignored.
  • If a new tax code is applied to invoice items (ITEMCHANGES), the header tax table (HEADERTAXCHANGES) must also to contain the tax code.
Basic rule: All tax codes that ar displayed at item level must be reflected in the header tax table. An exception to this is the handling of the tax jurisdiction. Here it is sufficient to assign the tax jurisdiction code at item level. In this case, the invoice is processed with automatic tax calculation.
  • The field TaxCountry (ITEMCHANGES,) is only relevant if the functionality Registration for Indirect Taxation Abroad (RITA) is active. If the field is still filled in the BAdI, it is ignored if it matches the company code country. If required, the TaxCountry can be overwritten in a specific scenario taking into account the TaxDestinationCountry and TaxDepartureCountry fields.
  • The field TaxJurisdiction (ITEMCHANGES) is only relevant if the company code is subject to the tax jurisdiction.
    If the field is still filled in the BAdI, it is ignored.

For more information, see the example implementation.

The following list contains only parameters that require additional information.

Import Parameters:

  • INBOUNDMESSAGE: Contains the inbound message.
  • HEADERMAPPED: Contains the assigned header data.
  • ITEMSMAPPED: Contains the assigned items.
  • HEADERTAXMAPPED: Contains the assigned header tax data.

Changing Parameters:

  • HEADERCHANGED: Indicates whether the header shall be taken over.
  • HEADERCHANGES: Contains the header data to be changed.
  • ITEMSCHANGED: Indicates whether the items shall be taken over.
  • ITEMCHANGES: Contains the item data to be changed.
  • HEADERTAXCHANGED: Indicates whether the header tax shall be taken over.
  • HEADERTAXCHANGES: Contains the header tax data to be changed.
  • MESSAGES: Contains the messages.





ABAP Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 5673 Date: 20240607 Time: 052754     sap01-206 ( 81 ms )