A get work button can be added to EMMACL and EMMACLS very easily, allowing a user to quickly accept work according to predefined business rules. To do so, perform the following steps:


The BADI_EMMA_CASE_WORK_LIST business add-in allows up to three custom buttons to be added to EMMACL and EMMACLS. It also allows standard functions to be disabled, which can be useful if agents should only accept work via the Get Work button.

Add Get Work buttons to the menu enhancements

Once the BAdI has been implemented the next step is to add the actual buttons to the screen. REMMACASELIST refers to EMMACL, and REMMACASELIST_SHL refers to EMMACLS. The following image contains an example of a Get Work button defined in each:

Handle the button function-codes

The next step is to handle the button-clicks, which produce the function codes ‘+EF1’, ‘+EF2’ and ‘+EF3’ when pressed.

To do this implement the BAdI method IF_BADI_EMMA_CASE_WORK_LIST~CALL_ENHANCEMENT_FUNCTION. This may look something like the following:

method if_badi_emma_case_work_list~call_enhancement_function.

  case iv_ucomm.
    when '+EF1'. "Get work
      get_work( ).
    when '+EF2'. "Not yet bound
    when '+EF3'. "Not yet bound


Once this is done the final step is to implement the get_work method. This is generally divided into three sections; identifying the cases to be accepted, accepting them, then refreshing the case list.

method get_work.

    casenrs type table of emma_case-casenr.

    <casenr> like line of casenrs.

* Retrieve some cases
  select casenr from emma_case
    inner join emma_cactor
    into table casenrs
    up to 5 rows
    where ...
    order by ....

* Accept them
  loop at casenrs assigning <casenr>.
    call function 'BAPI_EMMA_CASE_ACCEPT'
        case                = <casenr>.

* Refresh the list
     functioncode           = 'REFRESH'
     function_not_supported = 1
     others                 = 2.


The logic for determining the cases to be accepted will differ depending on business needs and may require additional steps, though the overall structure of this method should be sufficient.


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment