cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_CREATE_PO_BACK & shopping cart items

Former Member
0 Kudos

Hi,

How do I identify in BADI BBP_CREATE_PO_BACK

which purchase order item relates to which

shopping cart item ?

eg SC has 3 lines :

1. widget -> purch req

2. red thingy -> PO item 1

3. blue thingy -> PO item 2

In the above-mentioned BADI how can I tell that PO

item 1 came from shopping cart line 2 ?

( BADI logic needs to go back to SC item.... )

Message was edited by: Ian Huxley

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Ian,

what do you want to do ?

- send sc item reference to R/3 PO item or

- identify originating SC item to complete some PO data before sending data to R/3

During SC transfer, the Backend ref is stored at SC item level in BBP_PDBEI (business object BUS2012 & backend obj ID). Backend PO item # is not yet stored (done later by CLEAN_REQREQ_UP), but in fact PO & SC items are sorted in the same order.

Ex:

Order a SC with 5 items, at the beginning of the transfer, SRM groups SC items and stores PO ID for each SC item:

SC item 1 --> PO 5000000001

SC item 2 --> PO 5000000002

SC item 3 --> PO 5000000001

SC item 4 --> PO 5000000002

SC item 5 --> PO 5000000001

This will create 2 PO in R/3:

PO 5000000001

PO item 1 --> from SC item 1

PO item 2 --> from SC item 3

PO item 3 --> from SC item 5

PO 5000000002

PO item 1 --> from SC item 2

PO item 2 --> from SC item 4

Those PO item / SC item links are updated by CLEAN_REQREQ_UP.

So in the BADI, if you look at SC items linked to the current PO ID (in table BBP_PDBEI), you should find only the relevant SC items (ex 3 items for PO 5000000001).

Get rid of deleted items, sort them by internal number, and you have identified which PO item relates to which SC item !!!

I think you can use function BBP_PD_OBJREL_READ_VIA_REF to retrieve SC items linked to a PO.

Hope this is clear enough and will help you.

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Thanks - BBP_PDBEI is what I was looking for.

Needed to identify originating SC item to complete

some PO item data before sending to back end.

Answers (1)

Answers (1)

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

A solution is to use customer fields, they are transfered from SC to PO. Fill them in badi bbp_doc_change with the SC and items guid. So you can recover the SC items in the badi BBP_CREATE_PO_BACK.

But straightest solution is to fill some customer fields directly with the information you need in the badi bbp_doc_change when SC is created or changed. So you don't need to read again the SC in the badi bbp_create_po_back.

Rgds,

Pierre