Technical Articles
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.
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.
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
- TPLNR
- STRNO
- TPLKZ
- PRKEY
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
- Import the ZILOX_IFLOS_UPDATE Function in SAP Datastore.
- Get the Input data for the Function in the following format
Step 3: Design the Data flow in SAP Data Services Designer
a. Design the data flow in the below manner
b. In the Query_NRDM query transform, Click on New Function Call
c. 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.
e. Unnest the schema so that it can be outputted to a Target database table
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
Thanks for the description of the external setup.
But do you really consider it a good idea recommending using unreleased functionality like FM ILOX_IFLOS_UPDATE?
Hello Manfred Reinart
Thanks for the reply. Its very strange that the standard FM ILOX_IFLOS_UPDATE is not released yet. We had to customize the FM as per the requirement as the FM was not remote enabled and could not be used in SAP Data Services. At the moment the Z Functional Module works perfectly fine and it is sufficing our requirement.
Regards
Arun Sasi
Hello Arun,
I am not saying it is not working - but it is not officially released fro direct consumption by customer code. That is what corresponding flag says. This means that any issue that is not also occuring reproducibly in standard environment is out of support.
Regards, Manfred
Dear Manfred Reinart Agree with you. Would it be possible to check with the Product Group about its release status
Regards
Arun Sasi
Hi Arun,
I do not think further of these 'old' FMs will ever be 'released' if they were not by now.
Same effects should be achievable with the newly release OData APIs - which would avoid you all this encapsulating based on RFC in the first place - in ordre to make functionality available 'remotely'.
In Case corresponding OData APIs do not provide this option please refer to influencing channels as described in Note 11.
Regards, Manfred
Thanks a lot for your kind reply Manfred Reinart !!Appreciate your reply.
Hi Manfred,
The alternative labelling functionality of a Functional location still available public cloud 2023? .
Thanks
Swamy Veeranki