HCM FORMS (Ess-Mss)
Detailed Steps 1. Introduction to ESS MSS
2. ISR Scenario
3. Form Scenario
4. Process 5. Use of BADI as Backend
Service
6. Test Form using WebDynPro
Component
Avik Poddar Roshan Nepal Wipro Technologies
2
Contents 1. ESS MSS (Brief Introduction) ..................................................................................................... 4
1.1 ESS : ................................................................................................................................................ 4
1.2 MSS : ............................................................................................................................................... 4
2. CREATION OF ESS MSS FORMS ............................................................................................................. 5
3. ADOBE FORMS ...................................................................................................................................... 6
3.1 How Interactive Forms Work ............................................................................................................ 7
3.2 Form Designing Overview ................................................................................................................... 7
4. CREATION OF ISR SCENARIO ................................................................................................................. 8
5. CREATION OF FORM SCENARIO .......................................................................................................... 10
6. LINK FORM SCENARIO WITH ISR SCENARIO ....................................................................................... 12
7. DESIGN THE FORM .............................................................................................................................. 13
8. CONFIGURATION IN FORM SCENARIO ............................................................................................... 15
9. CREATION OF PROCESS ....................................................................................................................... 17
10. DEFINITION OF BADI ....................................................................................................................... 19
11. IMPLEMENTATION OF BADI ............................................................................................................ 20
12. CODING IN THE BADI ....................................................................................................................... 24
13. TESTING THE PROCESS (With Badi Functionality) ........................................................................... 33
14. GENERATING WEBDYNPRO COMPONENT FOR SIMULATION OF ESS MSS PORTAL ....................... 36
15. TESTING FROM WEBDYNPRO (Simulating Actual Ess Mss Portal) .................................................. 37
3
PREFACE
~~~~~~~~~~~~~~~~~~~~~~~~
In This Document You Will Find a Brief Discussion on ESS MSS
Forms and How Adobe Interactive Forms can be Used to
develop a particular Business Scenario.
The Scenario taken up as an Example is where Organizational
Details get Auto-populated when you enter the ID of an
Employee.
Taking the Scenario forward, it has been shown how you can
implement a BADI as a backend service for a button in the form.
In this Scenario if you enter the New Position No. and Click
Retrieve Details button it populates the New Position Details
accordingly.
~~~~~~~~~~~~~~~~~~~~~~~~~
4
1. ESS MSS (Brief Introduction)
ESS - Employee Self Service is an web enabled tool used to update their own data by the employee itself.
MSS - Manager Self Service is an web enabled tool used for Managers to take report or update the datas of subordinate.
1.1 ESS : Allows employees to create, display, and change their own data
in the company's intranet. In Personnel Administration, for example, employees can use the Personal Data service to create and edit their own personal data. In this way, employees can keep their own data up-to-date, while simultaneously
reducing the number of time-consuming and expensive activities performed by the Human Resources Department.
1.2 MSS : This Manager Self Service is designed for all employees
who perform management tasks at an operational level, for example:
i. Line managers ii. Team leaders with project management tasks iii. Department heads
In particular, the business package supports managers perform the following:
- Tasks related to the personnel responsibility for their team - Controlling tasks within their budgeting responsibilities - Planning tasks
- Project management tasks
5
2. CREATION OF ESS MSS FORMS
The Creation of ESS / MSS Forms (in brief) involves a couple of steps as follows:-
Creation of the ISR Scenario
Creation of the Form Scenario
Linking the Form Scenario with the ISR Scenario
Defining Backend Services as per necessity
Process for the Scenario has to be created
Designing the Form Layout and binding the Form fields with
appropriate Backend Services
If BADI is required it needs to be first defined and then implemented
according to the functionality expected from it.
For the BADI to be integrated with the Form Scenario Operations and
relevant Field Groups are needed to be defined
Finally all the components, the interface, the form layout, the classes etc.
should all be ‘Active’.
Initial Testing for the Form can be done from Backend using the Process
For a more realistic feel WebDynPro can be used to simulate the actual
ESS MSS Portal
6
3. ADOBE FORMS
What is an Interactive Adobe Form?
SAP and Adobe partnered with the goal of automating and streamlining forms-based communication to support customers who create reusable forms for their business processes. The result of this partnership is SAP Interactive Forms by Adobe. SAP Interactive Forms by Adobe is integrated into no less than six SAP development and run-time environments, which cover both stacks of SAP NetWeaver as well as the SAP Business Suite. These forms are used to display information from the backend as well as take input from the user and update it in system.
• SAP and Adobe jointly work on the integration of PDF technology
into SAP solutions
– Support for offline and online collaborative business scenarios
based on interactive PDF forms.
– Ability to define round-trip PDF forms and enable automatic data
integration into SAP solutions using XML.
– Usage of digital signatures and encryption in supported business
scenarios.
– Ability to create sophisticated multi-page PDF documents.
– Enhanced printing solution.
7
3.1 How Interactive Forms Work
3.2 Form Designing Overview
Interface : The interface defines which data a program can possibly pass on to
a form. It also contains global data and initialization coding that can be used in
a form. Interfaces are re-useable.
Form Template : Every form template consists of a context and layout:
– In the context, you define which part of the interface you actually
want to use in a particular form. You can also add elements like
text modules.
– The layout particularly contains static and dynamic elements. The
layout is designed in Designer. Technically, it is represented in a
special XDP format: XDP = XML Data Package.
– The Scripting for Validations and other Form Level Activities etc. is
done in the Script Editor.
8
4. CREATION OF ISR SCENARIO
First we have to go for Implementation Guide (SPRO)
Click on SAP Reference IMG
Follow this Path :
Personnel Management HR Administrative Services Configuration of
Forms/Processes Configuration of Forms
9
Execute Create ISR Scenario
Click on New Entries
Provide Scenario Name, Description of the Scenario and Application to which the
Scenario relates.
Save the Entry. Scenario is created.
10
5. CREATION OF FORM SCENARIO
Go to Transaction HRASR_DT (Design Time for Processes and Forms)
Click on Yes
Fill the ISR Scenario, Form Name, Back-End Service name.
11
Click On Generate ISR Scenario (Ctrl + F3)
12
6. LINK FORM SCENARIO WITH ISR SCENARIO
Go and Execute Link ISR Scenario with Form Scenario after saving Form
Scenario and Give a ISR Scenario name to be linked to and save the data.
13
7. DESIGN THE FORM
Activate the Adobe Form Interface and then the Layout.
Create the Form Layout according to the Given Specification, Maintain the
Layout Standards
Check Data Binding for the fields , go to Objects and then Binding
14
Do the Necessary Scripting in the Script Editor under the appropriate Events.
//Set ISR_EVENT for BAdI processing in backend
$record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_CHECK"
//Trigger call to backend for BAdI user command processing
ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
//Do not allow any further click event until server roundtrip is completed
this.access = "readOnly";
//Toggle visibility to be visible during edit operations, ínvisible otherwise
if($record.CONTROL_PARAM.ISR_MODE == "DISPLAY"
$record.CONTROL_PARAM.ISR_FORM_VIEW =="ISR_APPROVE" )
then
this.presence = "invisible"
else this.presence = "visible"
endif
Save & Activate. Go Back to the Form Scenario.
15
8. CONFIGURATION IN FORM SCENARIO
Add Relevant Fields that Need to be Fetched from Backend
Double Click on Default Values & Change Default Value for fields
Check if form is Inactive, Active it.
16
No need to make any changes to Scenario Steps
Check whether SAP_PA has been successfully integrated to the Back-End
Services
Now, after this much configuration if you want to check whether things are
going fine you have to create a process for the form through which you can
check whether the functionality is going on just as expected.
17
9. CREATION OF PROCESS
Click on Process.
Click on Yes.
Enter the Form Scenario Name
The below testing will just confirm that the configurations done till now are
working fine. After this we can move on with the BADI definition and
implementation as per the form requirements.
18
Test Process (Without BADI)
19
10. DEFINITION OF BADI
Define BADI in Backend Services
Click on Definition
If it’s in display mode change mode to edit
Click on New Entries
Save and Back
Once the BADI is defined , it needs to be implemented for the form scenario as a
backend service and coding needs to be done in the methods already generated, if
there is need of custom methods they can as well be defined and used, appropriate
parameters should be defined for them. Also Attributes need to be defined in the
Class of the BAdi and everything needs to be Active.
20
11. IMPLEMENTATION OF BADI
Implement the BADI as a Back-End Service , Click on Functionality by BAdi
Now write the BADI code in the Methods and do the needful
Can add custom methods from Class -> Methods
21
Define Parameters for the Methods
22
23
Define Attributes for the Class
After this you can start on with the coding part. Below a set of code is given that is
applicable to the test scenario that has been developed.
24
12. CODING IN THE BADI
Method : if_hrasr00gen_service~get_specials_fields
method if_hrasr00gen_service~get_special_fields.
data init_fields_wa type line of hrbas_fieldlist_tab.
init_fields_wa = c_fieldname_plans. append init_fields_wa to special_fields.
endmethod.
Method : if_hrasr00gen_service~get_field_info
method if_hrasr00gen_service~get_field_info.
data field_info type hrasr00gs_field_info.
data service_field type fieldname.
clear field_infos.
loop at service_fields into service_field.
clear field_info.
case service_field.
when c_fieldname_plans.
field_info-fieldname = c_fieldname_plans.
field_info-field_data_element_name = c_dtel_plans.
field_info-supports_value_help = false.
field_info-supports_default_value = true.
append field_info to field_infos.
when c_fieldname_bukrs.
field_info-fieldname = c_fieldname_bukrs.
field_info-field_data_element_name = c_dtel_bukrs.
field_info-supports_value_help = false.
field_info-supports_default_value = true.
append field_info to field_infos.
25
when c_fieldname_btrtl.
field_info-fieldname = c_fieldname_btrtl.
field_info-field_data_element_name = c_dtel_btrtl.
field_info-supports_value_help = false.
field_info-supports_default_value = true.
append field_info to field_infos.
when c_fieldname_werks.
field_info-fieldname = c_fieldname_werks.
field_info-field_data_element_name = c_dtel_werks.
field_info-supports_value_help = false.
field_info-supports_default_value = true.
append field_info to field_infos.
endcase.
endloop.
endmethod.
Method : if_hrasr00gen_service~get_operations
method if_hrasr00gen_service~get_operations.
data operation type hrasr00gs_operation.
clear operations.
* operation GET_Position Data
clear operation.
operation-operation = c_oper.
operation-fieldnames = get_fields_of_operation( operation-operation ).
append operation to operations.
endmethod.
Method : if_hrasr00gen_service~initialize
26
method if_hrasr00gen_service~initialize.
data special_field type hrasr00value_of_field.
data plans type plans.
* Get position number
loop at special_fields into special_field where fieldname = c_fieldname_plans.
if special_field-fieldvalue is initial.
return.
else.
plans = special_field-fieldvalue.
endif.
endloop.
endmethod.
Method : if_hrasr00gen_service~do_operations
method if_hrasr00gen_service~do_operations.
data service_operation_wa type hrasr00genserv_operation.
data relevant_help_datasets type hrasr00gs_help_dataset_tab.
data relevant_service_datasets type hrasr00gensrv_dataset_tab.
loop at service_operations into service_operation_wa.
case service_operation_wa-operation.
when c_oper.
* perform operation GET_POSITION_DATA
call method me->do_opera_get_position_data
exporting
special_fields = special_fields
no_auth_check = no_auth_check
message_handler = message_handler
changing
help_datasets = relevant_help_datasets
service_datasets = service_datasets.
endcase.
endloop.
27
endmethod.
The method if_hrasr00gen_service~get_help_values contains.
method if_hrasr00gen_service~get_help_values.
endmethod.
The method if_hrasr00gen_service~get_help_values contains.
method get_fields_of_operation.
clear fieldnames.
case operation.
when c_oper.
* append c_fieldname_pernr to fieldnames.
append c_fieldname_plans to fieldnames.
append c_fieldname_werks to fieldnames.
append c_fieldname_bukrs to fieldnames.
append c_fieldname_btrtl to fieldnames.
when others.
assert 1 = 0. "called for an operation, that is not supported
endcase.
endmethod.
28
The method if_hrasr00gen_service~do_opera_get_position_data contains.
method do_opera_get_position_data.
data service_dataset_wa type hrasr00gensrv_dataset.
data special_field_wa type hrasr00value_of_field.
* data pernr_id type pernr_d.
data lv_plans type plans.
data lv_werks type werks.
data lv_btrtl type btrtl.
data lv_bukrs type bukrs.
field-symbols <service_field_value> type hrasr00gensrv_dataset.
* get position
loop at special_fields into special_field_wa
where fieldname = c_fieldname_plans.
lv_plans = special_field_wa-fieldvalue.
endloop.
select single werks from pa0001 into lv_werks where plans = lv_plans.
select single bukrs from pa0001 into lv_bukrs where plans = lv_plans.
select single btrtl from pa0001 into lv_btrtl where plans = lv_plans.
loop at service_datasets assigning <service_field_value> where fieldname = c_fieldname_btrtl.
if <service_field_value> is assigned.
<service_field_value>-fieldvalue = lv_btrtl.
endif.
endloop.
loop at service_datasets assigning <service_field_value> where fieldname = c_fieldname_werks.
if <service_field_value> is assigned.
<service_field_value>-fieldvalue = lv_werks.
endif.
endloop.
loop at service_datasets assigning <service_field_value> where fieldname = c_fieldname_bukrs.
if <service_field_value> is assigned.
<service_field_value>-fieldvalue = lv_bukrs.
endif.
endloop.
endmethod.
29
Add BADI Service Fields
30
Create Operations and Relevant Field-Group
31
Enter the Field Group, Name and details and Save.
Assign the required Fields to the Field Group that has just been created,
Define an Operation you need to execute.
32
Assign the Field Group just created to this Operation.
Define Field Group in the Form Scenario
Save the Form Scenario , Check whether Interface, Layout and BADI are Activated.
33
13. TESTING THE PROCESS (With Badi Functionality)
Toggle to Process and Enter the Process Name that you created , click Enter.
Check for a value for which all the concerned data are maintained in SAP and
Execute.
34
Initial Data displayed based on the Pernr (Employee ID) Entered.
35
Now, Enter New Position and click on Check
So, Now once you are sure that the Back-End Services are working just as
desired you can move on with integrating the form in the portal.
In absence of the actual ESS MSS Portal you can always simulate it in
WebDynPro component that can be generated through Object Navigator
36
14. GENERATING WEBDYNPRO COMPONENT FOR SIMULATION OF ESS
MSS PORTAL
Go to Transaction SE80 (Object Navigator)
Toggle to Web DynPro Comp. and Enter HRASR00_PROCESS_EXECUTE
Click on Web DynPro Applications, and then on asr_form_display
Copy the URL found under Administration Data
37
15. TESTING FROM WEBDYNPRO (Simulating Actual Ess Mss Portal)
Paste the Link in Internet Explorer and click Enter
Enter the Relevant Credentials and Click on Log On.
38
Enter the Employee ID (Pernr) and Click on Start.
39
Now, Click on Select Process
A List of all the available Process for that Employee appears, select the process that
has just been created.
40
Select the Process and Click On Edit.
41
The form comes with current details autopopulated based on the Employee ID
provided.
42
Enter the New Position Number and click Retrieve Details.
43
The Details according to the Position No. gets populated in respective fields.
44
Click on Check and Send. Everything appears in a Read Only Format.
45
Finally click on Send and if everything went fine the Process gets completed and a
Process Reference No. is generated
END