Ansicht
Dokumentation

BBP_DOC_CHECK_BADI - Check Purchasing Document

BBP_DOC_CHECK_BADI - Check Purchasing Document

CL_GUI_FRONTEND_SERVICES - Frontend Services   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

Document checks can be categorized as follows:

  1. Checks relating to the document header
  2. Checks relating to a single item
  3. Checks relating to the entire document

For performance reasons, checks of the second category (item checks) should only be carried out when:

  • a new item is created,
  • an item is changed or
  • the entire document is to be checked for consistency (triggered, for example, by choosing the pushbutton Check).

The Business Add-In (Business Add-In) BBP_DOC_CHECK_BADI is suitable for checks of categories 1 and 3. In BAdI BBP_DOC_CHECK_BADI all the items exist but you cannot yet recognize which items have been newly created or changed. For this reason, all items must always be checked in this BAdI. For performance reasons, we therefore recommend that you use BAdI BBP_ITEM_CHECK_BADI for checks of category 2 (purely item checks).

Using BAdI BBP_DOC_CHECK_BADI, you can carry out your own checks for the document data after you have entered the user and before you save the document to the database. You cannot change any data.

In method BBP_DOC_CHECK the following parameters are available:

  • FLT_VAL
    Filter value to enable you to assign the implementation to a specific document type
  • IV_DOC_GUID
    Document GUID with which you access the document data
  • IV_MODE
    You can control the checks dependent on this mode.
    Value area: C (CREATE), U(UPDATE), T (CHECK).
  • IV_PARKand IV_SAVE
    Supplementary indicators showing when and if the BAdI is called up when savingthe document. The system sets these parameters dependent on IV_MODE.
  • ET_MESSAGES
    You output the results of your checks in this table.
    Note:
    Before each call-up of the method, the system deletes the table of error messages.

For shopping cart (SC)

When holdingand orderingthe SC, the system calls the method twice:

  1. Call with parameter IV_MODE = U and set parameters IV_PARK or IV_SAVE.
  2. Call with parameter IV_MODE = T , IV_PARK or IV_SAVE remain empty.

If your implementation contains a query for parameter IV_PARK or IV_SAVE, you must also incorporate a check via the parameter IV_MODE = T because otherwise, no error messages are displayed on the interface. (See sample coding for such a query.)

When the shopping cart is checked, the system also calls the method twice:

  1. Call with IV_MODE = U , Parameter IV_PARK and IV_SAVE remain empty.
  2. Call with IV_MODE = T , IV_PARK and IV_SAVE remain empty.

In the check for parameter IV_PARK or IV_SAVE, error messages only appear on the interface if you implement an additional request for IV_MODE = T. (See sample coding.)

For invoice (IV)

SAP delivers the following BAdI implementation for invoice entry:

Implementation to check the

  • Supplier invoice number
  • Payment reference in invoices

Check Supplier Invoice Number

The supplier invoice number is entered when an invoice is entered. The system checks if the number has already been used within a certain period. If this is the case, the system issues an error message.

Previously the use of the supplier invoice number is checked for the period of the last seven days.

To modify this period, you use the implementation BBP_IV_CHK_REFDOCNO. In the standard the implementation is not active The sample coding proposes a check from 01.01. of the current year as default.

In addition, you can modify the type of message that the system issues if the supplier invoice number has already been used. To do this, use activity Influence Message Control in the implementation guide (Supplier Relationship Management-> SRM Server -> Cross-Application Basic Settings-> Message Control).

Check Payment Reference

SAP delivers a BAdI implementation for checking the payment reference in invoices - common in some Scandinavian countries.

The payment reference is entered when an invoice is entered and also checked for validity - if the country of the requester is either Finnland, Norway or Sweden. In these countries, rules exist for the structure of a payment reference and a check digit procedure serves to ensure that the structures are observed.

The implementation is not active in the standard and can be activated if necessary. You can find the field in the template SAPLBBP_IV03 3000.

If the payment reference number to be checked is invalid, the system saves an appropriate message in a table and the implementation transfers the table to the calling program. The error message itself is not processed within the implementation by the system.

Further implementation options:

For service entry sheet

You can enter a maximum number of working hours per day.

For invoice

You can make settings such that invoices can only be created on the basis of confirmations already accepted by customers.

See BAdI Implementation






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 7656 Date: 20240524 Time: 001823     sap01-206 ( 107 ms )