on 03-09-2006 11:31 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.