Page tree
Skip to end of metadata
Go to start of metadata

How To.. Develop and Use Dynamic Variables in POWL

Applicable Releases: SAP NetWeaver 7.01 SAP NetWeaver 7.11

  1. Purpose - This guide describes the technical background, the development of own dynamic variable formulas for date selection criteria and how to use the developed formulas.
  2. Business Scenario - The POWL is a very flexible tool that is used by a range of applications (ERP Operations, Financials, HCM, SRM etc.) that provides personalized work lists to user.Consider a scenario where POWL used in SAP Role Internal Sales Representative to provide him access to his current workload for Sales Documents, Customers etc.Within sales the date definition of work lists is very important. The Internal Sales Representative needs to define e.g. a work list of expiring quotations to call the customer in time, to ensure that a sales order is created out of the quote within the validity time.Today it's only possible to define the work list with a fixed date. E.g. list of expiring quotations with the selection criteria "valid to" = "20.07.2007". It's not possible to define a date variable e.g. "valid to" = "today + 10 days". For that it's necessary to have the possibility to assign a dynamic date variable. This is a development in the POWL framework which can be used by all applications.Examples from other applications:- Production Supervisor: Operations for Work Centers with start or end date 5 days in the past or in the future- Buyer: Purchase Requisitions to be assigned with delivery date within the next 5 days.
  3.  Background Information - For dynamic variables an interface IF_POWL_DYN_VAR is provided allowing the developer to develop custom formulas apart from the standard formulas provided by POWL framework.Developer can have any number of formulas for his business demands and these formulas are sent to POWL by implementing the badi BADI_GET_DYN_VAR_CLS.
  4. Scope - The dynamic variable formulas are provided only for the date selection criteria; in future it will be expanded to other selection criteria variables
  5. Step-by-Step Procedure## Develop Dynamic Variable formulas To develop the custom formulas, implement the interface in a class and follow the steps for each of the interface. Note Example codes are taken from the class CL_POWL_DYN_TODAY_PLUS_N
    1.  Configuration settings I###  Supply the developed formula class name to POWL through the badi BADI_GET_DYN_VAR_CLS.
    2.  Configuration settings II - Since the implementation of this feature is optional, it is provided via configuration possibility. This can be achieved by following the steps given below:-###  Start transaction SE80 and enter the transaction POWL_UI_COMP
      1.  Right click on node 'POWL_UI_COMP' or 'Component Configurations' and click "create/change configuration"
      2. Web Dynpro Configuration Editor will start up
      3. Enter 'POWL_UI_COMP' into the field component name and Component Configuration = name of your choice
      4.  Click the 'Create' button
      5. Click on tab 'explicit configuration'/'component defined'
      6. Select the node 'CONF_DATA'
      7. Check the checkbox for 'dynamicData' to true. Component Configuration settings for 'Dynamic Variables Only'9. Now click on the save button to save the configuration
      8. Now you need to create the application configuration
      9. Go back to SE80 and select the node Web Dynpro Applications
      10. Right click and click "create/change configuration"
      11. In Application Configuration editor enter the following Application = POWL, POWL Configuration = name of your choice
      12. Click on 'Create' button
      13. Under the Configuration column in the table enter the name of the component configuration created in step IV above and click on SAVE.
    3.  Navigation to Calculated Dates - It is possible to navigate to calculated dates either by clicking change the query or bydefining new query. Both are similar.### Launch POWL application
      1. Click on 'Change Query' link
      2. Click on 'Calculated Dates' link
      3. A Pop-up will appear
      4. Select the formula in drop down
      5. If formula has any parameters, then those will appear in the same line
      6. Enter the values for parameters
      7. Click Ok
      8. For any selection criteria if formula is selected, then that selection criteria is made read only and a description will appear for selected formula.
    4. Dynamic Variable Refresh Formula -  calculated values will get changed every day or within a day too. So it will defer with cached parameter values. Hence "Refresh' is triggered to keep the cached values and results in sync with calculated value These are following scenarios:-### On launch of POWL, all the query dynamic variable values are recalculated. If value differs, then we trigger refresh to that particular queries alone
      1. On switching the query, dynamic variable values are recalculated. If value differs, then we trigger refresh to that particular queries alone.