Custom Function to Load Alternate Labelling for Functional Location using SAP Data Services

Hey All,

In this blog post, you will learn how to update Alternate Labelling for Functional Locations using SAP Data Services. SAP alternative labeling is a renumbering of functional location, changing the primary key or the definition of an additional view that displays different number schemes.



Picture 1: Example of FLOC Alternate Labelling


This functionality enables you to use a different labelling system for the same hierarchy. For example, the manufacturer company of a technical system can work with labeling system that is different from the one used by a customer.


Requirement: SAP has provided a standard FM ILOX_IFLOS_UPDATE which allows you to update Alternate Labelling for FLOCs.

Pre-requisite: FLOC’s should be created in the S/4 HANA or MDG System.

Solution: The standard FM is not a remote enabled one and therefore cannot be used in SAP Data Services Designer. We can create a wrapper around the FM and create a Z function(E.g. ZILOX_IFLOS_UPDATE) as per the ABAP Development standards and then make it remote enabled. You can contact the ABAP developer in your team to create a wrapper around the Standard FM ILOX_IFLOS_UPDATE.



Picture 2: Custom Function Module created as per ABAP Coding standards

Step 1: Import the Z Function(ZILOX_IFLOS_UPDATE)  in SAP Applications Datastore in SAP Data Services Designer. You can now call this function in a query transform.

For the ZILOX_IFLOS_UPDATE function module, the parameters essential are


Picture 3: Input parameters in Function Module


Step 2: The Functional Consultant should first test the data using Test Data directory in SE37 and update the Alternate Label for the FLOC using the Z function. If the alternate labelling is getting updated properly in SAP then it should also work in SAP Data Services Designer

  1. Import the ZILOX_IFLOS_UPDATE Function in SAP Datastore.
  2. Get the Input data for the Function in the following format


Picture 4: Input Data Format

Step 3: Design the Data flow in SAP Data Services Designer

a. Design the data flow in the below manner


Picture 5: Data Flow Design


b. In the Query_NRDM query transform, Click on New Function Call


Picture 6: NRDM Schema


c. Define the Input parameters


Picture 7: Define the Input Parameters


d. Select Output parameter as EXCEPTION and AL_RFC_RETCODE. The only disadvantage in this FM is that there are no return parameters. You can ask your ABAP developer to add TPLNR as a output parameter in the FM.


Picture 8: Output Parameters


e. Unnest the schema so that it can be outputted to a Target database table


Picture 9: Unnest Schema

f. Execute the job in Designer by pointing the SAP Datastore configuration to correct S/4 HANA Environment. If the RFC Call is successful, you should receive RFC OK in the AL_RFC_RETCODE, otherwise it will give RFC_EXCEPTION and the corresponding If the Alternate labelling exists, then it will give an exception NEW_STRNO_EXISTS.


I hope this blog is useful for the consultants who are using SAP Data Services as the ETL tool to load the Alternate labelling FLOC data to SAP Target System.

If you have any questions please mention in the comments


Original Article:

Related blogs


Please enter your comment!
Please enter your name here