Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

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'

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'

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).



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

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:



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_data-RCTVC and begda <= sy-datum and endda >= sy-datum.


"update values on object
lo_entity
->set_property(
iv_attr_name
= 'ORT01'
iv_value    
= cities-CTXKJ ).

"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.


Labels in this area