Skip to Content
0
Former Member
Aug 01, 2006 at 09:06 AM

Convert Purchase Order to Requisition when contract void

43 Views

Hi

We are using SRM 5.0, R/3 Backend is 4.6C.

For purchase orders for items with contracts that are expired or for incoming requests exceeding target quantity in the contract, we intend to have the purchase order converted to a purchase requisistion automatically.

To do this we have activated the BBP_TARGET_OBJTYPE and implemented the DETERMINE_TARGET_OBJECT_TYPES to convert the PO to PReq by doing the following:

wa_item-pack_objtype = 'BUS2105'. "set to PReq

CLEAR: wa_item-ctr_hdr_number,

wa_item-ctr_item_number.

MODIFY ct_item FROM wa_item.

when expired contract or target quantity of contract exceeded is detected.

However, on approving, this results in backend error:

Shopping cart 7100133540 (PReq. 8100022935): 06 722 Source not included in list despite source list requirement

One observation made when debugging the BAdI is that when the BAdI is being run, ct_item is already set to BUS2105 (PR).