Ansicht
Dokumentation

MMIV_IC_MAPPING - BAdI: Change Invoice Data After Standard Mapping

MMIV_IC_MAPPING - BAdI: Change Invoice Data After Standard Mapping

ROGBILLS - Synchronize billing plans   Fill RESBD Structure from EBP Component Structure  
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 Advanced Intercompany Processes. The following is 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 mapping of the billing document data to the supplier invoice data model.
Furthermore some fields from the original billing document that are not contained in supplier invoice structures have been additionally provided, for example, TAXDEPARTURECOUNTRY, TAXDESTINATIONCOUNTRY.

The following has to be considered:

  • All contained values are in internal format. This means the typical conversions have already been done:
  • Amount conversions

  • Alpha conversions

  • Unit conversions

  • Key determinations have been done (company code, tax code). If the company code could not be determined, this BAdI is not called.
  • The three-way match was performed, ITEMSMAPPED contains the internal view for supplier invoice items. This means, ITEMSMAPPED may contain more items then actually contained in the billing document.
Example:
In the Advanced Intercompany Processes, the purchase order is always 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 goods receipt contains two items, one for each pallet.
As a result, the billing document contains a single item that includes both pallets, while the supplier invoice contains two items.
  • 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 contain the new tax code.
Basic rule: All tax codes that are 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, HEADERTAXCHANGES) 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/region. If required, the TaxCountry can be overwritten in a specific process taking into account the TaxDestinationCountry and TaxDepartureCountry fields.
    The fields TaxCountry, TaxDestinationCountry and TaxDepartureCountry in the HEADERMAPPED are always filled regardless of the activation status of taxation abroad (RITA).
  • 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:

  • HEADERMAPPED: Contains the assigned header data.
Note: In structure HEADERMAPPED, the indicator SuplrInvcSpecialTaxHndlgIsRqd controls whether changes to the tax data are allowed. If the indicator = Abap_true (value X), the tax amounts are derived from the billing document and cannot be changed. If the indicator is set, it is therefore not possible to adjust tax amounts or tax indicators using the table HEADERTAXCHANGES.
  • 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.





General Data in Customer Master   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 5574 Date: 20240523 Time: 201806     sap01-206 ( 76 ms )