cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dont allow blocking vendor if open PO exists

rumpa1212
Explorer
0 Kudos
1,053

As soon as Supplier team, tries to block a vendor, system should validate if there is any open invoice or a open PO in system for the same vendor.

In case there is any open PO or invoice, system should not allow the vendor to be blocked.

Please help to solve the above issue

Accepted Solutions (1)

Accepted Solutions (1)

bryanoh
Explorer
0 Kudos

Hi Rumpa,

To address the scenario where you want the system to validate the presence of open invoices or purchase orders (POs) before allowing a vendor to be blocked, you would typically need to implement a custom check in your SAP system. This can be achieved through ABAP programming by creating a user-exit or a BAdI (Business Add-In) that triggers during the vendor block process. Here's a general approach to implement this:

  1. Identify the Appropriate User-Exit or BAdI:

    • Find a suitable user-exit or BAdI that is triggered when a vendor is being blocked. This could be within the vendor master transaction (XK05, MK05, or similar).
    • Common BAdIs for vendor master data include VENDOR_ADD_DATA or CVI_VENDOR_BADI.
  2. Custom Logic for Checking Open Invoices and POs:

    • In the implementation of the user-exit or BAdI, add ABAP code to check for open invoices or POs.
    • You can do this by querying relevant tables such as BKPF and BSIK for open invoices and EKPO for open POs, filtering by the vendor number.
    • Define 'open' criteria for invoices and POs, such as checking the payment status of invoices and the completion status of POs.
  3. Blocking Logic:

    • If open invoices or POs are found, the custom code should prevent the blocking of the vendor. This could be done by issuing an error message to the user.
    • If no open invoices or POs are found, the vendor blocking process can proceed as usual.
  4. Testing:

    • Thoroughly test the custom logic in a development or quality environment before moving it to production. Ensure it correctly identifies open invoices and POs and blocks or allows the vendor blocking process accordingly.
rumpa1212
Explorer
0 Kudos

Thanks Bryan !

Answers (0)