cancel
Showing results for 
Search instead for 
Did you mean: 

Change the backend doc type from PR to PO in BADI BBP_TARGET_OBJECTS.

Former Member
0 Kudos

Hi,

We have followed below approach for backend document type determination.

1. A custom function module contains the logic to determine the backend document type of a Shopping cart line item. THis function module, performs many checks and hence cannot be called in any BADI that is executed in Foreground.

2. I am using BADI BBP_TARGET_OBJECTS to change the follow document type by calling the custom function module.

Issue here is, if the backend document type of a line item is Purchase requisition (2) by SAP standard, and if I try to change it to Purchase order, it gives run time error and ends up in creation of Purchase order.

After further investigation I found that this line item (with default backend doc type as 2) has a desired vendor. If we change the desired vendor of this line item to fixed(To Partner function 19 from partner function 39), it allows us to change the doc type from Purchase requisition to purcahse order in BADI BBP_TARGET_OBJECTS.

But changing the partner function is possible only in BBP_DOC_CHANGE BADI, and I cannot call the custom function module there, as it may impact the performance.

Is there any other way, I can change the partner function in any of the BADIs called in background?

Or Is there any way by which I can change the backend document type from PR to PO in BBP_TARGET_OBJECTS?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member183819
Active Contributor
0 Kudos

Hi Parab

if you swaping 39 to 19 viadoc change badi

REQUESTER has a control on Purchase ORDER Vendor and BUYER lost a control so your business has to decide.In this case procurement department lost their control.

Fixed vendors are like inforecord and contract negotiated for best price ..

Muthu

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I think you want to create PO from SC. To create PO, price and fixed vendor is required. If you give Purchaser role/authorization to employee, Employee can specify fixed vendor and PO will be created without BADI.

Regards,

Masa