Ansicht
Dokumentation

MM_PUR_S4_PR_CHECK - Check of Purchase Requisition Item

MM_PUR_S4_PR_CHECK - Check of Purchase Requisition Item

BAL Application Log Documentation   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

Use

You can use this Business Add-In (BAdI) to perform custom checks on custom fields and selected standard fields in purchase requisitions.

Requirements

Standard settings

  • In the standard system, the BAdI is not active.
  • The BAdI is filter-independent.
  • With the Custom Logicapp, you can create exactly one active implementation.

Parameters

Import Parameters

  • PURCHASEREQUISITION: Purchase Requisition Header Details
  • PURCHASEREQUISITIONITEM_TABLE: Purchase Requisition Item Details.
Please note that attributes FRGKZ (Release Indicator) and FRGST (Release Strategy in the Purchase Requisition) are obsolete, as the approval of purchase requisitions based on "Release Strategy" is no longer relevant, and has been replaced with "Flexible Workflow" in SAP S/4HANA Cloud.
You must use the attribute ISOUTLINE to differentiate between item sets and functional items (materials and services) in the case of hierarchy list. The attribute ISOUTLINE is true for item sets and false for functional items.
  • PURCHASEREQACCASSGNMT_TABLE: Account Assignment details of Purchase Requisition item

Changing Parameters

  • MESSAGES: Error Message Details
  • PURCHASEREQUISITIONHASERROR: Indicates if the purchase requisition has any errors

Example Implementation


LOOP AT purchaserequisitionitem_table INTO DATA (ls_item).

case ls_item-purchasinggroup.

when '001' or '003' or '005'.

APPEND VALUE #( messagetype = 'E'

messageid = 'ME'

messagenumber = '240'

documentitemnumber = ls_item-purchaserequisitionitem ) TO messages.

purchaserequisitionhaserror = abap_true.

RETURN.

endcase.

ENDLOOP.

Implementing this piece of code does the following:

•,,If the purchasing group of the purchase requisition item is '001', '003' or '005', purchaserequistionhaserroris set to true, to indicate that there is an error in the purchase requisition item.

•,,The error message details are updated appropriately.






Addresses (Business Address Services)   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 2832 Date: 20240523 Time: 201815     sap01-206 ( 40 ms )