BEx Questions

Hello Everyone,
I have few questions related to BEx .
1. Can we use a function module in BEx so that ABAP code can be called while executing Bex query/report in BEx Analyzer.
2. Can someone tell me how to use multiple structures / variables in query based on conditions.
3. Could someone tell me how to invoke/refresh a macro in BEx automatically on executing a query in BEx Analyzer.
Thanks.

Hi here a short description for virtual key figure or characteristics and own variables (what Klaus means):
1. Virtual Characteristics and Virtual Key figures
- A virtual characteristic / key figure is an object of the InfoCube. The values are derived at query run time.
- Examples:
The SalesRep is derived from Product and Customer. This assignment changes frequently. Therefore the value for the characteristic SalesRep can not be stored in the Cube.
You want to calculate with key figure-type attributes of an InfoObject. E.g. Price is an attribute of Product. Sold-quantity is an object of the InfoCube. You want to see the revenue (Sold-quantity * Price) in your query.
You have an "Open-order-InfoCube". One InfoObject is the Orderdate. You need a list with the number of days btw. the orderdate and today.
How to program a corresonding Include:
1. You must firstly define the characteristics, or key figures within the InfoCube
2. Call up transaction CMOD in the Admin. Workbench
Create a Project
3. Select Enhancement Components
4. Select Enhancement RSR00002
5. Double-click on Exit EXIT_SAPMRSRU_001
6. Double-click on include ZXRSRU02 within the Exit
7. Display or change coding
8. Maintain include ZXRSRTOP
9. Maintain include ZXRSRZZZ
10. Don't forget to activate the Project
Interface Importing/Exporting:
IMPORTING:
I_S_RKB1D -> Information about Reporting-Object; here Query (Queryname, InfoCube, ...)
EXPORTING:
E_T_CHANM -> Table with the name of the virtual characteristics
E_T_KYFNM -> Table with the name of the virtual key figures
Remarks:
- You should note that the data records transferred can be on a different aggregation level depending on read procedure and drilldown.
- Moreover, compound information is not automatically changed with compounded characteristics after changing a higher-level characteristic. In addition, the compound characteristic must also be defined in the mode RRKE_C_MODE-NO_SELECTION.
- Furthermore, the fiscal year (0FISCYEAR), the fiscal year period (0FISCPER) and the fiscal year variant (0FISCVARNT) cannot be read or changed in the enhancement. (*)
- Enhancement 999 may not be changed. Calling up serves to update information via the structure C_S_DATA. This functionality is completely taken over by form USER_INIT_GLOBALS.
2. User Exit for variables:
-Enhancement: RSR00001
- The component for the enhancement is the function module EXIT_SAPLRRS0_001.
How to program a corresponding Include:
- Create variable with corresponding type for User Exit
- Call up transaction CMOD in the Admin. Workbench
- Create a Project
- Select Enhancement Components
- Select Enhancement RSR00001
- Double-click on Exit EXIT_SAPLRRS0_001
- Double-click on include ZXRSRU01 within the Exit
- Add or change coding
- Don't forget to activate the Project
- Use the variable in a query
Interface - Importing:
I_VNAM     --> Name of the Variable; without &-signs
I_VARTYP -->
1: Characteristic Value
2: Hierarchy node(s)
3: Text
4: Formula
5: Hierarchy
I_IOBJNM --> Name of the InfoObject
I_S_COB_PRO --> Information about InfoObject(Dataelement, CheckTable, Length, Number of Decimals, ...)
I_S_RKB1D --> Information about Reporting-Object; here Query (Queryname, InfoCube, ...)
I_PERIV --> Fiscal year variant
I_T_VAR_RANGE --> Table with all Variables and their values
I_STEP     
1: Before Variable Pop up
2: After Variable Pop up
E_T_RANGE --> Table to return the values
fields: low, high, sign, opt     
E_MEEHT     --> Unit of measure
E_MEFAC     --> Number of Decimals for Unit
E_WAERS     --> Currency Code
E_WHFAC     --> Number of Decimals for Currency Value
You can do many amazing things in BW. Well if you like you can use also ABAP in TableInterface for Web or JavaScript in Web. VBA in BEx Analyzer and many more interesting things. Just surf to http://hel.sap.com and find out!
Regards,
Adem

Similar Messages

  • Bex Question -- Hierarchy related

    Hi ,
    Can we create a hierarchy in navigational attribute of one of the characteristic and use that in report bex 7.0 ? if you have any documents related to this kinldy provide
    Thanks
    Maruthi

    yes possible...
    see this http://forums.sdn.sap.com/thread.jspa?threadID=1561516
    http://forums.sdn.sap.com/thread.jspa?threadID=694544
    creating hierarchy http://help.sap.com/saphelp_nw04/helpdata/en/0e/fd4e3c97f6bb3ee10000000a114084/content.htm

  • Bex Question

    We are creating an ABC analysis report. We would like to compare our ABC indicator - A for top 80, B for middle 15 and C for bottom based on net weight for a plant material. Is there a way to determine if a material is in the top 80 % and compare against our indicator to determine if the indicator is correct?
    Thanks

    Hi John,
    i f i have understood u r requirement correctly,this should solve u r issue.
    i guess u have plant material in rows and newt weight as KF in columns.
    create one more formula say 'X'(percentage of net weight) = %GT(net weight).it will give ((net weight/total weight)*100)..
    now create one more formula say 'A' to check whether 'X'>80%.
    this column displays '1' if condition is satisfied.
    one more formula 'B' = ( X>= 60 AND X<= 80) ,it displays '1' if condition is satisfied.
    one more formula 'C' = (X<60) .it displays '1' if condition is satisfied....
    ...u will be having  new columns 'percantage of net weight' , A, B, and C.
    whenever given condition is satisfied,it gives '1' otherwise 0.
    Hope this helps...
    let me know u r problem is solved or not...
    regards

  • Simple BEx Questions

    I have just updarded from 3.x to 7.x and notice a few missing features in 7.x.  Can anyone tell me if these are possible functions and if so how?
    1) How can I remove the results of a query (the data) prior to saving?
    2) How can I insert multiple queries into one workbook?
    3) How can I change the default template for a query? (I see the screen but the "use current" button is greyed)
    Thanks

    1) OK so if I insert a new analysis grid then it doesn't include all of the formatting and the SHOW/HIDE buttons that the initial tab has.  Is there any way to easily create a 2nd tab that mimics the layout of the 1st.
    2) When I say "result" I don't mean the totals I mean ALL THE DATA.  In 3.x you can easily "remove query results" which would leave a blank sheet that just says "query not yet calculated" when the user opened the report.  This ensured that no old data was used.  Maybe now the only way is to force refresh on open?
    3) I would like to format the STYLE of teh default template to include things like the company logo.  This would apply to ANY new query built by any user.  With 3.x this was done by selecting the "new work book on embed."

  • BEx Report / query designer

    Hi,
    I have created a query BEx Query designer.  how can i see that output in the report.
    how Query designer and report designer are relatedd?
    Sri
    Edited by: Sridhar Shankaran on Jul 14, 2010 9:29 AM
    Please search the forum
    Edited by: Pravender on Jul 14, 2010 12:57 PM

    Hi,
    Please always search the forums before posting a thread.
    Also, there is a specific fourm for BEX questions:
    SAP Community Network Forums » Business Intelligence » BI Suite - Business Explorer
    Rgds,
    Colum

  • BEX Report Writer

    Hi Guru's
    Can anyone send me the interview questoins and answers regarding BEX Report Writer this is urgent please,  Advance thanks
    Thanks & regards
    Sunitha

    these threads can be useful:
    Reporting  Interview questions
    Re: answer please...?
    BEx Questions
    Assign points if useful,
    Gili

  • Key Figure Summation in Result Row with Cumulation Ticked

    Hi,
    I have a Bex question regarding the summation rows. 
    I need a Year To Date amount and a Period To Date amount in the report.  However, there is no Year To Date key figure available in the cube.  So in order to calculate YTD, I'm using the PTD key figure and have Cumulated box ticked mark in Bex. 
    All looks fine across columns per Vendor.  But the results row for the Cumulative Balance is always equal to the results row for Period Balances.  I believe this is because the same key figure is used, and it is only reading the amounts in the cube - not the ones calculated on the fly. 
    Does anyone know how to correct the results row for a cumulated key figure? 
    Regards,
    Rhonnie

    You have to create two restricted KF; one is PTD restricted to period; the second is PTD restricted in a period range from 01.yyyy to current period.
    Hope it helps.
    Regards

  • Edit variable selection screen

    Hi,
    I want to edit the variable selection screen in WAD 7.0 (change width of colums).
    Can anyone give me the template-name?
    Michel

    As quoted from http://sapfans.com/forums/viewtopic.php?f=16&t=221261
    saw this thread on SDN: SAP Business Explorer (SAP BEx)
    Question:
    Hi,
    Most of our BW reports use one Web Template. When the variable screen pops up, the header shows "Variables for Ad Hoc Report" instead of the name of the report that were are executing from the role folder.
    Does anybody know how can I get the title of the report to show instead of "Variables for Ad Hoc Report"?
    Thanks for your help!
    Helena
    Answer from SAP Employee Heike Guder:
    Hi Helena,
    sorry, but this is only possible with modification in class cl_rsr_www_variable_screen method FILL_OPEN_FORM(no customizing for this)
    Heike
    If you are really into it you might want to start diggin in that class and if do - please let us know the result of it.
    Cheers,
    Skibum

  • Percent and Constant Selection

    Hello,
    I need your advice concerning a BEx Question.
    I have created a query like this :
    - 2 rows defined by restriction with constant values on the Cost Center characteristic
    - 1 Total Row done by formula = Row1 + Row 2
    - Key figure 1:  0QUANTITY
    - Key figure 2 : This quantity in %.
    What i did :
    Row 1 = Selection on 0COSTCENTER for A,B,C values
    Row 2 = Selection on 0COSTCENTER for D,E,F values
    Row 3 = Formula = Row 1 + Row 2
    Key Figure 1 : 0Quantity
    <b>Key Figure 2 : i don't find how to create this percent.</b>
    The famous SUMCT & SUMGT functions doesn't work because i use selection in the rows so there is no Total line.
    Coud you give me ideas or maybe you already have solved this problem ?
    Thanks in advance for your precious help,
    Cyril.
    EXAMPLE :
    If we have the result :
    | Quantity |
    .GROUP1..
    ...30.......
    .GROUP2..
    ...20.......
    .TOTAL.....
    ...50.......
    <b>Id' like to create another colum % :</b>
    | Quantity |....%...|
    .GROUP1..
    ...30.......
    ..60%..
    .GROUP2..
    ...20.......
    ..40%..
    .TOTAL.....
    ...50.......
    .100%..

    Solved.
    I used the "Define Cells" button in the query designer (between "properties" and "conditions" buttons).
    I verify every day the sentence :
    "The best way to solve a problem is to explain the problem"
    Cyril

  • Variable screen in Web report

    Dear all,
    I have a small BEx question. In my report, I restrict by using variable ZCREATOR which contains business partner number. Here’s the problem, in my variable screen, even though I set the display TEXT or  LONG TEXT it only shows me description of the short text. E.g if fullname is JOHN DOW, it only shows DOW
    But once the report is generated out, LONG TEXT will of cause show JOHN DOW whereas if SHORT TEXT will just show DOW.
    Answer I need would be, how can I set in my variable screen to show JOHN DOW instead of DOW?

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi<br>
    Go to the InfoObject definition and check details in the tab Business Explorer. General Settings --> Display and BEx Description, are they both selected as Long Texts?
    <br><br>
    Hope it helps.<br><br>
    Cheers Abhijit<br>
    </FONT><FONT FACE = "Verdana", Font Color = "Red">
    Removed
    </FONT>

  • BW Bex query and Webi question

    Hi All.
    Just a quick question on Bex queries. We are selecting a Bex query as a source for universe. However on the webi side we only want to see a subset of the data.
    1) The question is Would this rerun the entire BEX query on the BW side ? Or is there a better way to design the universe ?
    2) Also are there any best practices on how to desing Webi reports from BW BEX queries and also Infocubes etc ?
    Thanks in advance.

    Hi puneet,
    The WebI builds a query on the BEx results. The query is related only to those items used in the WebI report. However, the BEx query must have the results in it, as the WebI does not execute it. I am not aware of a best practices document.
    Regards
    Alan

  • Question regarding Calculated Key Figures in BEx and their impact on SQL

    Hello,
    I am new to BO SAP integration. I have a question regarding using CKF in BEx.
    I created universe off of a BEx query with no CKF. I then created a Webi report with come dimensions and measures. I captured the SQL generated using trace (ST05).
    In the same BEx, I then create a CKF. Then refreshed the universe and created a new Webi report using the same dimensions and the CKF. The SQL generated had many more select statements.
    My question is what is the effect of CKF on the generated SQL and is there a performance issues using CKF in BEx as opposed to creating variables in Webi report?
    Thanks,
    Nikhil

    Hi,
    if your CKF will have always same unit and you have one KF in you inforpovider with this unit, you can try to do this trick
    create a new hidden CKF as new CKF = KF / KF (with this equale new CKF = 1 unit)
    change your old CKF as old CKF = old CKF * new CKF
    let me know if it works.

  • ODS Bex Reporting Off and SID Question??

    Hi...
    We were looking at the Specific question below:----
    We have switched off the BEx reporting functionality on an ODS and are using an Infoset to query against the ODS, so there is only 1 table in this Infoset.
    Question:----
    Does the Query written on this Infoset need to go through a SID table fo eg: It spends a lot of time in Serial Nbr SID table (/BIC/SZSERNR) which is an Infobject used in the ODS.
    I tried a few things as explained below:----
    I actually created a few New Infobjects based on the Infobjects from the Original ODS. We created a new ODS similar to the original ODS by replacing some of the Old Infobjects with the New Infobjects. I switched Off the Bex Reporting option for this ODS. It did not inserts any SID’s while loading the Data into this New ODS...However while executing the Query on an Infoset built on this New ODS, it updated the SID table for the New Infobjects.
    I was wondering when the option of Switching Off BEx Reporting is to facilitate faster Loading of Data, why does the query need to insert the SID’s during the Query execution as that increases the Response time on the Query. These New Infobjects are not used in any Infocubes so is there a necessity to maintain the SID’s as we are trying to Query on an Infoset.
    Please provide your valuable opinions..
    Thanks and Regards
    Andy

    Andy,
    I'm not sure, but this could be a track.
    The ODS or Infoset are checked to update the BW Statistics? Maybe a update is taken if BW Statistics are tracking the query execution on these dataproviders.
    Henrique

  • BEx Variable in Webi Report questions

    Hi Gurus,
    Here is my issue.
    I created a BEx Query 0SD_C03 Cube with following fields
    Two Columns
    One Key Figure:                   Subtotal1
    One Restricted Key Figure:  Subtotal with restriction " Sales Organization 1000"
    Two Rows                             Plant, Sales Organization
    One Variable with Sales Organization.
    When I ran this query in BEx Analyzer I can see all Sales Organization values in prompt list, How ever when I created a Universe and ran a webi query I can see 1000 in the Sales Organization list.
    Is this because I have restricted Key Figure with Sales Organization 1000 in the query?
    I removed my Restricted Key Figure from my query and tried again this time I see some 10 Sales Oraganizations but I didn't see all available Sales Organizations. Does BO Universe LOVs restricte the list?
    Thanks
    Sasi

    Identical entry so this is being closed:
    duplicate:
    BEx Variable in Webi Report questions
    Ingo

  • BEx Broadcaster Question

    Hello All.
    Just a quick question since i'm getting inpatient.
    I'm trying to set up schedules thru bex broadcaster thru the BI Portal.
    Is there any other way to do this?  Meaning is there a tran code i can go to in the system and do the same.
    This just seems to be very slow way of doing it, and just thought i'd throw the question out there.
    Thanks in advance.
    Amit

    Hi Amit,
    Use the below tcode
    RSRD_ADMIN -      Broadcasting (7.x) Administration  
    go through the below link
    http://wiki.sdn.sap.com/wiki/display/BI/UsefulTransactionsandNotesgoeswithNetWeaver+7.0
    Hope this helps.
    Regards
    KP

Maybe you are looking for