ESS Personal Information UI enhancement without modification

Tuesday, March 24, 2009 |

1. Infotype screenstructure enhancement

First of all you need to determine the screenstructure for the Infotype you want to enhance. Therefor call transaction SM30 and analyse table view V_T588UICONVCLAS.


Figure 1: screenstructure and convertingclass assignment

The screenstructure above is used in various Function Moduls right from the Web Dynpro Frontend Application. In figure 2 you see a bunch of Modelclasses which do represent different Function Moduls. Lets take the HRXSS_PER_EDIT_0006_DE for instance (Figure 3).


Figure 2: Modelclasses


Figure 3: Function Module "HRXSS_PER_EDIT_P0006_DE"

As you can see, the above Function Module uses the structure HCMT_BSP_PA_DE_R0006 for its main record. As we now have determined the screenstructure in question, its time to enhance it with a custom field. In order to enhance the sctructure, simply view it with transaction SE11 and double click on the include at the bottom CI_DE_R0006.

Once you have added your custom field, the structure could look like in figure 4.

If you do not need to add a new custom field to the front end, but just an already existing field of the Infotype record, you do not have to do anything at this point.


Figure 4: Structure "HCMT_BSP_PA_DE_R0006"

Hint

Your Server where the Web Dynpro ESS applications are deployed to have to be restartet each time you add/remove/change a custom field!

Alternativly use the aRFC Metadata Invalidation tool, provided with NW 7.0 SPS 10+ and NW 6.40 SPS 10+

2. Implement BAdI "HRPAD00INFTYUI"

The screenstructure we have currently enhanced does represent the data which is available during runtime at the ESS WD Frontend Application. Having the data available at the frontend isn't sufficient at all, so we have to somehow map the data to the backend infotype record datastructure. This is done using the BAdI HRPAD00INFTYUI. This BAdI is part of the New Infotype Framework (NITF) which decouples the UI (User Interface) from the business logic. More about decoupled Infotypes can be found at the SAP Online Help Developing an Infotype in Personnel Administration -> Infotype Concept -> Decoupling Infotypes.


Figure 5

The BAdI consists of 2 Methods which are relevant in our ESS scenarios.

  • IF_EX_HRPAD00INFTYUI~INPUT_CONVERSION: Converts the data from the frontend to the backend datastructure. If you want to enter data at the frontend and want the data be available at the backend as well, this method has to be implemented.

  • IF_EX_HRPAD00INFTYUI~OUTPUT_CONVERSION: Converts the data from the backend to the frontend datastructure.

Figure 6: BAdI HRPAD00INFTY

Useful Information

You can use the Converting Classes from tableview V_T588UICONVCLAS as an implementation example. (E.g.: CL_HRPA_UI_CONVERT_BASIC)

3. ImplicitWeb Dynpro UI Personalization

First of all, the Web Dynpro UI personalization does only work if your Web Dynpro application is embedded into a Web Dynpro iView (Web Dynpro Page Builder) and runs in a Netweaver Portal 7.0 and above.

More information about the Web Dynpro personalization can be found at the SAP Help: SAP Online Help

To perform the UI personalization, you have to have at least the Portal Content Administrator role assigned to your user.

Adding a customer enhancement field

Open an ESS Personal Data iView in preview mode (e.g. Address iView)


Figure 7

Press CTRL + Right Mouse Button where you want your customer field added.

On the left container, choose the Transparent Container where you want your new customer field to be added.


Figure 8

Click on "Edit Custom Extension Fields"


Figure 9

You should now see each field you have added to the include structure (figure 4). To enable the field, just select "Visibile".


Figure 10

You can also define your UI element type. In most cases you should select "Input field" or just leave it to Automatic.

But you could also select other UI Element types like Drop Down list and Radio Button Group as shown in figures 10 and 11


Figure 11



Figure 12

Once you click on "Apply", your fields are shown on the screen. (Here: Name and Number)

Figure 13

To further personalize your new fields, you can simply CTRL + Right Mouse Button on the new UI elements.


Figure 14

On the left hand side you see that the new fields (Number and Name) have been added to the UI Element tree. Here you can now change the Label Text or any other property available to fit your needs.

Useful Information

As the ESS applications use the road map patter and you want to have your customer field shown on every road map step you have to manually add your customer field to each road map view.
To support different languages, you have to manually add you customer field to each iView of the respective language.


4. Translations

Every UI personalization does generate a new property of the object (iView/Page). These new properties can easily be translated with the Portal-Translation tool.

5. Restrictions

Datatype restriction

Datatypes for you new customer fields you add to the include structure can not be a structure and not an internal table.


Figure 15

Both results in a runtime error.


Figure 16

BizCard behaviour

The BizCard is the Overview of existing records for different subtypes you see when you enter one of the Personal data ESS applications.



Figure 17

If you want to add new fields to this view you have to consider the following behaviour.

Lets say we have 2 Subtypes defined. Each subtype has e.g. for the field COMNR a different value. (See figure 18,19)


Figure 18



Figure 19

When you add a new field for the datafield, in this case "COMNR" to the Bizcard you will realize the following behaviour.


Figure 20


Figure 21

As you can see just the last record 999999 is shown for each subtype instead of 111111 for the first and 999999 for the last record.

0 comments:

Post a Comment