on 03-31-2011 8:16 PM
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,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.