cancel
Showing results for 
Search instead for 
Did you mean: 

Disable "Add item" and "Paste" button on item level of shopping cart

Former Member
0 Kudos

Hi,

I would like to disable the "Add item" and "Paste" button on the item level when editing a shopping cart awaiting approval. I have been able to accomplish this for the buttons "Delete", "Duplicate", and "Copy" already. I have done this by adding an enhancement implementation in the class /SAPSRM/CL_PDO_DYN_MDA_IT_SC under the methods DELETE_ITEM (delete button), COPY_ITEM (duplicate button), and COPY_CLIP (copy button). This enhancement gets the shopping cart header guid, then uses the function module "BBP_PD_SC_GETDETAIL" to return the table e_status to check if the shopping cart is awaiting approval. If it is it will disable the buttons, making them equal to abap_false.

I would like to do this same thing to the "Add item" and "Paste" buttons but they are not listed in the the same class. Does anyone know what class they are called in?

I have tried looking in SPRO -> SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Control Actions -> Display Standard Metadata Tables for Actions on Item Level. I can't find the "Add item" and "Paste" buttons in here for BUS2121(shopping cart) under Edit mode. Anyone have any ideas?

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have tried looking in SPRO -> SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Control Actions -> Display Standard Metadata Tables for Actions on Item Level. I can't find the "Add item" and "Paste" buttons in here for BUS2121(shopping cart) under Edit mode. Anyone have any ideas?

Go under the node following the path you mentioned, "Configure control of actions on item level" and add entries for the two actions you wanted, i.e. ADD_ITEM and PASTE_ITEM for BUS2121, then define your own dynamic class and method to handle the logics behind their enablement.

Former Member
0 Kudos

Jay,

But how do I know these new actions will be tied to the correct button?

Thanks,

Jeff

Former Member
0 Kudos

You can either trace from the UI element in the corresponding WebDynpro view down, or by looking at the same buttons/actions in another document type, such as RFx, to get a hunch of what they might be for SC. Then try and err.

Former Member
0 Kudos

Hi Jay,

I have done as you suggested but I am still not able to disable these 2 buttons. Any other ideas?

Thanks,

Jeff

Former Member
0 Kudos

If you have defined your own dynamic class and method, put an external break point in the method (first line). Then execute the SC creation from the browser. If it stops at the breakpoint, trace the logic and make sure the method returns the indicator that the buttons are disabled. If it does not stop at the breakpoint, then something is not properly set up in IMG and/or your dynamic class/method.

Former Member
0 Kudos

Jay,

I did as you suggested and was able to break on the method as expected. I made the same coding changes as I had in the other methods where I put in an enhancement but it would not work.

I was able to solve this problem by creating an enhancement in the Web Dynpro where the buttons were being displayed. I created a 'Post-Exit' enhancement for the WDDOMODIFYVIEW method. Within this I added my custom logic to disable the Add Item and Paste buttons when in editing a shopping cart that is awaiting approval.

Thanks for the help,

Jeff