Before You Install the Recipe
You must perform the following configuration tasks on your Workday and SAP instances in order to successfully connect to these external systems using Oracle Integration and export employee records from Workday to SAP.
Configure Workday
To access Workday using Oracle Integration and export employees, you must perform certain configuration tasks on your Workday instance.
For general configuration tasks, see Prerequisites for Creating a Connection in Using the Workday Adapter with Oracle Integration 3.
In addition, you must create an Enterprise Interface Builder (EIB) report to import and export Workday data in bulk. And, before you create an EIB report, you must create a custom report with calculated fields and business objects.
- Create calculated fields.
- In the quick find box, search for Create Calculated Fields task.
- In the pop-up window, enter the Field name. For
example:
CF_hired_updated
. Also, select the Business Object as Worker, and Function as Evaluate Expression. - Click OK. You are redirected to Create Calculated Field - Evaluate Expression page.
- Under Calculation, select the Field Type as Text and Default Value as Empty String.
- In the Condition column, create the following calculated fields:
- CF_SAP_is_updated?
And/Or Field Calculated Field Details Operator Comparison Type Comparison Value And CF_Legal_name_change1 Business Object: Worker
Source Field: Worker History
Related Business Object: Action Event
Condition: CF_legal_change1. See step g.
Sort Field: Effective Date
Sort Direction: Descending (Z to A)
Instance to be Returned: First Occurrence
Function: Extract Single Instance
is not empty NA NA Or CF_new_events Business Object: Worker
Source Field: Worker History
Related Business Object: Action Event
Condition: CF_effective date range. See step g.
Fields To Aggregate: Business Process Event
Function: True or False
is not empty NA NA - CF_SAP_hired?
And/Or Field Calculated Fields Details Operator Comparison Type Comparison Value And Hire Date NA greater than or equal to Value from another field Prompt-Start Date And CF_legal_change1 Business Object: Worker
Source Field: Worker History
Related Business Object: Action Event
Condition: CF_legal_change1. See step g.
Sort Field: Effective Date
Sort Direction: Descending (Z to A)
Instance to be Returned: First Occurrence
Function: True or False
is empty NA NA And CF_new_events Business Object: Worker
Source Field: Worker History
Related Business Object: Action Event
Condition: CF_effective change. See step g.
Fields To Aggregate: Business Process Event
Function: True or False
is empty NA NA
- CF_SAP_is_updated?
- In the Return Value If Condition is True column,
create the following calculated fields.
Calculated Field Details CF_sap_updated Business Object: Worker
Text Constant: UPDATED
CF_sap_hired Business Object: Worker
Text Constant: HIRED
- Also, configure the following calculated fields with the following
details.
- CF_SAP_Integration_Status
Calculated Field Details CF_SAP_Integration_Status Field Name: CF_SAP_Integration_Status
Business Object: Worker
Calculation:
Lookup Related Value:
Lookup Field: Worker Additional Data
Related Business Object: Worker Custom Data Snapshot
Return Value: SAP_Integration_Status - CF_legal_change1
And/Or Field Operator Comparison Type Comparison Value And Business Process Type in the selection list Value specified in this filter Legal Name Change And Status greater than or equal to Value specified in this filter Successfully Completed And Effective Date greater than or equal to Value from another field Prompt - Start Date - CF_effective change
And/Or Field Calculated Field Details Operator Comparison Type Comparison Value And Business Process Definition Business Object: Action Event
Function: True or False
in the selection list Value specified in this filter - Change Job (Default Definition)
- Change Job for Global Modern Services
- Change Job for IT Services Group
- Change Job for Sales
- Change Organization Assignments for Worker (Default Definition)
- Change Organization Assignments for Worker for Field Sales - North America Group
- Change Organization Assignments for Worker for Global Modern Services
- Change Organization Assignments for Worker for Marketing
- Change Organization Assignments for Workers by Organization (Default Definition)
- Change Organization Assignments for Workers by Organization for Global Modern Services
- Contact Change (Default Definition)
- Move Worker (Supervisory) (Default Definition)
- Move Worker (Supervisory) for Global Modern Services
- Move Workers (By Organization) (Default Definition)
- Move Workers (By Organization) for Global Modern Services
- Move Workers (Supervisory) (Default Definition)
- Move Workers (Supervisory) for Global Modern Services
- Personal Information Change (Default Definition)
- Personal Information Change for Global Modern Services
- Switch Primary Job (Default Definition)
- Switch Primary Job for Global Modern Services
- Title Change (Default Definition)
- Title Change for Global Modern Services
- Work Contact Change (Default Definition)
And Status Business Object: Action Event
Function: True or False
equal to Value specified in this filter Successfully Completed And Effective Date Business Object: Action Event
Function: True or False
greater than or equal to Value from another field Prompt - Start Date
Note:
Business process names mentioned in the tables above are subject to change based on the Workday instance configuration. You need to select business processes according to your configuration. - CF_SAP_Integration_Status
- Create a custom report.
- Log in to the Workday instance.
- In the quick find box, search for Create custom report.
- In the Create Custom Report window:
- Enter the Report Name. For
example:
Workday_To_SAP_ERP_Worker_Report
. - Select the Report Type as Advanced.
- Check the Enable As Web Service box.
- Uncheck the Optimized for Performance box.
- Select the Data Source as Active and Terminated Workers.
- Click OK. You are redirected to Edit Custom Report page.
- Under the Columns tab, add the Fields and Custom Fields required for the Workday employee details along with the calculated fields with the relevant Business Object.
Business Object Fields Column Heading Override Column Heading Override XML Alias Worker Employee ID Worker_ID Worker_ID Worker Worker Type Worker_Type Worker_Type Worker Employee Type Employee_Type Employee_Type Worker Contingent Worker Type Contingent_Worker_Type Contingent_Worker_SubType Worker Hire Date Hire_Date Hire_Date Worker Termination Date - All End_Date End_Date Worker First Name First_Name First_Name Worker Last Name Last_Name Last_Name Worker Gender Gender Gender Worker Date of Birth Birth_Date Birth_Date Worker Primary Nationality (Locale Sensitive) Nationality Nationality Display Language User Language Code Language Language Worker Country of Birth Country_of_Birth Country_of_Birth Location Address - Country Alpha-2 Code Country Country Worker Job Profile Job_Profile Job_Profile Company Reference ID Company_Org_ID Company_Org_ID Region Reference ID Region_Org_ID Region_Org_ID Location Reference ID Location_Org_ID Location_Org_ID Supervisory Organization Reference ID Supervisory_Org_ID Supervisory_Org_ID Cost Center Reference ID CostCenter_Org_ID CostCenter_Org_ID Worker Position Time Type Position_Time_Type Position_Time_Type Worker CF_hired_updated Action Action Worker Position ID Position_ID Position_ID Worker Pay Group Pay_Group Pay_Group Worker Additional Data SAP_Integration_Status NA SAP_Integration_Status Worker Additional Data SAP_Personnel_Number NA SAP_Personnel_Number
- Enter the Report Name. For
example:
- Click OK.
- After creating custom reports, on the Sort tab, you can specify how the report results should be sorted.
- On the Filter tab, add the fields required for
the employee details along with the calculated fields and the relevant
business object.
And/Or Fields Operator Comparison Type Comparison Value And Terminated (based on report date) equal to Value specified in this filter NA And Hire Date greater than or equal to Prompt the user for the value Starting Prompt Or CF_Legal_name_change1 is not empty NA NA Or CF_new_events is not empty NA NA Or CF_SAP_Integration_Status equal to Value specified in this filter CreateFailed Or CF_SAP_Integration_Status equal to Value specified in this filter UpdateFailed - In the Prompts section, check the Populate Undefined Prompt
Defaults box.
Note:
The data source Active and Terminated Workers uses built-in prompts such as Start Date, End Date, and so on. Based on the report you have chosen, Workday prompts you to fill in specific reporting criteria.
- Create an EIB report.
- Log in to the Workday instance.
- In the quick find box, search for Create EIB task.
- In the Create EIB window, enter a name, choose Outbound, and click OK.
- In General Settings, enter comments and then click Next.
- Under the Get Data tab, select the Data Source Type as Custom Report.
- Select the Custom Report as Workday_To_SAP_ERP_Worker_Report, then click Next.
- Under the Transform tab, select the Transformation Type as New Custom Report Transformation, then click Next.
- Under the Deliver tab, perform the following
steps.
- Select the Delivery Method as Workday Attachment.
- Enter the File Name with the
relevant file extension. For example,
output.csv
. - Specify the Document Retention Policy (in Days) as should be less than 180, and then click Next.
- In the Details section, select the MIME Type as CSV.
- Click Next.
- In the Review and Submit tab, verify the details, then click OK.
- Once you create the EIB report, the View Integration System window appears. In the top-left corner, click the ellipsis next to the EIB task name, choose Enterprise Interface, and then select Configure Transformation.
- In the Configure Transformation window, update the report transformation details, click OK, and then click Done.
- In the View Integration System window, in the top-left corner, click the ellipsis next to the EIB task name, choose Integration, and then select Launch/Schedule.
- In the Launch/Schedule Integration pop-up, select the Run Frequency as Run Now, and then click OK.
- In the Schedule an Integration window, specify the Start Date and Hire Date, and then click OK.
The EIB report is generated.
Configure SAP
To access SAP using Oracle Integration and import employees, you must perform certain configuration tasks on your SAP instance.
For general configuration tasks, see Prerequisites for Creating a Connection in Using the SAP Adapter with Oracle Integration 3.
In addition, you must perform the following configurations that are specific to this recipe.
- Configure SAP Inbound parameters for the
HRMD_A
message type usingWE20
. See SAP Inbound Communication in Using the SAP Adapter with Oracle Integration 3. - Create a function module using
SE37
.Note:
Before creating a function module, ensure that you meet the following prerequisites:
- You have access to an SAP system based on either SAP Netweaver or ABAP platform.
- You have installed the SAP GUI on your local system.
- You have authorization to access
SE37
. - You have the developer key for the SAP system based on Netweaver.
-
You have created the ABAP Function Group.
You must create a Function Group ZFG1, save it in a package ZNUMBER, and activate the Function Group.
- After you have met the prerequisites, go to the transaction
SE37
(ABAP Function Modules). EnterSE37
in the command field and press Enter. - In the Function Module field, enter the name of
the function module (for example,
NUMBER_GET_NEXT
), then click Create.Note:
Most SAP ABAP artifacts need to start with a āZā or āYā. - In the Copy Function Module window, copy the Function Module name,
NUMBER_GET_NEXT
toZNUMBER_GET_NEXT
, and enter the Function Group name asZFG1
, then click Copy. - Activate the Function Module (ZNUMBER_GET_NEXT) and click Test.
- In the initial screen of the Test Function Module, enter the following
values and click Execute.
Import Parameters Value NR_RANGE_NR
02
OBJECT
RP_PREL
QUANTITY
00000000000000000001
SUBOBJECT
none TOYEAR
none IGNORE_BUFFER
none - In the result screen of the Test Function Module, select
Number Details, and get the next
NUMBER
.