cancel
Showing results for 
Search instead for 
Did you mean: 

enhancing the standard functionality of order button

Former Member
0 Kudos

Hi Experts,

I have a requirement to enhance the standard functionality of order button of Shopping cart in SRM.On clicking of order button,i need to provide a custom popup with shopping cart item details and few yes/no questions.Based on the result,that is if yes,then the workflow is triggered for shopping cart approval else it should not order the shopping.What i have implemented so far is the creation of post_exit method for the process_event of the component "/SAPSRM/WDC_UI_SC_OIF_CA".If the event_id is 'ORDER',the popup is shown.Inorder to achieve this requirement,I need to either enhance the handle_event method of the class "/SAPSRM/CL_CH_WD_BOM_SC ".

class "/SAPSRM/CL_CH_WD_MAP_IDENT_SC" or the order method of the class

when i tried to overwrite either of these methods,I am getting so much errors.Could any one please help in creating overwrite exit method of the order method?

Thanks,

Rohini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You said few yes/no questions, so do you want to show multiple popups?

In any case, have you thought about hiding the standard Order button and creating a custom button with label "Order". This way you can code all the logic for popups in it and additionally call the standard methods for ordering the shopping cart.

Adding a custom button to Shopping cart is very simple webdynpro FPM configuration.

Let me know what you think of this approach.

Thanks,

Sushil.

Former Member
0 Kudos

Hi Sushil,

Thanks for your reply.Could you please explain me in detail of creating a custom order button as I am not much comfortable with FPM ?In my requirement ,whenever the user clicks the order button of SC,a popup should be displayed.In that popup,I should show the item nos and the description(from SC) with few yes/no questions.once the user answers those questions,they can click either "ORDER" or "CANCEL" actions in the popup."ORDER" and "CANCEL" are the two buttons in the custom popup.If the cancel button is clicked,the control should go back to the SC screen.If order button is clicked,the workflow must be triggered for ordering the SC(Standard functionality of SC order button).Could you please provide me your suggestions to achieve this?

Thanks and Regards,

Rohini

Answers (1)

Answers (1)

former_member228602
Contributor
0 Kudos

Hello Rohini,

     You could include a custom Order Button in the FPM component for SC. And enhance the handle event method that caters to your need of displaying few Popups on the screen and based on your logic you can finally call the handle_event method the "/SAPSRM/CL_CH_WD_MAP_IDENT_SC" with the event_id of the original order button in the FPM application thereby reusing the standard code without having to exercise lot of enhancement.

     Maybe you can take a cue from the scenario of a Buyer creating a PO from Accepted RFX response and you will understand about the approach i suggested.

Thanks and Regards,

Veera

Former Member
0 Kudos

Hi Veera,

Thank you for your response.I understood the following from your reply.Pls correct me if i am wrong.

1.First the standard order button should be hidden.

2.A custom Order button must be created with a custom action.

Pls tell me how should i create a custom popup?Should i need to enhance the web dynpro component "/SAPSRM/WDC_UI_SC_OIF_CA" for creating this custom popup.In which method should i need to write the logic for displaying popup?Please help me by providing your ideas.

Thanks,

Rohini

former_member228602
Contributor
0 Kudos

Hello Rohini,

     You got me right on both points. Firstly let me answer the order button on FPM.

     1. You can hide the standard order by meta data table entries.

     2. For the handling of custom Order button /SAPSRM/WDAC_I_FPM_OIF_SC_PROF would be the FPM application where you would have to add the custom button and you would have to handle the event in enhancement of method /SAPSRM/IF_CLL_IDENT_MAPPER~HANDLE_EVENT class /SAPSRM/CL_CH_WD_MAP_IDENT_SC. And you can invoke the popup by calling the component usage. Creating a new button in FPM kind of involves lot of changes for even a small change. Maybe you can still do with standard button but do modifications in  standard code . It kind of wont be clean nevertheless relieves you of headache like meta data handling , component usage etc...

Thanks and Regards,

Veera

Former Member
0 Kudos

Hi Veera,

Thanks for your reply.Could you please suggest me which way is better?Creating a custom button or having the standard order button and modifying the standard code according to custom requirement?

Thanks,

Rohini.