Ansicht
Dokumentation

EPIC_EXTENSIBILITY_C - BAdI: Extension of Payment Item Information

EPIC_EXTENSIBILITY_C - BAdI: Extension of Payment Item Information

PERFORM Short Reference   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 E-Payment Integration China (FI-LOC-EPI-CN) component.

You can use this BAdI to derive initial values for custom fields for payment items to be processed using the Electronic Payment Integration for China (EPIC) application. You can also allow users to choose values for these custom fields from a dropdown list (F4 help). You can then validate the values that the users enter before they are saved to the Item Data(FPRL_ITEM) table.

This BAdI is called in the following cases:

  • When a user runs a payment proposal on the Process Items tab page.
  • When a user edits the value of a custom field for an item to be paid on the Process Items tab page and opens the F4-Help in the Edit Custom Fields dialog box.
  • When a user saves changes made in the Edit Custom Fields dialog box.

This BAdI definition contains the following BAdI methods:

  • DERIVE_DEFAULT_VALUE (Derive Default Values)
The Electronic Payment Integration framework calls the logic in this BAdI method to derive the custom fields from the CI_FPRL_ITEM structure. The method logic also sets the default values when payment proposals are run.
  • CHECK_BEFORE_SAVE (Check Before Save)
The EPIC_EXTENSIBILITY_UIL program calls the logic in this BAdI method when the user saves the values for custom fields in the Edit Custom Fields dialog box. The method logic validates all values that were entered in the custom fields.
  • VALUE_HELP (Value Help)
The EPIC_EXTENSIBILITY_UIL program calls the logic in this BAdI method to provide the values for the F4-Help for the custom fields in the Edit Custom Fields dialog box.

You have extended the EPIC Extensibility (CI_FPRL_ITEM) structure with your custom fields. This structure is included in the Item Data (FPRL_ITEM) table. After you implement these custom fields, users can display the fields on the Process Items tab page on the Electronic Payment Integration (China) screen by changing the ALV layout.

For more information about how to extend this structure and creating other related objects, see the SAP Library for SAP Enterprise Resource Planning on SAP Help Portal at http://help.sap.com/erp. Choose your release and search for "Implementing the Electronic Payment Integration Solution".

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).

If there is no active implementation for this BAdI, the system uses the CL_EPIC_EXT_CTRL_STD_FALLBACK fallback class.

You can find example implementations in the BAdI Builder on the Enhancement Spot Element Definitions tab in the Implementation Example Classes section.

For this BAdI, the CL_EPIC_EXT_CTRL_EXAMPLE example implementation is available. Note: Since this BADI implementation only works correctly if custom fields are available, in order to avoid syntax errors, all the code is commented out.

This implementation assumes that 2 custom fields named YYFIELD1 and ZZFIELD2 have been added to the CI_FPRL_ITEM structure. YYFIELD1 is typed BUKRS and represents the company code. ZZFIELD2 is typed DZWELS and provides a payment method list.

  1. When the payment proposal runs, the initial value of YYFIELD1 for each item included in the run results is copied from the BUKRS field of the same item. The value for ZZFIELD2 is copied from the RZAWE field.
  2. When a user uses the dropdown list for the YYFIELD1 field, the standard search help H_T001 is used. This shows all company codes in the system. When a user triggers the F4-Help for the ZZFIELD2 is triggered, the standard search help H_T042Z is used with an importing parameter, which shows all payment methods available for the specified country/region.
  3. When the user saves the value for the YYFIELD1 custom field, the example implementation checks if the company code is valid. For ZZFIELD2, the implementation checks that the selected payment method is valid for the specified country/region.

You may want to copy the values from the custom fields in FPRL_ITEMto the payment and clearing documents created with the actual payment run. To support this, the Electronic Payment Integration framework can call a corresponding function module when a user clicks the Pay pushbutton on the Process Itemstab page and before the clearing/payment document is generated by the payment programs (SAPF110S and SAPF111S). A sample BTE function module, EPIC_EXT_SMPL_PROCESS_00001120is available for you to copy to your namespace and use as a starting point for implementing this function in your system.

The sample function module includes the following logic:

  1. Determines if this BTE call is triggered by F110 or F111.
  2. Determines which FPRL_ITEMrecords have to be copied into the clearing document/payment document.
  3. Copies values to the corresponding fields in clearing/payment document.

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.






BAL Application Log Documentation   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 8783 Date: 20240523 Time: 220246     sap01-206 ( 173 ms )