cancel
Showing results for 
Search instead for 
Did you mean: 

Determine shopping cart data from Source of Supply BADIs

Former Member
0 Kudos

Hi Experts,

I am using badi BBP_SOS_BADI, method BBP_SOS_CHECK to determine what contracts the user can choose from when creating shopping cart. The problem is that I have no access to the Shopping Cart details when I am in this BADI.

The aim is to use the Cost Centre on the shopping cart item to filter the contracts (I have added Cost Centre as a custom field on the contract) which the user can choose from.

I can see cost centre on the contract, however I have no way of tieing it back to the shopping cart cost centre. Is there a way to access the shopping cart details from within this BADI? I have no Shopping cart GUID available. All that I have are the details in parameter IS_SEARCH_CRITERIA (product category, recipient etc).

Is there any way to retrieve the shopping cart GUID from within the BBP_SOS_CHECK method?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

POS_ID in structure IS_SEARCH_CRITERIA should give you the shopping cart item GUID. Use it to retrieve item detail from table CRMD_ORDERADM_I table. To get to the accounting information, get HEADER field value from item entry (CRMD_ORDERADM_I) and call BBP_PROCDOC_GETDETAIL FM with that header GUID.

Former Member
0 Kudos

Hi Jay,

Thanks for the info - I was trying to find out what POS_ID referred to.

However, at this point, the cart hasn't been saved, so there is no entry in CRMD_ORDERADM_I table. Any ideas?

Thanks!

Former Member
0 Kudos

Try calling FM BBP_PROCDOC_ITEM_GETDETAIL with item GUID (POS_ID) to get the item detail then.

Former Member
0 Kudos

Hi,

No, unfortunately neither BBP_PROCDOC_ITEM_GETDETAIL or BBP_SC_GET_DETAIL pull back any shopping cart data when in the BBP_SOS_CHECK badi. Very strange, as I call the BBP_DOC_CHECK badi both before and afterwards, and the SC details are available in there.

The requirements have changed slightly, where the business now only wants the Requestor to see contracts for which they have cost centre set up in their user attributes. This is fine, I have done this, but I think that down the line they will want to access contracts for the cost centre that they select on the shopping cart item, so I'll keep plugging away at this. Any further ideas would be appeciated!

Answers (0)