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

Re: Shopping Cart - Different line item type and correct BRF Expression

$
0
0

Hi Laurent,

 

Thank you very much for replying. Your replies have been always useful for us.

 

I have already gone through the above mentioned blogs. However, I have issue only when there are 2 types of items are ordered in the same cart. I also want to know whether it is technically feasible or not to order different types of items in the same cart and attach expression accordingly.

 

Now, I have created a Function module expression for these 2 evaluation IDs.

 

1. When items are of non catalog type - I have crated an expression of result type C and under formula I have written - IF( ZC_SC_CHECKNONCATLOG, 'X', ' ' ). This is to check that  line items do not have catalog items. In my question's post, I have posted the snippet of the code that decides return value of EV_VALUE. This expression works fine when there are only non catalogs items are ordered and it shows both levels (buyer and approver as per requirement) correctly.

 

2. When items are from catalog type - I have created an expression of result type C and under formula I have written - IF( ZC_SC_NONLIMITAPPR, 'X', ' ' ). This is to check that line item does have catalog items or not. This expression works fine when there are only catalogs items are ordered and it displays only approver as per the requirement correctly.

 

I will explain with an example.

 

I order 2 items. 1. Non catalog 2. Catalog

 

Now in the FM BBP_PD_SC_GETDETAIL i will get all items and for the first line item my EV_VALUE = 'X' after I exit. Later for another iteration, it will repeat the same code and again EV_VALUE will be 'X'. It will result in displaying both approvers for both items.

 

I also created a custom Z table and tried to update it once that item is processed. But this expression is checked 3 times (using external debugger) and at the 3rd time it actually decides the EV_VALUE's result.

 

Now what should have been done when there are both types of items (non catalog and catalog) are ordered. As per my understanding by any means, if I come to know which item is currently being processed by user in the function module expression itself, I may be able to consider only that item and try to set my expression. Is my approach correct ?

 

Appreciate your help.

 

Thank you.


Viewing all articles
Browse latest Browse all 8695

Trending Articles



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