cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining Location in BADI BBP_PGRP_FIND

Former Member
0 Kudos

I've implemented BADI BBP_PGRP_FIND in order to pass back a custom list of purchasing groups. We plan to use a Z table which links purchasing groups to locations. The idea is that we will only show certain purchasing groups in the drop-down list, based on the location currently chosen. However, I can't figure out how to determine the value of the 'Location' field on the shopping cart. I'd like to make the list of purchasing groups context-sensitive based on the location. Is there any way I can do this? I put a break-point in our implementation of BBP_SC_CHANGE, but I don't see the loccation value stored in any of the import parameters. In any case, even if I was able to get the location value, I'm not sure it would matter, since the BBP_PGRP_FIND BADI only seems to run before the shopping cart screen is displayed.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I put a break-point in our implementation of BBP_SC_CHANGE, but I don't see the loccation value stored in any of the import parameters.

Location is a partner type (PARTNER_FCT=00000075) stored in the "IT_PARTNER" parameter.

In any case, even if I was able to get the location value, I'm not sure it would matter, since the BBP_PGRP_FIND BADI only seems to run before the shopping cart screen is displayed.

You can always invoke the BBP_PGRP_FIND BADI in your BBP_SC_CHANGE method logic by create an instance of it.

Former Member
0 Kudos

Thanks for the reply. However, in the BBP_SC_CHANGE method, the IT_PARTNER table is empty.

Former Member
0 Kudos

A correction to my comment above - the IT_PARTNER table is empty until I fill in the cart and click 'Check' or 'Order'. The problem is, I am trying to control the values in the Purchasing Group field before the user creates the cart. I would like to change the list of allowed values in the Purchasing Group field each time the user changes the Location value.

Former Member
0 Kudos

I would like to change the list of allowed values in the Purchasing Group field each time the user changes the Location value.

But there has to have location value for you to determine PGroup right? If it_partner is empty, you could try to call BBP_PD_SC_GETDETAIL in your BBP_SC_CHANGE method and get the partner list and find out if location is there.

Former Member
0 Kudos

Thanks again for the response. However, this still doesn't work. I added a call to FM BBP_PD_SC_GETDETAIL in method BBP_SC_CHANGE (passing in the header GUID), but it didn't return anything in the E_PARTNER table parameter.

If anyone else has any ideas, I'd appreciate hearing them.

Former Member
0 Kudos

If BBP_PD_SC_GETDETAIL doesn't return you any partners, you should look into how the location (partner) is defaulted for a certain user. It could be an inherited use attribute for the user (from purchase org). Take a look at PPOSA for user attributes.