Trouble shooting about how the inconsistent data is mapped when PO is created from a Shopping cart.
When PO is created from SC ,some data are not the same with the original value in the SC. How can we debug the PO creation with data mapped from shopping cart?
PO data is not the same as Shopping Cart Data.
- Check if the data is taken from vendor master. Eg. PO flags or Currency.
- Check if there is master documents assigned. Eg. Contract.
BBP_DOC_CHANGE_BADI can be a cause of the issue.
Whenever the shopping cart is transferred into a PO, the data is mapped in class CL_BBP_SC_TRANSFER method MAP_PO_LOCAL. The main logic of mapping Shopping Cart data to the Purchase Order is placed in the Include LBBP_PD_SCF0Y, Form MAP_SHOPPING_BASKET_PO. If there is a contract reference, it will be read (Function BBP_PD_CTR_ITEM_GETDETAIL).
If there are back-end purchasing organizations they are read in Function BBP_PDH_PO_DET_BE_PUR_ORGS. Currency is taken in the FORM "get_po_currency". Then then item data will be fetched (MOVE-CORRESPONDING it_sc_item TO et_po_item). Subsequently, the accounting assignment data is read (LOOP AT it_sc_account) along with tax and pricing data. At last, texts, attachments and customer fields are mapped.
Please note that grouping/splitting of the documents already took place, therefore check note 1380879 for further details
SAP KBA: 1380879 - FAQ: Split criteria in the Sourcing Cockpit