This document is part 3 of what builds on my other example: "Part 2: basic HCM Process and Forms scenario (Address Type 0006, Subtype 4 is included)" which can be accessed at: http://scn.sap.com/docs/DOC-35583
Let’s make the Form Process even more functional by allowing the change of address while still being able to view the currently stored address. We are still using Subtype 4 from InfoType 0006 for this example.
Click on Fields (within our Scenario) and add the following fields:
Field Name: LAND1_STATIC
Name: Country
DataBinding: LAND1
Field Name: STRAS_STATIC
Name: Address Line 1
DataBinding: PAD_STRAS
Field Name: LOCAT_STATIC
Name: Address Line 2
DataBinding: PAD_LOCAT
Field Name: NAME2_STATIC
Name: Contact Name
DataBinding: PAD_CONAM
Field Name: ORT01_STATIC
Name: City
DataBinding: PAD_ORT01
Field Name: STATE_STATIC
Name: State
DataBinding: REGIO
Field Name: PSTLZ_STATIC
Name: Zip
DataBinding: PSTLZ_HR
Field Name: ORT02_STATIC
Name: County
DataBinding: 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_STATIC
Name: Country
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: LAND1
Field Name: STRAS_STATIC
Name: Address Line 1
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: STRAS
Field Name: LOCAT_STATIC
Name: Address Line 2
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: LOCAT
Field Name: NAME2_STATIC
Name: Contact Name
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: NAME2
Field Name: ORT01_STATIC
Name: City
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: ORT01
Field Name: STATE_STATIC
Name: State
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: STATE
Field Name: PSTLZ_STATIC
Name: Zip
InfoType: 0006
Subtype: 4
ScreenStruct: HCMT_BSP_PA_US_R0006
Field Name: PSTLZ
Field Name: ORT02_STATIC
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 field’s row and select “CUR”. Result:
Save your changes. You will notice, that the operation for these new fields indicates that we are going to perform a “Change”. This is because our “Infotypes
and Operations” specifies change:
Since we only want to display data in these new fields, we need to tell configuration to exclude these fields from any operation. There is a column called: “Op. Exclusion”. If we set the value in this column to “checked”, the corresponding fields are excluded from being operated on. Check the box in this column for the newly added fields. Results below:
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 Display” object onto your form. We will need 8 of these. The “ISR Text Display” object can be found in the ISR Native Controls section:
Now from the Data View tab,we need to find the 8 new static fields we created from I.T. 0006 and add the data element by dragging them (BINDING) onto the “ISR Text Display” objects we just created. Drag the lowest element “FIELD” from your fields and drop it onto your “ISR Text Display” 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, your form should look similar to:
Save and activate your form. 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
Results: (Try saving and make sure your changes are saved to the backend SAP)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |