This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
SAP BW, BusinessObjects Designer, BusinessObjects Web Intelligence. For more information, visit the Business Objects homepage.
Summary
This article discusses ways in which dynamic dates can be used in a BEx-based BO universe and associated Web Intelligence (WEBI) documents.
Author: Eric Siboda
Company: Daugherty Business Solutions
Created on: 5 June, 2011
Author Bio
Eric Siboda has 10 years of experience with SAP and has worked in HR, Logistics, SCM, SRM, CRM, and BW. Seven of these years have seen an emphasis on SAP BW. Eric is a techincal BW consultant with Daugherty Business Solutions and is currently consulting as a tech lead with Monsanto.
BEx Variables within a BO Universe Overview .................................................................................................. 3
Standard variables .......................................................................................................................................... 3
User Exit Variables .......................................................................................................................................... 3
Data read for prompt list of values .................................................................................................................. 3
Single Dynamic Date Scenario ........................................................................................................................... 3
Dynamic Date Grouping Scenario ...................................................................................................................... 7
Step 1: Base InfoProvider ............................................................................................................................... 7
Step 2: New InfoObject ................................................................................................................................... 8
Further Possibilities .......................................................................................................................................... 16
Related Content ................................................................................................................................................ 17
Disclaimer and Liability Notice .......................................................................................................................... 18
Dynamic Dates within a BEx Universe
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
The second scenario explores how to create dynamic date groupings in a BEx-based universe. In this
article, dynamic date groupings refers to year-to-date, month-to-date, and anything of the sort. While
creating YTD, MTD, etc… key figures in a BEx query is a trivial concept, the challenge lies in having one key
figure and allowing the user to select at run time if they want YTD, MTD, and so forth. The solution
presented here provides details to the WEBI level, but can be just as useful for stand alone BEx queries/Web
Templates.
The main problem encountered with this scenario is that a BEx variable, unless it is a text variable, is used to
build the data selection based on objects that exist in the DataProvider. So the solution is to develop a
method which gives the user a way to select data groupings in the prompt screen, from a variable built off an
InfoObject which doesn’t actually exist or hold data in the InfoProvider. A very general set of data is used
here to demonstrate the functionality. This is broken into areas of the development/solution from backend to
WEBI.
Step 1: Base InfoProvider
Here a very generic DSO object is used. It contains sales order information and a few key figures. For this
article, the data itself isn’t of much importance. The following are created: YEMSIBTP, Sales Data Temp
DSO for BO Testing.
A quick utility program is written to fill this DSO from the standard sales DSO (move corresponding type of idea). So as it sits right now, price is the date object in our DSO. All other objects are typical sales related InfoObjects and do hold data.
Dynamic Dates within a BEx Universe
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
Introduce a new InfoObject whose purpose is to hold the reporting periods for the users to be able to select. This is called YREPPERBO, BO Reporting Period Object.
As is shown, this InfoObject has associated master data and text associated with it. It is in NUMC, length 2
because the object itself will just have numerical values and the text is what the users will select on. This
also makes the backend coding much simpler with having language dependencies on the object.
Next, create some master data for this object.
Dynamic Dates within a BEx Universe
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.