• Post category:HCM Extract
  • Post comments:2 Comments
  • Post last modified:June 30, 2020
  • Reading time:4 mins read
Hiding XML nodes in HCM Extract Output
Hiding XML nodes in HCM Extract Output
- Hiding XML nodes in HCM Extract Output
Total Visits: 10
Todays Visits: 0

In this article we will look into another interesting feature of hiding the XML nodes in HCM Extract output.

The default output of an HCM Extract is an XML file. And we can apply rtf/etext/excel template to get the output in xls,csv,txt,pdf formats.

Most of the external vendors request for a text/csv output files. However some vendors request for an xml file as output with some specifications. In HCM Extracts, we do not have much control over the hierarchy structure of the XML output. We can change the XML tags for attributes at attribute level and XML tags for Records at Record level.

However if you don’t want some tags at all, then you can use the Hidden checkbox at Record level to remove that tag from displaying on the XML Output.

Another usecase for such requirements would be when you implement the bursting feature for HCM Extracts. Split by will work according to the hierarchy of the current node on the output file. If there are any sibling data groups/records, those information won’t be available on the bursted XML using which we create the template. So, we will have to hide some XML tags for the records to get the bursting functionality working.

Sample XML file for an HCM Extract:

<EMPLOYEE_DATA_GROUP>
	<OBJECT_ACTION_ID>6050577</OBJECT_ACTION_ID>
	<EMPLOYEE_RECORD_GROUP>
		<EmployeeNo>602098</EmployeeNo>
		<FirstName>Ronald</FirstName>
		<Supervisor>602860</Supervisor>
	</EMPLOYEE_RECORD_GROUP>
	<ADDRESS_DATA_GROUP>
		<ADDRESS_DATA_GROUP>
			<ADDRESS_1>
				<Address1>Test Street1</Address1>
				<Address2/>
				<Address3/>
				<PostalCode>12345</PostalCode>
				<AdrCountry>US</AdrCountry>
				<State>CA</State>
			</ADDRESS_1>
		</ADDRESS_DATA_GROUP>
	</ADDRESS_DATA_GROUP>
	<EMAIL_DATA_GROUP>
		<EMAIL_DATA_GROUP>
			<EMAIL>
				<EMAIL_ADR>[email protected]</EMAIL_ADR>
			</EMAIL>
		</EMAIL_DATA_GROUP>
	</EMAIL_DATA_GROUP>
</EMPLOYEE_DATA_GROUP>

Now, if we are bursting by EMPLOYEE_DATA_GROUP\EMPLOYEE_RECORD_GROUP\EmployeeNo then you cannot access the Address and email of that employee as those information are not located below the EMPLOYEE_RECORD_GROUP in the XML file.

Alternative would be to Hide all records EMPLOYEE_RECORD_GROUP, ADDRESS_DATA_GROUP, ADDRESS_1, EMAIL_DATA_GROUP and EMAIL record tags.. so that the output XML would look like below:

Modified XML for an HCM Extract:

<EMPLOYEE_DATA_GROUP>
	<OBJECT_ACTION_ID>6050577</OBJECT_ACTION_ID>
	<EmployeeNo>602098</EmployeeNo>
	<FirstName>Ronald</FirstName>
	<Supervisor>602860</Supervisor>
	<ADDRESS_DATA_GROUP>
		<Address1>Test Street1</Address1>
		<Address2/>
		<Address3/>
		<PostalCode>12345</PostalCode>
		<AdrCountry>US</AdrCountry>
		<State>CA</State>
	</ADDRESS_DATA_GROUP>
	<EMAIL_DATA_GROUP>
		<EMAIL_ADR>[email protected]</EMAIL_ADR>
	</EMAIL_DATA_GROUP>
</EMPLOYEE_DATA_GROUP>

Now if we setup the bursting by EMPLOYEE_DATA_GROUP/EmployeeNo, the Address and Email information would still be available in the bursted XML as the Address and Email groups are children of EMPLOYEE_DATA_GROUP parent tags.

We can achieve this functionality in extract by hiding the record level tags for the hierarchy traversal records and records in the child data groups.

Extract Hierarchy Structure:

image 20 - Hiding XML nodes in HCM Extract Output
Hierarchy of the Data Groups and Records for the initial XML file
image 18 1024x303 - Hiding XML nodes in HCM Extract Output
Make the records Hidden for Hierarchy Traversal and Records in Child DGs
image 19 1024x294 - Hiding XML nodes in HCM Extract Output
Making the Records in Child DG Hidden

Once we make these changes and run the extract, the output XML will not have these unnecessary record tags and the bursting can be achieved successfully.

Note: We can hide only the Record tags irrespective of the Record Type. We cannot hide the Data Group tags in HCM Extract. This feature is also used in some payroll extracts to reduce the size of the output by eliminating the unnecessary record tags.