When implementing SAP Integrated Business Planning (IBP), you have a business requirement that requires L-code. L-code is only available from SAP, and your request must go through an approval process before SAP delivers the L script. L-code is not an extension mechanism and is provided by SAP until you can achieve your requirement through modeling.
SAP creates and maintains custom L-code when you (the customer or implementation partner) inform us of your requirement and we confirm that you cannot meet this requirement by modeling.
What is L-code?
L-code is a way to extend the capabilities of IBP beyond standard configuration. L-code is a low-level, high-performance programming language which is part of SAP’s in-memory Hana database and is
currently restricted for use even within SAP. In IBP, this capability has been used to enable calculations which are currently not possible using standard configuration. It requires “hard coding” based on planning area specific master data and key figures.
Note: Since SAP IBP 4.0.3 version, L Code implementation has been restricted to SAP employees
Why does SAP IBP need L-code?
1. SAP needs a way to provide extensibility for customer requirements.
2. Calculations which have sequential and cross period reference processing requirements might
not be achievable using standard IBP configuration resulting in need for L Code (e.g., forecast
consumption, shelf life planning, coverage).
3. Currently even standard Supply Chain calculations such as Projected Stock and Days of Coverage
supported by supply planning operator are only available at one level with possibility to
aggregate using Sum, Max, Min, Avg functions at higher levels. Some IBP customers do not
want to aggregate at higher levels, but instead recalculate at all levels, which requires L Code.
4. The number of key figures required for complex configurations can be reduced by using L-code.
Challenges with L-code:
1. L-code requires SAP to implement, modify and test.
2. SAP HANA team allows use of L-code only by exception.
3. It requires “hard coding” based on planning area specific master data and key figure definitions.
4. It requires special skills.
5. L-Code is not portable across customers as different customers use different key figures and
master data levels. L-Code needs to be adapted every time there is a change in key figure or
6. L-Code support is not currently part of subscription cost.
7. Regression testing of L-code is not part of the standard code release process.
8. Scripting of L-Code for specific customers takes SAP development resources away from core
Who is currently able to implement L-Code (by policy)?
1. SAP Development
2. SAP Max Attention
3. SAP Consulting does not have access to implement L-Code
4. SAP Partners do not have access to and cannot implement L-Code
5. L-Code can not be modified in the IBP Starter Edition
Why is L-code implementation restricted?
1. The SAP HANA team has a restriction on L-Code usage. It has been flagged as a security concern
by the product governance process.
May 11, 2017 Page 2
2. There are possibilities to introduce errors such as ‘divide by zero’ or ‘infinite loops’ which can go
undetected during tests and can surface in production environments.
3. SAP owns the code and is responsible for fixing any bugs related to the L-code.
To request L-code, proceed as follows:
1. Create a customer ticket with a Microsoft Excel spreadsheet detailing your business requirement for L-code. You only need to provide an Excel formula that makes the requirement clear.
2. SAP analyzes your business requirement and informs you if it is possible to meet this using configuration.
3. If there are no other alternatives, SAP works with you or the project team to deliver the L-code.
4. SAP applies the L-code to your system for you to activate and test. It usually takes a week for SAP to understand your requirements, create the L-code, and apply it to your system.
5. After successful testing and when you are satisfied that your requirement has been met, your ticket is closed/confirmed.
Note: SAP creates L-code for a particular planning level, so you must use an aggregation method for levels above this. L-code does not automatically calculate the logic for all aggregated levels.