Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10022

Re: question on data flow from catalog to cart in WCEM

$
0
0

Hi Suhaas,

 

I think you'd need to read and try to understand the ABAP code behind WCEM - which I can tell you straight away, it's not for people with a 'weak stomach'. This is not a trivial task because ABAP code is usually 'encrypted' - you really need to be a computer to understand most of it.

 

ABAP Cart (CRM) uses mainly two functions, CRM_WEC_ORDER_SET and CRM_WEC_ORDER_GET - where order_set calls a BADI in it's last lines if you want to 'add' behavior and the same happens on CRM_WEC_ORDER_GET, which uses CRM_WEC_ORDER_GET_INTERNAL and also have a BADI there for extension.

 

Case you "Add To Cart", it will call CRM_WEC_ORDER_SET once to initiate your Cart, "another time" to Add the Product and then call CRM_WEC_ORDER_GET_INTERNAL.

 

 

I'm not too sure how your version would be working, because I have modified a good 80% of how the Cart works to increase performance - but I assume when you click on "View Cart" you will be calling CRM_WEC_ORDER_GET case you have a "salesDocument.isDirty()".

 

 

IMO, you should first extend the writeStrategy / writeMapper adding some new extensionAttribute on ORDERADM_I which will be intercepted by an Implementation BADI on "CRM_WEC_ORDER_SET" (and will deal with business logic related to your use case) and you have to extend the readStrategy / readMapper to pull in these attributes to a custom ItemBeanImpl - and here you Implement a BADI on  CRM_WEC_ORDER_GET_INTERNAL" to retrieve your custom attributes.

 

 

Between us: Good luck adding a simple new field and having to deal with this ABAP code - you will notice it's not 'straight forward', and I would STRONGLY recommend you start writing your own Z classes in order to create a proper 'API' in CRM because it simply doesn't exist. Some people in SAP must have a "hard on" for 10.000 lines Function Modules, one day I will solve this riddle...

 

 

 

Hope it helps,

D.


Viewing all articles
Browse latest Browse all 10022

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>