SlideShare a Scribd company logo
1 of 7
Download to read offline
ISU EDM: Creating formulas for use in
Formula Profiles & RTP Interface

This post is about creating your own formula for use in Formula profiles and RTP
Interface.

Formulas are predefined by SAP.

But one can define formulas with specific functions in Customizing for SAP Utilities,
Tools -> System Modifications -> User Defined Enhancement for Energy Data
Management -> Formulas.

For each formula, a function module needs to defined first with the following interface,

CHANGING
REFERENCE (XY_CNTR) TYPE EEDMFORMULACTR
REFERENCE (XY_INP) TYPE TEEDMFORMPARLIST_I
REFERENCE (XY_OUT) TYPE TEEDMFORMPARLIST_O
EXCEPTIONS
GENERAL_FAULT.



One can also use template function modules provided for this purpose.

ISU_EDM_FORMULA_EASY or

ISU_EDM_FORMULA_XXXX.



I intend to create a formula similar to LIMIT04 but with some difference.

My formula has 4 input parameters and 6 Output Parameters.

Input Parameters

1. Measured Consumption (kwh)

2. First Limit for Consumption (kwh)

3. Second Limit for Consumption (kwh)

4. Limit for Demand (KW)
Output Parameters

1. Portion below First Limit (kwh)

2. Portion above First Limit (kwh)

3. Portion above second Limit (kwh)

4. Net Demand (Just for Evaluation)(KW)

5. Demand below Limit (KW)

6. Demand above Limit (KW)



So first I created a function module by copying the template function module.

Here I give snippets of the code

   •   The 4 Input Parameters

edm_read_input 1.
edm_read_input 2.
edm_read_input 3.
edm_read_input 4.


   •   Check if Measured Consumption exceeds First Limit and then if Measured
       Consumption exceeds Second Limit

IF xval1 > xval2.
    yval1 = xval2.
    yval2 = xval1 - xval2.
ELSE.
    yval1 = xval1.
    yval2 = 0.
ENDIF.
IF xval1 > xval3.
    yval3 = xval1 - xval3.
ELSE.
    yval3 = 0.
ENDIF.


   •   Converting Measured Consumption into Net Demand

yval6 = xval1.
edm_quant_to_demand yval6.
•   Calculating Below and Above Limit for Demand

  if yval6 > xval4.
    yval4 = xval4.
  else.
    yval4 = yval6.
  endif.
  if yval6 > xval4.
    yval5 = yval6 - xval4.
  else.
    yval5 = 0.
  endif.


   •   Appending the result to the Output Parameters

edm_append_output 1.
edm_append_output 2.
edm_append_output 3.
edm_append_output 4.
edm_append_output 5.
edm_append_output 6.


This is how the RTP Formula : Input Parameters Looks like. As you can see the
function module is mentioned and the 4 input parameters are also mentioned.
While allocating input parameters we also have to allocate the Calculation Mode

The calculation mode determines how a value is processed when a formula is
executed. It could, for example, enable calculation based on the status of the input
profile value.

SAP has already predefined a number of calculation modes:

•01 – Value included in calculation
•02 – Value not included in calculation
•99 – Value results in cancellation of calculation
When implementing formulas, you can use the constants

co_calcmod_use type e_formulamod value '01',
co_calcmod_not_use type e_formulamod value '02',
co_calcmod_abort type e_formulamod value '99'.


Below are the Output Parameters
now I executed this formula in a formula profile.




The values of the input profiles were like this.
First Limit for Consumption was at 2000 kwh
Second Limit for Consumption was at 5000 kwh
Demand Limit was at 10000 KW.


The calculation run was executed for the formula.
The profile values generated were.




So you see that not much coding is necessary once the logic is clear :)

This is also available in my blog at http://wp.me/p1Ci5j-5h

Do leave a feedback. :D

More Related Content

What's hot

Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
Hicham Khallouki
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
Kranthi Kumar
 

What's hot (20)

EDM Activation of RTP Components I
EDM Activation of RTP Components IEDM Activation of RTP Components I
EDM Activation of RTP Components I
 
Rental price variants
Rental price variantsRental price variants
Rental price variants
 
Disconnection/Reconnection of a Utilities Installation
Disconnection/Reconnection of a Utilities InstallationDisconnection/Reconnection of a Utilities Installation
Disconnection/Reconnection of a Utilities Installation
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
ISU Assess Workflow to Re Estimate Previous Billed Meter Readings
ISU Assess Workflow to Re Estimate Previous Billed Meter ReadingsISU Assess Workflow to Re Estimate Previous Billed Meter Readings
ISU Assess Workflow to Re Estimate Previous Billed Meter Readings
 
AMI Capabilities: Operational Status
AMI Capabilities: Operational StatusAMI Capabilities: Operational Status
AMI Capabilities: Operational Status
 
Sapscript
SapscriptSapscript
Sapscript
 
Installation Groups
Installation GroupsInstallation Groups
Installation Groups
 
SAP ISU : Installation Groups - Billing Sequence Control
SAP ISU : Installation Groups - Billing Sequence ControlSAP ISU : Installation Groups - Billing Sequence Control
SAP ISU : Installation Groups - Billing Sequence Control
 
DM Estimation in Consumption Registers Based on Past Meter Reading
DM Estimation in Consumption Registers Based on Past Meter ReadingDM Estimation in Consumption Registers Based on Past Meter Reading
DM Estimation in Consumption Registers Based on Past Meter Reading
 
DM Estimation Parameters for Meter Reading Entry
DM Estimation Parameters for Meter Reading EntryDM Estimation Parameters for Meter Reading Entry
DM Estimation Parameters for Meter Reading Entry
 
How SAP SD is integrated with SAP Finance?
How SAP SD is integrated with SAP Finance?How SAP SD is integrated with SAP Finance?
How SAP SD is integrated with SAP Finance?
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
 
List Processing in ABAP
List Processing in ABAPList Processing in ABAP
List Processing in ABAP
 
Access controls for Operands
Access controls for OperandsAccess controls for Operands
Access controls for Operands
 
Sap isu tcodes
Sap isu tcodesSap isu tcodes
Sap isu tcodes
 
delivery-from-projects-sap-ps
delivery-from-projects-sap-psdelivery-from-projects-sap-ps
delivery-from-projects-sap-ps
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
Alv theory
Alv theoryAlv theory
Alv theory
 

Viewers also liked (7)

EDM Activation of RTP Components II
EDM Activation of RTP Components IIEDM Activation of RTP Components II
EDM Activation of RTP Components II
 
EDM Synthetic Profile in Action
EDM Synthetic Profile in ActionEDM Synthetic Profile in Action
EDM Synthetic Profile in Action
 
DM Validation Class Absolute Tolerance Group
DM Validation Class Absolute Tolerance GroupDM Validation Class Absolute Tolerance Group
DM Validation Class Absolute Tolerance Group
 
EDM Overview of Synthetic Profile
EDM Overview of Synthetic ProfileEDM Overview of Synthetic Profile
EDM Overview of Synthetic Profile
 
DM Season Group Calculation in Non Interval Scenario
DM Season Group Calculation in Non Interval ScenarioDM Season Group Calculation in Non Interval Scenario
DM Season Group Calculation in Non Interval Scenario
 
DM Seal Management - India Localization
DM Seal Management - India LocalizationDM Seal Management - India Localization
DM Seal Management - India Localization
 
Linear Consumption Pattern
Linear Consumption PatternLinear Consumption Pattern
Linear Consumption Pattern
 

Similar to EDM Creating Formulas for Formula Profile & RTP Interface

modularization-160202092213 (1).pdf
modularization-160202092213 (1).pdfmodularization-160202092213 (1).pdf
modularization-160202092213 (1).pdf
SreeramBaddila
 
Enhancement technique how to use validations
Enhancement technique how to use validationsEnhancement technique how to use validations
Enhancement technique how to use validations
Ugeshkumarnetha Dasari
 
Lecture05 abap on line
Lecture05 abap on lineLecture05 abap on line
Lecture05 abap on line
Milind Patil
 

Similar to EDM Creating Formulas for Formula Profile & RTP Interface (20)

modularization-160202092213 (1).pdf
modularization-160202092213 (1).pdfmodularization-160202092213 (1).pdf
modularization-160202092213 (1).pdf
 
SAP Modularization techniques
SAP Modularization techniquesSAP Modularization techniques
SAP Modularization techniques
 
Synthetic Profile-Multiple Usage Factors
Synthetic Profile-Multiple Usage FactorsSynthetic Profile-Multiple Usage Factors
Synthetic Profile-Multiple Usage Factors
 
Interesting and Useful Features of the DeltaV PID Controller
Interesting and Useful Features of the DeltaV PID ControllerInteresting and Useful Features of the DeltaV PID Controller
Interesting and Useful Features of the DeltaV PID Controller
 
Pf700 energy savings_lab
Pf700 energy savings_labPf700 energy savings_lab
Pf700 energy savings_lab
 
Pl sql guide
Pl sql guidePl sql guide
Pl sql guide
 
Session 14 validation_steps_sap
Session 14 validation_steps_sapSession 14 validation_steps_sap
Session 14 validation_steps_sap
 
Enhancement technique how to use validations
Enhancement technique how to use validationsEnhancement technique how to use validations
Enhancement technique how to use validations
 
Mod.2.pptx
Mod.2.pptxMod.2.pptx
Mod.2.pptx
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
C Language Part 1
C Language Part 1C Language Part 1
C Language Part 1
 
Savitch ch 05
Savitch ch 05Savitch ch 05
Savitch ch 05
 
Processes in Query Optimization in (ABMS) Advanced Database Management Systems
Processes in Query Optimization in (ABMS) Advanced Database Management Systems Processes in Query Optimization in (ABMS) Advanced Database Management Systems
Processes in Query Optimization in (ABMS) Advanced Database Management Systems
 
PL_SQL - II.pptx
PL_SQL - II.pptxPL_SQL - II.pptx
PL_SQL - II.pptx
 
pl/sql Procedure
pl/sql Procedurepl/sql Procedure
pl/sql Procedure
 
PBDL.pdf
PBDL.pdfPBDL.pdf
PBDL.pdf
 
Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...
Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...
Interesting and Useful Features of the DeltaV PID, Ratio and Bias/Gain Contro...
 
Lecture05 abap on line
Lecture05 abap on lineLecture05 abap on line
Lecture05 abap on line
 
BCOMP1101 Chapter4_2009.ppt
BCOMP1101 Chapter4_2009.pptBCOMP1101 Chapter4_2009.ppt
BCOMP1101 Chapter4_2009.ppt
 

More from Rakesh Dasgupta

More from Rakesh Dasgupta (20)

Convergent Invoicing: Scheduling
Convergent Invoicing: SchedulingConvergent Invoicing: Scheduling
Convergent Invoicing: Scheduling
 
Serial Switching in Interval Meters
Serial Switching in Interval MetersSerial Switching in Interval Meters
Serial Switching in Interval Meters
 
Set Break Point: Meter Reading Data Processing
Set Break Point: Meter Reading Data ProcessingSet Break Point: Meter Reading Data Processing
Set Break Point: Meter Reading Data Processing
 
Convergent Invoicing: Clarification Lists
Convergent Invoicing: Clarification Lists Convergent Invoicing: Clarification Lists
Convergent Invoicing: Clarification Lists
 
Formula Profile: Define Default Values for Input Parameters
Formula Profile: Define Default Values for Input ParametersFormula Profile: Define Default Values for Input Parameters
Formula Profile: Define Default Values for Input Parameters
 
SAP ISU : Budget Billing Basics
SAP ISU : Budget Billing BasicsSAP ISU : Budget Billing Basics
SAP ISU : Budget Billing Basics
 
Budget Billing : Payment plan
Budget Billing : Payment planBudget Billing : Payment plan
Budget Billing : Payment plan
 
Budget Billing : Payment Scheme
Budget Billing : Payment SchemeBudget Billing : Payment Scheme
Budget Billing : Payment Scheme
 
SAP ISU Validation Class : Comparison of n periods
SAP ISU Validation Class : Comparison of n periodsSAP ISU Validation Class : Comparison of n periods
SAP ISU Validation Class : Comparison of n periods
 
SAP ISU: Out-sorting Billing Validation
SAP ISU: Out-sorting Billing ValidationSAP ISU: Out-sorting Billing Validation
SAP ISU: Out-sorting Billing Validation
 
Dynamic Modification Factor_Synthetic Profiles
Dynamic Modification Factor_Synthetic ProfilesDynamic Modification Factor_Synthetic Profiles
Dynamic Modification Factor_Synthetic Profiles
 
Study of Discounts I
Study of Discounts IStudy of Discounts I
Study of Discounts I
 
Extrapolation with Periodic Consumption
Extrapolation with Periodic ConsumptionExtrapolation with Periodic Consumption
Extrapolation with Periodic Consumption
 
Franchise Contract
Franchise ContractFranchise Contract
Franchise Contract
 
Maximum Price Limitation
Maximum Price LimitationMaximum Price Limitation
Maximum Price Limitation
 
Rate Category Advance Billing
Rate Category Advance BillingRate Category Advance Billing
Rate Category Advance Billing
 
Rate Category Period End Billing
Rate Category Period End BillingRate Category Period End Billing
Rate Category Period End Billing
 
Variant COMPUT25 explained
Variant COMPUT25 explainedVariant COMPUT25 explained
Variant COMPUT25 explained
 
IDE Synchronizing Change Documents for Master Data Changes
IDE Synchronizing Change Documents for Master Data ChangesIDE Synchronizing Change Documents for Master Data Changes
IDE Synchronizing Change Documents for Master Data Changes
 
IDE Sending Settlement Results EXPSETTLPA
IDE Sending Settlement Results EXPSETTLPAIDE Sending Settlement Results EXPSETTLPA
IDE Sending Settlement Results EXPSETTLPA
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

EDM Creating Formulas for Formula Profile & RTP Interface

  • 1. ISU EDM: Creating formulas for use in Formula Profiles & RTP Interface This post is about creating your own formula for use in Formula profiles and RTP Interface. Formulas are predefined by SAP. But one can define formulas with specific functions in Customizing for SAP Utilities, Tools -> System Modifications -> User Defined Enhancement for Energy Data Management -> Formulas. For each formula, a function module needs to defined first with the following interface, CHANGING REFERENCE (XY_CNTR) TYPE EEDMFORMULACTR REFERENCE (XY_INP) TYPE TEEDMFORMPARLIST_I REFERENCE (XY_OUT) TYPE TEEDMFORMPARLIST_O EXCEPTIONS GENERAL_FAULT. One can also use template function modules provided for this purpose. ISU_EDM_FORMULA_EASY or ISU_EDM_FORMULA_XXXX. I intend to create a formula similar to LIMIT04 but with some difference. My formula has 4 input parameters and 6 Output Parameters. Input Parameters 1. Measured Consumption (kwh) 2. First Limit for Consumption (kwh) 3. Second Limit for Consumption (kwh) 4. Limit for Demand (KW)
  • 2. Output Parameters 1. Portion below First Limit (kwh) 2. Portion above First Limit (kwh) 3. Portion above second Limit (kwh) 4. Net Demand (Just for Evaluation)(KW) 5. Demand below Limit (KW) 6. Demand above Limit (KW) So first I created a function module by copying the template function module. Here I give snippets of the code • The 4 Input Parameters edm_read_input 1. edm_read_input 2. edm_read_input 3. edm_read_input 4. • Check if Measured Consumption exceeds First Limit and then if Measured Consumption exceeds Second Limit IF xval1 > xval2. yval1 = xval2. yval2 = xval1 - xval2. ELSE. yval1 = xval1. yval2 = 0. ENDIF. IF xval1 > xval3. yval3 = xval1 - xval3. ELSE. yval3 = 0. ENDIF. • Converting Measured Consumption into Net Demand yval6 = xval1. edm_quant_to_demand yval6.
  • 3. Calculating Below and Above Limit for Demand if yval6 > xval4. yval4 = xval4. else. yval4 = yval6. endif. if yval6 > xval4. yval5 = yval6 - xval4. else. yval5 = 0. endif. • Appending the result to the Output Parameters edm_append_output 1. edm_append_output 2. edm_append_output 3. edm_append_output 4. edm_append_output 5. edm_append_output 6. This is how the RTP Formula : Input Parameters Looks like. As you can see the function module is mentioned and the 4 input parameters are also mentioned.
  • 4. While allocating input parameters we also have to allocate the Calculation Mode The calculation mode determines how a value is processed when a formula is executed. It could, for example, enable calculation based on the status of the input profile value. SAP has already predefined a number of calculation modes: •01 – Value included in calculation •02 – Value not included in calculation •99 – Value results in cancellation of calculation When implementing formulas, you can use the constants co_calcmod_use type e_formulamod value '01', co_calcmod_not_use type e_formulamod value '02', co_calcmod_abort type e_formulamod value '99'. Below are the Output Parameters
  • 5. now I executed this formula in a formula profile. The values of the input profiles were like this.
  • 6. First Limit for Consumption was at 2000 kwh Second Limit for Consumption was at 5000 kwh Demand Limit was at 10000 KW. The calculation run was executed for the formula.
  • 7. The profile values generated were. So you see that not much coding is necessary once the logic is clear :) This is also available in my blog at http://wp.me/p1Ci5j-5h Do leave a feedback. :D