cancel
Showing results for 
Search instead for 
Did you mean: 

How to know how many carts have been ordered as "bought on behalf of"

Former Member
0 Kudos

I'm looking for a way to know how many carts have been order in the past six months as "bought on behalf of" I've looked at tables CRMD_PARTNER and BUT000 but, I'm not sure how to determine what are the key fields and the SAP queries that I'll need to obtain such count. Any help will be appreciated. Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

ravindra_mantri2
Active Participant
0 Kudos

Hi Oscar,

I would suggest you to run a query to compare Created by Business partner from database table CRMD_ORDERADM_H and Requester from CRMD_PARTNER for specific shopping cart.

If both of them match, then it's not shop on bealf otherwise it is a shop on behalf shopping cart.

Hope this helps.

Cheers,

Ravi

Answers (2)

Answers (2)

Former Member
0 Kudos

I'm in Classic scenario which means that the PO and other relevant documents are stored in ECC. A programmer here helped me to obtain the information that I was looking for by querying the PO header and PO items tables (EKKO, EKPO) for those orders where the requestor and the bought on behalf of persons where different (ERNAM, AFNAM):

SELECT DISTINCT EKKO~EBELN EKKO~ERNAM EKPO~AFNAM
FROM EKKO
INNER JOIN EKPO ON EKKO~EBELN = EKPO~EBELN
WHERE EKKO~BSART = 'EC'
AND EKKO~ERNAM <> EKPO~AFNAM
AND EKKO~AEDAT > '20110101'

Thanks All for your help,

Oscar.

Former Member
0 Kudos

The field "requestor" isn't available in CRMD_PARTNER. Some of the fields available that also look promising are Partner GUID, Partner Number, BP GUID, and Person number but, I don't know how to build the query that will match "requestor" with the correct GUID from CRMD_PARTNER.

Former Member
0 Kudos

Hi,

The required functionality can be achieved in two ways :

1) Under Check status of Extended search, you have a option to select Bought on Behalf of Check box. However, this result will

show only belongs to your query since check status result is based on the searcher's user id.

2) Under Monitor shopping cart we have a option to query by providing the inputs in the following fields :

a) Reqeuster

b) Created by

c) Goods Receipient (Normally Goods receipient will be a requester of shopping cart and not creator of shoppign cart)

thanks

Rajesh K