In this step you create an initial screen and add the UIBB provided by the Personal Information
framework called HRESS_C_PERNR_SELECTION
.
Note
This reuse UIBB handles the concurrent employment (CE) aspects, so that your reporting scenario will work in both CE and non-CE circumstances.
The HRESS_C_PERNR_SELECTION
component checks if CE is active in the system and if the current user is a CE employee (which means has more than one PERNR
). If that is the case, the INITIAL_SCREEN
generates
a dialog box, allowing the user to enter one or other of his or her personnel numbers, and then to proceed to the next screen.
Note
For employees with only one PERNR
, the INITIAL_SCREEN
is automatically hidden and the component merely reads the PERNR
based on the user data.
When redefining your feeder class method GET_DATA
, at event LEAVE_INITIAL_SCREEN
you should read the PERNR
using the service class CL_HRESS_EMPLOYEE_SERVICES
. This service
provides the correct PERNR
according to what the user selected (if CE) or simply as per the user data (for non-CE). See also code example in section Event LEAVE_INITIAL_SCREEN for
Method GET_DATA
).
Whether you use concurrent employment or not, you must create the initial screen so that you handle PERNR
correctly. To do so, proceed as follows:
Place your cursor on ContentArea
in the hierarchy on the left.
Enter the ID and a title for the Initial Screen.
Recommendation
SAP recommends you to use INITIAL_SCREEN
as the ID
for this content area.
Set the Content Area Type
to Initial Screen
.
Place your cursor on ContentArea
in the hierarchy on the left, then choose Add UIBB
.
Choose the Attributes
button of the UIBB inside the new content area for the initial screen.
Enter the component HRESS_C_PERNR_SELECTION
.
Enter the view PERNR_SELECTION_MAIN
.
Choose Save
.
You have successfully created the initial screen.
Note
This initial screen will not be seen by the user, unless the user has CE, since there is nothing for the end user to select or do. Without concurrent employment, this screen is automatically suppressed, you need not do anything to suppress it. This is taken care of automatically in this reuse component.