SAP SRM Shopping Cart creation will go in deep how to create a Shopping Cart in SAP SRM ( Supplier Relationship Management) with all technical details. First let’s define the main SAP SRM BO Classes Architecture, then the process of SAP SRM Shopping Cart is detailled …
SAP SRM?BO Classes (Architecture)
All SRM documents follow the same process.
The main Classes used for a SRM Business Document Creation are:
/SAPSRM/CL_PDO_FACTORY_SC_ADV:??handle the instances of BO class ( factory )
Business Object class (BO)
/SAPSRM/CL_PDO_BO_SC_ADV: contains methods to handle all actions on BO
Dependent Object classes (DO)
Do’s Classes handles the sub-sections of SAP SRM Business Document.
For example, for SAP SRM Shopping Cart creation,you can?use?:
- Account assignment data – /SAPSRM/CL_PDO_DO_ACCT_ASSGMNT
- Partner data – /SAPSRM/CL_PDO_DO_PARTNER
- Attachment data- /SAPSRM/CL_PDO_DO_ATTACHMENTS
PDO buffer class
/SAPSRM/CL_PDO_UPDATE_BUFF_SC : handles all buffers for SAP SRM Business Document.
Meta data classes
For each Document, the?Depending Objects meta data can be handled by :
- Attachment – /SAPSRM/CL_PDO_META_DO_ATT
- Longtext – /SAPSRM/CL_PDO_META_DO_LTX
- Limit data – /SAPSRM/CL_PDO_META_DO_LIMIT
Find more details on BO classes on the ressources’s first link.
SAP SRM Shopping Cart
Adding item from catalog to SC
The following method /SAPSRM/IF_PDO_BO_SC~ADD_ITEMS_FROM_CATALOG is called. Within this method the SAP function module?FM BBP_WS_IMPORT_SC_DATA ( the corresponding ?BADI is BBP_CATALOG_TRANSFER).
In this BADI, the data is transfered from the Catalog to the new created item.
Then the method WRITE_TO_PDO_BUF_AFTER_VALI of class /SAPSRM/CL_PDO_BO_SC is called to insert/update the item’s detail to SAP SRM Shopping Carte item buffer.
The Insertion of the Item to Shopping is done in the method?/SAPSRM/IF_PDO_BASE~SUBMIT_UPDATE …
find the details call-stack for SAP SRM ?Shopping Cart creation within the first link of the ressources section.
Order SAP SRM Shopping Cart
When ‘Order’ the SAP SRM Shopping Cart, the method? /SAPSRM/IF_PDO_BO_SC~ORDER is triggered.
Within this method the CHANGE_DOCUMENT method is called to do Business document (Shopping Cart) checks.
Finally, the BBP_PROCDOC_SAVE is called to update the status of shopping cart into Ordered Status.