Ansicht
Dokumentation

/ACCGO/BADI_INV_ROUT - BAdI: Determine Transaction to be Called

/ACCGO/BADI_INV_ROUT - BAdI: Determine Transaction to be Called

General Data in Customer Master   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Expense Management component. You use this BAdI to call a user-defined transaction for expense settlement using the invoice router. By default, the invoice router routes to the Settlement with GTM option where VBDs or TCs can be settled against an invoice. If you settle the invoice using a different transaction (for example, MIRO), based on input parameters on the Invoice Router selection screen, then this BAdI is implemented and the required transaction is called inside the BAdI interface method. This BAdI is available in the /ACCGO/EXM_ES_INVOICE_ROUTER enhancement spot.

You can implement the SETTLE_INVOICE method in the /ACCGO/IF_EXM_INVOICE_ROUTER interface to import all input data that the user enters on the Invoice Router selection screen. Based on the input, the system determines the appropriate transaction to settle the invoice. If the system calls any user-defined transaction within the BAdI implementation, then the value of the CH_TRANSACTION_CALLED changing parameter is set to 'X'. This indicates that the user-defined transaction has been called, which prevents the invoice router from calling the default GTM settlement screen.

The system can perform validations inside the method for the user inputs on the Invoice Router selection screen. In the case of any errors, the /ACCGO/CX_EXM_INV_ROUTER exception type is raised and the error message displayed is populated in the EX_RETURN return table.

The following are the importing parameters used in this BAdI:

  • IM_INV_PARAMS: Invoice Router: Selection Screen Parameters

This parameter is structured and contains the following invoice related fields entered by user on the Invoice Router selection screen.

  • Reference

  • Invoice Date

  • Vendor

  • IM_ROUTER_FIELDS: Invoice Router: Selection Screen Search Fields

This parameter will have all search fields on the selection screen. If the search field is of select option type (range) then corresponding range table will have the required value. The following fields on the Invoice Router selection screen are contained in this parameter:

  • Trading Contract

  • External Reference Number

  • VBD Creation Date

  • Logistics Document Type

  • Logistics Document

  • Company Code

  • Purch. Organization

  • Plant

  • Service Entry Sheet

  • TSW Location ID

  • IM_SETTLE_OPTION: Settlement Option

This parameter is the settlement option checkbox on the Invoice Router selection screen. You can only select one settlement option. The settlement option can have different values based on the settlement option you select. The following are the settlement option values:

  • If 'Settle with GTM' option is selected, then IM_SETTLE_OPTION = 'G'

  • If 'Settle with MIRO' option is selected, then IM_SETTLE_OPTION = 'M'

  • If 'Settle with FI' option is selected, then IM_SETTLE_OPTION = 'F'

  • CH_RETURN: Return Parameter Table

This parameter is the return table containing messages. If a message needs to be displayed on the screen or logged to the application log, then this table must be filled. In the case that an error message must be displayed to the user, the /ACCGO/CX_EXM_INV_ROUTER exception type is raised and this return table is populated with the error message.

  • CH_TRANSACTION_CALLED: Flag to Take Decision to Call GTM Settlement Option

If you call any user-defined transaction within the BAdI implementation, then the value of the CH_TRANSACTION_CALLED changing parameter is set to 'X'. This indicates that user-defined transaction has been called and the GTM settlement screen should not be called.

If the settlement is done using GTM, then the CH_TRANSACTION_CALLED changing parameter is set to ‘initial’.

For more information about the standard settings (filters, single or multiple uses), see the

Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).

This BAdI is available in enhancement spot /ACCGO/EXM_ES_INVOICE_ROUTER.

For information about implementing BAdIs as part of the enhancement framework, see SAP Library for SAP NetWeaver Platform on SAP Help Portal at http://help.sap.com/nw_platform. Choose a release and then Application Help. In SAP Library, choose SAP NetWeaver Library: Function-Oriented View -> Application Server -> Application Server ABAP -> Application Development on AS ABAP -> ABAP Customer Development -> Enhancement Framework.






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

Length: 6229 Date: 20240329 Time: 084658     sap01-206 ( 103 ms )