cancel
Showing results for 
Search instead for 
Did you mean: 

Enable Price filed in Shopping cart

Former Member
0 Kudos

Hi All,

We need to enable the price filed in the shoping cart, i used the badi and below code

Badi BBP_DOC_CHANGE_BADI Method BBP_SC_CHANGE

  LOOP AT it_item INTO ls_item_e.

    if ls_item_e-catalogid is not initial and

       ls_item_e-category_id = 'yourcategory'.

       clear ls_item_e-catalogid.

       clear ls_item_e-catalogitem.

       MODIFY it_item FROM ls_item_e.

    endif.

  ENDLOOP.

It is working, But the problem is i am getting price filed with zero price.

Initially when i am selecting the item it has some price(say 100 GBP), but when coming back to portal the price is showing as zero.

My requirement is i should get the old price(say 100GBP) which should be editable also.

Regards,

Shalini

Accepted Solutions (1)

Accepted Solutions (1)

bharathi_ponnusamy
Active Participant
0 Kudos

Hi Shalini,

I hope you are trying to enable the price field when the item is getting selected from catalog to shopping cart. Please correct me if I am wrong in my understanding.

Could you please check whether the below can help

1156699 - Making free items changeable

1519599 - Zero priced catalog items could be changeable

Best Regards,

Bharathi

Answers (2)

Answers (2)

Former Member
0 Kudos

HI All,

Solution for this
No Need to  remove catalog indicators and all from the transfer badi. rather use the Meta data Field control.
the SAP delivered logic for PRICE on Shopping Cart(PRICE/BUS2121) is controlled through dynamic class /SAPSRM/CL_PDO_DYN_MDF_IT_SC and method PRICE.


Former Member
0 Kudos

Hi Shalini,

"LOOP AT it_item INTO ls_item_e.

    if ls_item_e-catalogid is not initial and

       ls_item_e-category_id = 'yourcategory'.

       clear ls_item_e-catalogid.

       clear ls_item_e-catalogitem.

       MODIFY it_item FROM ls_item_e.

    endif.

  ENDLOOP."

Of course i'm not an technical consultant but let me explain a little on the logic.....

If ls_item_e_catalogid is not initial ---> This means if the value is not equal to "Zero" , and in the fourth line you are making the catalogid clear...

clear ls_item_e-catalogid ---> Making the value to "Zero"..

May be the above line of code makes the value "0" on the shopping cart... If my understanding is wrong another option is, value from catalog page is not coming to shopping cart... that means somewhere in the code it was mentioned the catalog price should be zero when it is selected and routed back to shopping cart screen...

Please check the logic ...