Skip to Content

ESS / MSS: Adding customer-defined actions and responding to them:

This guide assumes basic knowledge of the enhancement framework introduced in ECC 6.0 and some knowledge of the ESS implementation and configuration screens

Author: Eli Erenburg 29-11-2012

The goal of this document is to guide through adding a custom action that happens when the client presses “enter” after adding values to the field.

In the scenario demonstrated below, we have a search help for ‘Municipal City Code’

/wp-content/uploads/2012/11/ex1_160888.png

We want to calculate the city name accordingly.

We could do this at saving, but we want to display the changed made to the client first, after pressing enter button.

Below is the configuration screen of the detailed address edit screen. Notice the action ‘SET_CITY_NAME’

/wp-content/uploads/2012/11/ex2_160946.png

To add a custom action and respond to it, we must refer to the feeder class of the person details, which is responsible for displaying the data on the screen.

The feeder class in this case is ‘CL_HRESS_PER_DETAIL’

We must create an enhancement implementation for this class (This guide will not explain the details of creating an implementation).

/wp-content/uploads/2012/11/ex3_160947.png


To add custom actions, we must edit the method ‘GET_ACTIONS’:

/wp-content/uploads/2012/11/ex4_160948.png

I’ve created an enhancement that is only present when the infotype is 0006 and add an action called SET_CITY_NAME

Now we must respond to this action:

In method IF_FPM_GUIBB_FORM~PROCESS_EVENT

I’ve added:

/wp-content/uploads/2012/11/ex5_160949.png


which is basically self explanatory.

Now, for the method itself:

We add a method in the class called SET_CITY_NAME

SET_CITY_NAME coding (important part) is:

* Get iterator  from the collection which is a class attribute

lo_iterator = mo_collection->get_iterator( ).

“process all Cash Concentration proposals
lo_entity
= lo_iterator->get_first( ).

WHILE lo_entity IS BOUND.

“ensure update of BOL for this object
activate_bol_sending
( lo_entity ).

“get data of object (curr data type is the screen structure type for the infotype)
me
->get_entity_data(
EXPORTING
io_access
= lo_entity
CHANGING
cs_data  
= curr_Data ).

data:
cities
type T5J63.

select single * from T5J63 into cities where RCTVC = curr_dataRCTVC and begda <= sydatum and endda >= sydatum.


“update values on object
lo_entity
->set_property(
iv_attr_name
= ‘ORT01’
iv_value    
= citiesCTXKJ ).

“next entity
lo_entity
= lo_iterator->get_next( ).


ENDWHILE.


What I do is iterate through the collection (Which has only one item in our case).

And select the value according to the current value in RCTVC (city code field)

That is all.

If you have anything to add or have any questions, im here.


To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply