Page tree
Skip to end of metadata
Go to start of metadata

Purpose

This page was created to clarify how users can find Bought on Behalf Shopping Carts and in which cases should the SC display for the Creator and for the Requester user.

Overview

When an employee creates a normal Shopping Cart, the Creator and Requester user will be the same. On the other hand, in Buy on Behalf scenario, these two users will be different. The user who creates the SC will be the Creator user and the Buy on Behalf user will be the Requester. This is important to know, because by default, employees can only display those SCs in Advanced Search and in POWL in which they are the Requester user. This means that by default, the Creator user can't display the SC that was created on Behalf.

For more information and configuration of Buy on Behalf scenario, refer to Wiki page General Configuration and behaviour in case of “Buy on Behalf of” scenario.

Searching for BoB SC

Let's consider the following example scenario: User A creates an SC on behalf of User B.

To display the SC by User A, it is necessary to tick flag Bought on Behalf in POWL or in Advanced Search, because User A is not a Requester of the SC.

POWL

Advanced Search

To display the SC by User B, there is no need to tick any flags, because by default, system shows the SCs that has the logon user as Requester. In the example scenario User B is the Requester.

Advanced Search quick search

In Advanced Search quick search it is not possible to display Bought on Behalf SCs directly for employee users, because there only those SCs can be displayed, in which the logon user is the Requester. The below error occurs, when trying to display a BoB SC (/SAPSRM/CLL 058):

For administrator users, all SC can be displayed, if:

  • switch SRM_703_TERMIN_EMP is active in SPRO path SAP Implementation Guide -> SAP Supplier Relationship Management -> SRM Server -> Continuous Improvement -> Activate/Deactivate Inconsistent Business Partner Handling,
  • administrator role is assigned (authorization BBP_ROLE ADM),
  • authorization to display SC is assigned (BBP_PD_SC 03).

Debugging Guide

POWL and Advanced Search

In case of non-HANA search, the logic is very similar for POWL and Advanced Search, but different classes are used:

  • To debug POWL search, set a breakpoint in Method EXECUTE_SEARCH of class /SAPSRM/CL_PDO_SO_SEARCH_SC_2
  • To debug Advanced Search, set a breakpoint in Method EXECUTE_SEARCH of class /SAPSRM/CL_PDO_SO_SEARCH_SC

In this Method system calls FM BBP_PD_SC_GETLIST several times. First system calls it to get those SCs, in which the logon user is the Requester. Then if flag Bought on Behalf is ticked, system deletes the partner table and sets the logon user as the Creator user.

 

Then system checks the flag again and then calls FM BBP_PD_SC_GETLIST to gather the Bought on Behalf SCs into table LT_SC_ADD_LIST.

Then system deletes those SCs that were already found before from table LT_SC_ADD_LIST, so that system only displays Bough on Behalf SCs and not the normal ones.

In case of HANA search, the relevant logic that sets the Bought on Behalf search is in Method FILL_RANGE_TABLE of class /SAPSRM/CL_PDO_SO_HANA_SRH_SC. This code fills the logon user as Creator and makes sure that system doesn't find such SCs where the logon user is the Requester.

Advanced Search display

Set a breakpoint in Method EXECUTE of class /SAPSRM/CL_PDO_SO_QUICK_SEARCH.

Here system fills the logon user as Requester user into the item partner table.

Then system checks whether switch SRM_703_TERMIN_EMP is active. If yes, system also checks if the logon user has Admin rights (BBP_ROLE ADM). 

In case the switch is active and user had Admin rights, system calls FM BBP_PROCDOC_GETLIST without using the previously filled partner table. This means that in this specific case the user will be able to display any SCs. In other cases, the user will be able to display their own SCs, where they are the logon user as Requester.

Related Content

Related Documents

To modify the standard result of the search, the following BAdIs are available:

SAP Community Wiki - General Configuration and behaviour in case of “Buy on Behalf of” scenario

Related SAP Notes/KBAs

Standard design:
SAP Note: 2424819  Search SC with Status "In Your Inbox" and "Bought On Behalf" checked, returns wrong results
SAP Note: 2296964  POWL Search Criteria not working properly with BOB and status field for shopping cart
SAP Note: 2139109  Bought on behalf shopping carts cannot be viewed in the requestor's powl

Common errors:
KBA: 1823713  User can't find Bought on Behalf SCs in POWL or in Advanced Search 
KBA: 2434659  Clarification on POWL Shop on Behalf functionality and Team Purchasing