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

This blog explains How to Add or Use the Customer Fields in ESS Leave Request.

Requirement: I came across some discussions how can we add a Customer field to use as a Checkbox or Dropdown list in ESS Leave Request, So let me explain some of this scenarios.

Solution:

You can do with Customization of FPM component

Step 1:

Goto IMG path in Tx: SPRO

Personnel Management-> Employee Self-Service (Web Dynpro ABAP)-> Service Specific Settings -> Working Time -> Leave Requests -> Processing Processes -> Specify Processing Processes for Types of Leave -> Define Absences/Processing Processes -> Choose

Choose the Leave type for which you need the Customer Field, for ex: SMCL (Casual Leave).

Here you can find the ‘Field Selection for Additional Data’ you need to select one of the value from F4 help as shown below.

Step 2:

Goto Tx: SE80 and select Webdynpro Component as ‘FPM_FORM_UIBB’

Expand Component Configurations and select ‘HRESS_CC_GUIBBF_LEAVREQ’ and Start Configurator

You need to create Enhancement by going to ‘Other functions’ button as shown below.

Give the name as Z_ HRESS_CC_GUIBBF_LEAVREQ and SAVE it.

Goto Z_ HRESS_CC_GUIBBF_LEAVREQ and Start Configurator and Click on Change button as shown

Goto Group Additional Data, Elements

Change the Attributes as shown below

Step 3:

Goto Tx: SE80 and select Webdynpro Component as ‘FPM_OVP_COMPONENT’

Expand Component Configurations and select ‘HRESS_CC_PTARQ_LEAVREQ’ and Start Configurator.

You need to create Enhancement by going to ‘Other functions’ button as shown below.

Give the name as Z_ HRESS_CC_PTARQ_LEAVREQ and SAVE it.

Goto Z_ HRESS_CC_PTARQ_LEAVREQ and Start Configurator and Click on Change button as shown

Goto Page LRF as shown below

Goto SELECTION_FORM tab and Click on Attributes and change the Configuration Name as ‘Z_ HRESS_CC_GUIBBF_LEAVREQ’

Click on Save, that should look like below

Step 4:

Expand Webdynpro Applications and select ‘HRESS_A_PTARQ_LEAVREQ_APPL’

Expand ‘HRESS_A_PTARQ_LEAVREQ_APPL’ goto HRESS_AC_PTARQ_LEAVREQ and Start Configurator

You need to create Enhancement by going to ‘Other functions’ button as shown below.

Give the name as Z_ HRESS_AC_PTARQ_LEAVREQ and SAVE it.

Now you will see the new Configuration Component at ‘ Applic. Configurations’ with the above Z name.

Goto Z_ HRESS_AC_PTARQ_LEAVREQ and Start Configurator and Click on Change button as shown.

Then Change the configuration to Z_HRESS_CC_PTARQ_LEAVREQ and click on save as shown below.

Output:

Login into Portal and go to Create Leave request Page you will find the Additional Data Field – Hours as Check box as shown below.

The Additional Data Field will appear only for ‘CASUAL LEAVE’ as you have configured for only SMCL in Step1.

Business Logic/Validations:

The business logic should be written in the BADI PT_ABS_REQ in the method ‘SIMULATE_VIA_BLOP’

Then you can validate by seeing the Value as checked(X) for Customer01 field in the debugging mode as shown below.

Open IM_ATTABS_TAB by double click, you can see the Customer 01 field Value as ‘X’.

You can write your own logic for validations further for this field.

Dropdown List

For Getting the field as Dropdown.

In step 2, for example select the Customer02 field and change the display type as 'Drop Down' in Attributes Element.

To assign the values for the dropdown list you need to enhance the method MODIFY_DEF_DEFAULT_LABEL (at the end of this method) of class CL_HRESS_PTARQ_LEAVREQ_GUIBBF write your logic, for example as below.


Example code:



data: lt_fixed_values type WDR_CONTEXT_ATTR_VALUE_LIST,       


         ls_fixed_values type WDR_CONTEXT_ATTR_VALUE.


     READ TABLE ct_field_description ASSIGNING <field_descr>


     WITH KEY name = 'CUSTOMER02'.


     IF sy-subrc IS INITIAL. 


        ls_fixed_values-value = '01'. 


        ls_fixed_values-text = 'MALE'. 


        insert ls_fixed_values into table lt_fixed_values.


        <field_descr>-fixed_values = lt_fixed_values.


     ENDIF.





There might be some other ways to get this requirement done but I followed this way. If anything best please let me know.

Hope This blog helps all of you......Any comments or suggestions are most welcome

Regards,

Mohsin.

14 Comments
Former Member
0 Kudos

Thanks Syed for the details, it will help the community.

Keep it up and keep posting such useful stuff.

Former Member
0 Kudos

gud job ...

Former Member
0 Kudos

Thanks Yugandhar

Regards,

Mohsin

Former Member
0 Kudos

Thanks JWALA.

Regards,

Mohsin

Former Member
0 Kudos

Very helpful. Another one in our consultant toolbox

former_member183917
Active Contributor
0 Kudos

Thanks Syed for sharing. Have below query.

Field selection for additional data "SAP_EDU". How is this SAP_EDU is linked or can we give any other values?

Former Member
0 Kudos

Hi Vinoth,

SAP_EDU is standard Field Selection provided by SAP where in you can find additional Fields like Customer Fields. if you want to give any other values you can give but you need to create new Field Selection going through SPRO IMG Path 'Define Field Selection'.

Regards,

Mohsin.

Former Member
0 Kudos

Hi Mohsin,

Good blog.

Can you tell if this is EHP5 or EHP6.

Regards,

Bharat

Former Member
0 Kudos

Hi Bharath,

Thanks, this is EHP6.

Regards,

Mohsin.

Former Member
0 Kudos

Hi Mohsin,

Thanks.

Can you tell me where I can find configuration documents for portal version of ESS/MSS!

In fact I am a functional consultant. What all in portal do I need to know regarding ESS/MSS functional.

Regards,

Bharat

former_member190996
Participant
0 Kudos

Hi Moshin,

The blog was helpful to add the CUSTOMER fields to the standard application.

I need make one of the customer fields as a DATE field. Could you please let me know how could I achieve this?

Thanks,

Balajii

P.S: I have also started the discussion around the same query at custom field properties in ESS Leave Request

Former Member
0 Kudos

Hi Moshin,

Thanks a lot for your post. It's very helpful. However, Now I am facing a client requirement to implement a link to url in the leave application screen. Is there a way to do that?

I have taken a look at the customer fields' attributes and it seems that I can only select link to action. If there's no way to implement link to url, is there a way to use link to action to activate a redirection to a website on click?

Many thanks.

Isaac

Narender1
Explorer
0 Kudos
Hi Mohsin,

We have implemented the leave request application in both ESS and Fiori with an additional field called "Number of Days". In ESS the field is autopopulated with zero but in Fiori its coming blank.

 

Do you know any customizing spot or BADI where we can set the default value in the custom field. I checked the configuration on SPRO and also BADI PT_ABS_REQ where we add the custom field, but i am not able to default the value.

 

Regards,

Narender
former_member740482
Participant
0 Kudos
Hi Mohsin and for all.

Is possible add an TextView in this application as appear in the following image?


What should I do to get this result?
Labels in this area