cancel
Showing results for 
Search instead for 
Did you mean: 

Adding custom actions to 'Actions' in the CRM web UI toolbar

jcarbonell
Participant
0 Kudos

Hello,

  We are using SOLMAN 7.1 Incident Management, and I am trying to add a new custom action to the 'Actions' pull-down list in the CRM web UI toolbar.I have followed the steps in the 'Aplication Incident Management Configurationj and Upgrade guide', and in the note 1567003.

If you wish to include your own actions in the toolbar, ensure that they conform to the following criteria:

    1. The action must be manually executable by the user in dialog (see the action definition).
    2. The action must be displayable in the toolbox (see the action definition).
    3. The action must not call any GUI functions, such as launching transactions, displaying dialog boxes, or navigating to URLs. Such GUI functions are not compatible with the CRM UI.


If your action meets the above criteria, add an entry in table AGS_WORK_CUSTOM in the following form:

           IM_CRM_UI_PPF_<sequence no> <method filter>

Example:
           IM_CRM_UI_PPF_01             Z_CUSTOM_ACTION_FILTER_01
           IM_CRM_UI_PPF_02             Z_CUSTOM_ACTION_FILTER_02

I have defined the action in the action profile as manually executable and displayable in the toolbar. And it does not call any gui function.

As I have not found any information about what the <method filter> is, I have added an entry with the name of the action definition that I want to run, as it appears in  the action profile,  to the table AGS_WORK_CUSTOM:

But it does not appear in the 'Actions' pull-down list.

Does anybody know how do I have to configure it?

Thank you,.

Jose

Accepted Solutions (0)

Answers (3)

Answers (3)

younmazz
Participant
0 Kudos

Hi Jose,

I think you don't need drop down action on the menu to achieve what you want to do. I think you better to use action container  : BADI CONTAINER_PPF 

Please check below link to know how to define variables for CONTAINER_PPF.

First, you need to define a variable like gv_proc_change (type flag) in according to above link , and define an implementation for BADI  CONTAINER_PPF. here you need to define BADI filter BUS2000223 (For my case - ITSM/incident/SR) before adding a  custom logic in the method  MODIFY_CONTAINER.

here is a sample code

   DATA: LS_OBJECT          TYPE SIBFLPORB,

         LT_VALUES          TYPE TABLE OF SWCONT,

         LV_GUID            TYPE CRMT_OBJECT_GUID,

         LV_GUID_DB         TYPE CRMT_OBJECT_GUID,

         LS_VALUE           TYPE SWCONT,

         LV_RETURN          TYPE SY-SUBRC,

*        LS_STATUS_OW       TYPE CRMT_STATUS_WRK,

         LT_STATUS_DB       TYPE CRMT_STATUS_WRKT,

         LS_STATUS          TYPE CRMT_STATUS_WRK.

* check if classes are bound

   CHECK: CI_CONTAINER IS BOUND,

          CI_PARAMETER IS BOUND.

   CASE FLT_VAL.

     WHEN 'BUS2000223'.

* Get Parameter

       CALL METHOD CI_PARAMETER->GET_VALUES

         RECEIVING

           VALUES = LT_VALUES.

*** Parameter STATUS_CHANGE

       READ TABLE LT_VALUES INTO LS_VALUE WITH KEY ELEMENT = 'GV_PROC_CHANGE'.

       IF SY-SUBRC = 0.


///->> logic


use function module CRM_ORDER_READ_OW or CRM_ORDER_READ to compare between processor in buffer and processor in DB. If the processor has been changed, set   GV_PROC_CHANGE = 'X'. 

///-->

............................

       endif.

ENDCASE.

      


Lastly, in Action condition, trigger the email when GV_PROC_CHANGE = 'X'

Whether use GV_PROC_CHANGE in starting condition or schedule condition is up to you. but it must be scheduled condition at save point, so you need to change the configue part of action definition .

Hope it might help you to sort out your problem .

Regards,

Jin

artemzhegalin
Active Participant
0 Kudos

Hello, Jose.

Usually you do not have to define mail sending PPF actions in AGS_WORK_CUSTOM.

So first of all check you shedule conditions.

P.S. And also there is "feature" in SM: if your PPF is partner-dependent and your business partner presents in CRM document (incident, problem...) twice (in several partner funcions, for example as requester and processor) - you will not see that mail sending PPF.

You can find some information here:

BR,

Artem

jcarbonell
Participant
0 Kudos

Hi Artem,

  Do you mean that this is not necessary, or that it is not possible? I am trying to do it this way because I have not been able to find a way to schedule the action as an automatically scheduled action. Most of the mail actions that I am using are scheduled to be run when the message status changes. But in this case, what I want to do is to send a message when the message processor is changed.and I can do it without changing the message status. So I need to find a way to send a message when only the message processor changes.

Thank you,

Jose

rishav54
Active Contributor
0 Kudos

Hi,

You have maintained wrong value I guess, Please use email smartforms and send it via process call

CRM_SRVORDER_EXEC_SF_MMR

Then define same in AGS_WORK* table.

I had the same issue before.

Thanks

Rishav

jcarbonell
Participant
0 Kudos

Hi,

  Thank you for you quick response. I am using in this action definition smartforms mail, and the process CRM_SRVORDER_EXEC_SF_MMR_HTML, which I guess is the same that you comment, for HTML forms.

But I do not know what I should enter in the AGS_WORK_CUSTOM table entry. Is it the processing method? I have trying using it now, but it does not work either.

Thank you,

Jose

rishav54
Active Contributor
0 Kudos

Hi,

you have defined the processing class, please remove HTML tag.

Secondly make sure you have defined conditions for that also although it does not matter but try with the start condition.

If this does not work, I suspect you need to add the filter in badi and define here as method without smartforms and then you can execute.

Thanks

Rishav

jcarbonell
Participant
0 Kudos

Hi,

   I have tried removing the HTML in the processing method, but it still does not work.

   As for the start condition, I think I should define it if I was to use an automatically scheduled condition, isn't it? But what I want to do is to be able to send a message when I change the processor, so I want the action to be run whenever I select it in the action toolbar.

  I do  not understand the last point. What badi should I modify?

Thanks again,

Jose