Skip to Content
Technical Articles
Author's profile photo Arun Sasi Maliyakkal

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.

 

Example%20of%20FLOC%20Alternate%20Labelling

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.

 

Custom%20Function%20Module%20created%20as%20per%20ABAP%20Coding%20standards

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

  • TPLNR
  • STRNO
  • TPLKZ
  • PRKEY

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

Input%20Data%20Format

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

Data%20Flow%20Design

Picture 5: Data Flow Design

 

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

NRDM%20Schema

Picture 6: NRDM Schema

 

c. Define the Input parameters

Define%20the%20Input%20Parameters

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.

Output%20Parameters

Picture 8: Output Parameters

 

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

Unnest%20Schema

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

 

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Manfred Reinart
      Manfred Reinart

      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?

      Author's profile photo Arun Sasi Maliyakkal
      Arun Sasi Maliyakkal
      Blog Post Author

      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

      Author's profile photo Manfred Reinart
      Manfred Reinart

      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

       

      Author's profile photo Arun Sasi Maliyakkal
      Arun Sasi Maliyakkal
      Blog Post Author

      Dear Manfred Reinart Agree with you. Would it be possible to check with the Product Group about its release status

       

      Regards

      Arun Sasi

      Author's profile photo Manfred Reinart
      Manfred Reinart

      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

      Author's profile photo Arun Sasi Maliyakkal
      Arun Sasi Maliyakkal
      Blog Post Author

      Thanks a lot for your kind reply Manfred Reinart !!Appreciate your reply.

      Author's profile photo Narasimha swamy veeranki
      Narasimha swamy veeranki

      Hi Manfred,

       

      The alternative labelling functionality of a Functional location still available public cloud 2023? .

       

      Thanks

      Swamy Veeranki