This document is part 2 of what builds on my other example: "Part 1: basic HCM Process and Forms scenario" which can be accessed at: http://scn.sap.com/docs/DOC-35551
Let’s make the Form Process more functional by allowing the change of address. We will use Subtype 4 from InfoType 0006 for this example.
Now click on Fields (within our Scenario) and add the following fields:
Add the following Fields:
Field Name: LAND1
Name: Country
Data Binding: LAND1
Field Name: STRAS
Name: Address Line 1
Data Binding: PAD_STRAS
Field Name: LOCAT
Name: Address Line 2
Data Binding: PAD_LOCAT
Field Name: NAME2
Name: Contact Name
Data Binding: PAD_CONAM
Field Name: ORT01
Name: City
Data Binding: PAD_ORT01
Field Name: STATE
Name: State
Data Binding: REGIO
Field Name: PSTLZ
Name: Zip
Data Binding: PSTLZ_HR
Field Name: ORT02
Name: County
Data Binding: PAD_ORT02
Result of adding all fields:
We now need to add these fields to our Back-End Service SAP_PA. Double Click on Back-End Services -> SAP_PA -> Fields:
Add the following Field information and hit enter:
Field Name: LAND1
Name: Country
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: LAND1
Field Name: STRAS
Name: Address Line 1
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: STRAS
Field Name: LOCAT
Name: Address Line 2
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: LOCAT
Field Name: NAME2
Name: Contact Name
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: NAME2
Field Name: ORT01
Name: City
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: ORT01
Field Name: STATE
Name: State
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: STATE
Field Name: PSTLZ
Name: Zip
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: PSTLZ
Field Name: ORT02
Name: County
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: ORT02
Result of all Fields added:
We want to default in the employee’s current address (subtype 4) if they have one on record. To do this, double click the column “Default” on each of the new field’s row and select “CUR”. Result:
Since we are performing a change on Infotype 0006, we need to inform the Back-End Service: SAP_PA. Double Click “Infotypes and Operations” and add infotype 0006, subtype 4 as a change operation.
We have now completed all the needed steps in configuration to allow adding address fields for subtype 4 onto our form. Double Click “Form” under your scenario:
Choose “Change” (Pencil) to edit your form:
This will launch the Adobe LifeCycle Designer. The first thing we need to do is select the “Context” tab and see if our new fields are mapped from the interface to the Form. If not, drag them over:
Now switch back to the layout tab so you are in the designer mode. From the Object Library Palette, drag the “ISR Text Edit” object onto your form. We will need 8 of these (1 for each of our new fields). The “ISR Text Edit” object can be found in the ISR Native Controls section:
After adding these objects, your form should look like:
Now from the Data View tab, we need to find the new fields we created from I.T. 0006 and add the data element by dragging it (BINDING) onto the “ISR Text Edit” objects we just created. Drag the lowest element “FIELD” from your fields and drop it onto your “ISR Text Edit” objects. To verify that binding is correct, you can always select your display object and look at the binding properties. Remember to also update the texts for each field. When complete, it should look like:
Save and activate your form. You should be prompted to activate both the interface and form:
Exit the form designer and return to your process configuration.
Now is a good time to test. You can either logon to the portal and select your process or launch directly using:
http://yourserver.com/sap/bc/webdynpro/sap/asr_process_execute?sap-client=<yourclient #>&sap-language=EN
Note: Try changing some of the data to see how the changes are saved to the backend. To do this, select the “Check and Send” button.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
37 | |
10 | |
7 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |