cancel
Showing results for 
Search instead for 
Did you mean: 

Buy on behalf of field

Former Member
0 Kudos

Hi ,

As my requirement,I need to show an error message if Purchasers are raising shopping cart for themselves.They can raise a SC on behalf of a requestor.

For validating this,    



I am checking for the partner function requestor in the partner table and passing the corresponding partner no or partner guid to the functional module "BBP_CENTRAL_PERSON_GET" to get the user name.After that I am checking the roles of the corresponding user and throwing the error message accordingly.
The logic is working fine for the below scenarios.
1.If the purchaser is creating shopping cart for himself and the error is shown properly.
2.After login as purchaser,before creating any item if I change the Buy on behalf of as requester,the error is not shown which is also correct.
But it is failing in the below case,
1.After logging in as purchaser ,create an item and then delete that item.Then change the Buy on behalf of as Requester,the error message is shown which is not correct .
Actually what is happening is that,the partner no or partner guid is same even after changing the Buy on behalf of field to a requester.So the "BBP_CENTRAL_PERSON_GET" is giving the username as purchaser instead of requester.

Could you please tell me Is there any way to get the username of Buy on Behalf of person so that I can check the roles of the corresponding user?
  I checked in the SC header structure,I was not able to find any related field.

Could anybody know how to handle this scenario?

Regards,

Rohini

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rohini,

For a shop on-behalf of SC, partner 'Requester' is different from CREATED_BY field (header level of the SC).