SAP Function SAMPLE_PROCESS_00105020 - Sample function module for accpt period (PPA)

Parameter Reference Type Length Text
E_ACCPT_PRD EKPO-MHDRZ P 3 Minimum remaining shelf life

Parameter Reference Length Optional Text
I_T_EKPO EKPO 1560 Purchasing Document Item


DEFINE &TEXT& = 'PPA:Acceptance period for purchase order line item'
DEFINE &EVENT& = '00105020'
DEFINE &TYPE& = 'PROCESS'
INCLUDE FI_OPEN_FI_DOCUMENTATION_1 OBJECT DOKU ID TX

PROCESS
In the Prompt Payment Act, when you create a vendor invoice usingLogistics Invoice Verification, you usually post this invoice withreference to one or more line items of the same purchase order or ofdifferent purchase orders. Each of these unique references to purchaseorder line items may have different acceptance periods.
The acceptance period is the predetermined time (in days) for goods tobe accepted automatically following a goods receipt. The acceptanceperiod is always added to the goods received date for the material inthe line item under consideration.
The default acceptance period is seven days and this value is set by thefunction module FM_GET_PO_ACCPT_PERIOD. This function module is calledby process '00105020' from function FM_GET_PPA_BASELINE_DATE_MM(include LFMPY_EU17). To implement your own acceptance period logic, youmust replace this function module using a Business Transaction Event(BTE).
If you like the SAP-delivered function module but need to enhance it,copy the original FM_GET_PO_ACCPT_PERIOD to your own one starting with'Z' and modify it. Follow the procedure described below to replace theoriginal source code.
To replace the standard SAP function module FM_GET_PO_ACCPT_PERIOD, youneed to execute transaction BF44 (customer function modules per processinterface). Create a new entry with the key:
Process PROCS = '00105020'
Application APPLK = 'IS-PS'
Function module FUNCT = your own starting with 'Z'
Product PRDKT = user-defined product with active status. The customerproducts can be defined using transaction BF24. Do not forget toactivate the product you are using.
After the change, verify that your new record exists in table TPS34 withthe same key as defined above. Do not modify the standard functionmodule FM_GET_PO_ACCPT_PERIOD or replace it in table TPS31. If you needto enhance this module, copy the original function module to your ownfunction module with a name starting with 'Z'.

INTERFACE
The interface requires that the following parameters be passed:

  • E_ACCPT_PRD, which is the parameter that will return the number of days
  • specified by the acceptance period.
    • T_EKPO of structure type EKPO, which contains the purchase order line
    • item record referenced by the invoice expense line item.
      With the purchase order line item, you can program your own logic toderive the acceptance date.