Many times it is required to enhance ESS personnel information to accommodate customized requirements . Example: Adding a new field to address or bank details to cater the needs of country specific Business transactions . So here is the step by step approach to enhance the UI and also get the values saved in backend R3 in respective infotypes.
We have taken the example of enhancing Bank details i.e. infotype 0009 for china with a field to be served as both input / out put one in ESS .
The technique which supports this extension is known as De-coupled frame work design.
What is Decoupled Frame work :
This is the new frame work which allows infotypes to be created /extended with separation of business logic from UI part ie the visual display. Infotypes that are created using the new method are also known as “decoupled” infotypes. The user on the high level is completely ignorant about the technical design and also the data flow which makes the usage of infotypes more of a common man usage.
Step by Step Approach.
Lets take the example of enhancing IT0009 with customised field ZZBKREF in Bank information Tab in ESS personenel information.
When we see IT0009 , we can find standard field BKREF but here we have taken ZZBKREF to be able to make it I/O field and changed by user.
When User wants to display Bank information field ZZBKREF should apper as an o/p field and when clicks edit option it apperas as an i/p field to allow user to modify existing value .
The 1st step for this enhancement is to find out the screen structure for IT0009 . Respective screen structures are stored in table view V_T588UICONVCLAS. We see it is HCMT_BSP_PA_XX_R0009 is the generic screen structure for IT0009 . If we want country specific screen enhancement that also we can find here . eg . HCMT_BSP_PA_US_R0002 for US specific IT0002.
FM HRXSS_PER_P0009_XX is the RFC called from webdynpro for accessing IT0009
It can be obsevred that the FM uses portal screen structure HCMT_BSP_PA_XX_R0009 as Export parameter to R3.
Communication between ESS portal and R3 happens using this screen structure so HCMT_BSP_PA_XX_R0009 needs
to be enhanced with custom field ZZBKREF for Bank information extension.
Lets take a look on HCMT_BSP_PA_XX_R0009 . It has a CI include CI_XX_R0009 whre we can add the custom field .
Now we have to do the main part ie business logic to map the front end portal field ZZBKREF to back end R3 infotype
record data structure.
So BAdi HRPAD00INFTYUI is implemented to keep the business logic hidden from portal UI .
Here is the flow of communication happening between Portal to R3 Via above BAdi.
Data Flow :
To and fro communication from portal to R3
Sample code for INPUT_CONVERSION
IF screen_structure_name = ‘HCMT_BSP_PA_XX_R0009’.
* assign screen to a field symbol
ASSIGN screen_structure TO <r0009>.
* get type casting
ASSIGN pnnnn TO <lfs_p0009>. ” CASTING.
* get BKREF from screen which is modified by user from ESS UI
l_bkref = <r0009>-zzbkref.
* Save the value in Infotype field BKREF to save it in infotype data base.
<lfs_p0009>-bkref = l_bkref.
Sample code for OUTPUT_CONVERSION
* Field symbol declaration
FIELD-SYMBOLS : <lfs_hcmt_bsp_pa_xx_r0009> TYPE hcmt_bsp_pa_xx_r0009,
<lfs_p0009> TYPE p0009.
* trigger this BAdi only for IT0009
IF screen_structure_name EQ ‘HCMT_BSP_PA_XX_R0009’.
* Assign Infotype Structure and screen structure
ASSIGN pnnnn TO <lfs_p0009>.
ASSIGN screen_structure TO <lfs_hcmt_bsp_pa_xx_r0009>.
* Move BKREF value form database to Screen structure
<lfs_hcmt_bsp_pa_xx_r0009>-zzbkref = <lfs_p0009>-bkref.
Step – 3
From Portal side also the field is added and enabled to get displayed on ESS.
Test the same from portal to display backend value BKREF from R3 .
Go to ESS —> personnel information tab
Click bank information
Lets try to modify the value of bank reference field and
see how the value of bank reference field gets updated in portal and R3.
View from R3:
We see the bankreference value getting updated in R3 IT0009