cancel
Showing results for 
Search instead for 
Did you mean: 

Reg : Finding Purchase orders related to Shopping cart

Former Member
0 Kudos

Hi All,

I am creating Purchase order in SRM system.PO will be created for the approved Shopping cart.

But while creating/changing PO if the purchaser try to change the value of the line items greater than the value approved in the shopping cart i should give him an error message.

For that I am using a BADI : BBP_DOC_CHECK_BADI (This will get triggered when PO is created or changed).

1. For a method in this BADI, I am passing IV_DOC_GUID(a global identifier)

2. I am using a FM BBP_PD_PO_GETDETAIL and passing the above global identifier to a field in FM to get line items of the PO into an internal table. (Here i am getting all line items of a PO)

loop at line item internal table. (If i get multiple line items I will loop like this)

3. After that In the PO line items there is a field SRC_GUID.

I am passing this to a FM BBP_PD_SC_ITEM_GETDETAIL to get the shopping cart information for that line item.

(Here I am getting all SC information for that particular line item)

endloop.

Till here it is good.But the problem here is

  • when two PO's are created from one line item on a shopping cart.*

Example :

From above

In step 2 : I will get only one PO by passing unique identifier.

let us suppose PO is 1000000000 and line item is 10(qty : 11). In its item details I will have a field SRC_GUID for every line item

In step 3 : I will pass this SRC_GUID to FM BBP_PD_SC_ITEM_GETDETAIL to get SC details.

Now I will check the details of PO with SC.

let us suppose SC has item 10 with qty:20.The Net Values of items in SC will be high.

actaully SC single item created two pos.

where Can I find the other PO's created with qty 9 for this Shopping cart. Then Only I can check whether the PO value is greater then SC line item.

Please suggest me.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I got the solution