cancel
Showing results for 
Search instead for 
Did you mean: 

ACTION to be called on click of Button - BADI to be triggered.

Former Member
0 Kudos

Hi Amigos,

I have a requirement to create a button "Quality Notification" and when clicked it should generate the Action in WebUI.

Can any of you help me in calling the ACTION BADI. How do i call the badi from the event handler. Please give me some sample coding.

Regards,

Jagadish.G

Accepted Solutions (0)

Answers (1)

Answers (1)

saumya_govil
Active Contributor
0 Kudos

Hi Jagadish,

I am not very clear with your requirement.

As far as I understand you want to perform some action on the Web UI.

Could you please explain in detail what action you wish to perform.

Regards,

Saumya

Former Member
0 Kudos

Hi Saumya,

Thanks for ur reply.

Actually my requirement is, End user wants me to add an button in the UI named "Qualify Notification". When he clicks on that button, there is an Action profile created and assigned to the transaction type in GUI. I have created an implementation (ZQualify) for the badi definition (EXEC_METHODCALL_PPF).

How do i call this BADI on click of that button, ie. i have created an Event handler. I now require some sample code to call this badi from the Event handler. Could u please help me?

Jagadish

saumya_govil
Active Contributor
0 Kudos

Hi Jagadish,

Thanks for the detailed explanation.

You can make a call to filter based BAdI implementation in Actions.

Go to the Action definition and select the processing type as method call. There select the BAdI method you wish to trigger from the F4 help.

Hope this helps!

Regards,

Saumya

Former Member
0 Kudos

Hi Saumya,

Jagadish.G

Former Member
0 Kudos

HI Saumya,

In WebUI, this is nothing but just a button. Please give me sample code for calling the BADI.

saumya_govil
Active Contributor
0 Kudos

Hi jagadish,

There is no code to do this setting. Please refer to the following wiki for details of how to set processing type for an Action. In this case they have used a workflow as a processing type. You need to select a method call and make call to BAdI method.

https://wiki.sdn.sap.com/wiki/display/CRM/Actionprofilesin+SAP-CRM

Hope this helps!

Regards,

Saumya

Former Member
0 Kudos

Soumya,

Thanks a lot for ur effort, but the link that you have provided works in SAP GUI, but for WebUI how do we call BADI. Your information would be more helpful for me. Please do the needful.

Jagadish.G

saumya_govil
Active Contributor
0 Kudos

Hi Jagadish,

This configuration needs to be done in SPRO and would work both on GUI and UI.

When ever the business object event would get triggered, this action would be executed (checking the start conditions if any) on both GUI and UI.

Regards,

Saumya

Former Member
0 Kudos

Thanks for ur reply. Let me cross check my customizing and get back to you if required.

Former Member
0 Kudos

Hi jagadish g,

For the code in your new button in Web UI, maybe you can copy the sap standard code on how they call the action.

The idea is in your action profile, use 'processing when saving documents' in processing time. So this means when you save your transaction, your BADI will be called.

Put breakpoint on FM CRM_ACTION_DETERM_COMPL_DOC

So you can know how to get the parameter in below FM.

CALL FUNCTION 'CRM_ACTION_DETERMINE'

EXPORTING

iv_header_guid = iv_header_guid

iv_object_guid = iv_header_guid

iv_at_once_only = iv_at_once_only

iv_for_toolbar_only = iv_for_toolbar_only

iv_no_detlog = iv_no_detlog

iv_context = lv_contexts

iv_trigger_onsave = iv_onsave.

The lv_context will have the data that need to your new button to trigger the action and your EXEC_METHODCALL_PPF BADI.

Btw, why the requirement need processing in new button ? the processing in save button is standard and you don't need to put any event handler

Hope it's work,

Lina

Former Member
0 Kudos

Thanks lina.... let me check this code, if it would work and get back to you.