cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Restrict Shopping Cart Line item to One

Former Member
0 Kudos
204

Hello Gurus,

I have a requirement in Shopping Cart Creation in SRM 7.0 Eph 1.

How to restrict the shopping cart line item to only one line item?

Example:

1.          Open the create shopping cart link from Portal

2.          Add the 1st line item (Enter the all the line item details and Go to ‘Account Assignment Tab’ for this particular line item and change the Account Assignment Category to ‘Unknown’ from the drop down.

3.          Whenever he changes the Account Assignment Category to ‘Unknown’, I’ll have to restrict the shopping cart to not to add any more line items (i.e this shopping cart is only for one line item).

How to achieve this functionality? Please provide your suggestions.

Please reply me if you didn't understand the question or requirement.

Thank You.

Shyam

View Entire Topic
Former Member
0 Kudos

Hello

Try the below option by which you can achieve your requirement.

Go to SPRO -> SRM Server-> Cross application basic setting -> Extension and Field control -> control Actions- > Configure control of Actions on header Level

Add the following entries:

PDO Action Type : ADD_ITEM

Process Mode :  EDIT

Obj type:  BUS2121

PDA Action Enable

Dyn custome Class: Create a new Z custom class

Dyn Customer Class method : Create  a new method

Now in the custome class .

Get the SC Item details and Accouting details.

E.g.

data lr_pd_model TYPE REF  TO /SAPSRM/IF_PDO_MODEL_ACCESS.

lr_pd_model  = /SAPSRM/CL_PDO_MODEL_FACTORY=>GET_INSTANCE().

lr_pd_model->get_detail(Exporting iv_guid =  < SC HEader GUId >

importing ET_ITEM  = <>

                ET_ACCOUNT = <> )

now based on ET_ITEM is filled and ET_ACCOUNT has catgory as unknown. you can disable the button ADD_ITEM.

CS_METADATA-ACTION_ENABLED = ' ' " Disable

Regards.