cancel
Showing results for 
Search instead for 
Did you mean: 

Disable / trigger message on the selection of Submit FPM button from SRM

former_member211296
Participant
0 Kudos

Dear Experts

We have the following requirements in FPM based SRM WDA application.

 

The following are the technical details of the submit button for the shopping Cart approval application.

 

  Application:/SAPSRM/WDA_L_FPM_OIF

Web Dynpro Component:FPM_OIF_COMPONENT

View Information:CNR_VIEW

 

Configuration ID:/SAPSRM/WDCC_FPM_OIF_SC_PROFNL

Type of UI Element: BUTTON

   

Basically purchaser used to approve and maintain the supplier details. If no supplier is maintained I need to throw error message on
the screen. This we have achieved in one of the Post Exit of the WDA component.

We need to also disable submit button which is available on the screen if the supplier not maintained.

Either we need to disable / or on the click event of the submit button it should throw the relevant error message if no supplier
maintained. Since it is a FPM based component button I am not sure where to write a code and all.

Techinical details of the button mentioned in the above area.

Could you let us know the possibilities to achieve the same?

   

Regards,

Hariprasath

Accepted Solutions (0)

Answers (2)

Answers (2)

suresh_murugan
Explorer
0 Kudos

Hi Prasad,

Create an Implementation for the BADI : BBP_DOC_CHECK_BADI and set the filter for the business object BUS2121.

Using the below class and method you can find out what button the user is clicking.

/SAPSRM/CL_TRANSACTION_CONTEXT=>/SAPSRM/IF_TRANSACTION_CONTEXT~GET_INSTANCE( )" needs to be called to get an instance of the class.

The instance method "/SAPSRM/IF_TRANSACTION_CONTEXT->GET_CURRENT_ACTION( )" can be called to get the currently executed action.

When the action is "SUBMIT" write a valuation to check if the items in the shopping cart has a supplier or not and if there is no supplier update the error message to the export parameter ET_MESSAGES. This is how it has be done in SRM. Please do not modify/Enhance standard  WDA component to achieve the same.

BBP_DOC_CHECK_BADI and BBP_ITEM_CHECK_BADI should be used to perform validation while creating/Changing shopping cart or PO or business objects.

To disable the Submit button.  Use the standard metadata frame work provided by SAP to define and control actions in SRM.

You can check in SPRO settings Extension and Field Control --> Control Action --> Configure Control Action on Header level if you have header level buttons for example to remove Print Preview button from Shopping cart header i have done following settings;


To hide the submit button dynamically on a condition create and assign a custom class and method to below configuration screen. This method will be called when he screen loads. In this method do the validation to check if the submit button should be visible or not.

Its good to use badi to throw error instead of hiding the button. if the button is hidden the user might not know why its hidden. Throwing an error is the best way to handle this situation.

Hope this helps.

Regards,

Suresh

Former Member
0 Kudos

Hi Hari,

If it is a FPM based button then it will have an event id, take that event id and you can write a condition in the proces event of the webdynpro or the feeder class.

Hope this helps you.

Phani

former_member211296
Participant
0 Kudos

Dear Phani

Thanks for your reply.

I am new to this FPM based approach. Please let me know am I right in this regarding.

When I right click on the button I got the following information for the button.

Field ID:   _CFG_ALTERNATE_FUNCTIONS_5_CP ( is it the event id?)

Normally we used to write a code in (Pre or post exit) in WDA standard,

IF it is FPM WDA can I write the code in FPM_OIF_COMPONENT directly ?

Please also let me know how can I get the feeder class for the above mentioned component.

Regards,

Hariprasath

former_member211296
Participant
0 Kudos

Hi

Based on the search I could get some more info on this.  If I understand correctly

the sumbit belongs to the Component Configuration /SAPSRM/WDCC_FPM_OIF_SC_PROFNL.

In that I got the FPM Event Id as  'SUBMIT'. In the global settings I got the WDA component name as : /SAPSRM/WDC_FPM_OIF_CONF.

I could see the method : PROCESS_EVENT in the component controller of /SAPSRM/WDC_FPM_OIF_CONF.    I don't see any code in this method. Can I directly enhance this method.

On the click event I need to get the Supplier details maintained against the shopping Cart number / Guid. But those attributes are not available in the above component.

How can I add more attributes in this context (or) do we have any other efficient way to retrieve the values like shopping cart number / guid etc.. in this method.

Regards,

Hariprasath

amy_king
Active Contributor
0 Kudos

Hi Prasath,

I'm also trying to find the correct PROCESS_EVENT method where the shopping cart "Submit" button is processed. Were you able to find the correct component?

Cheers,

Amy