ABAP class or function for retrieving BEx query properties at runtime

Hello Experts,
I'm working on BADI RSR_OLAP_BADI and for a special calculation I need to know which characteristics are in the drill-down of the BEX query, sol later on I can aggregate some key figures using only these characteristics.
Problem is that structure C_s_DATA in method COMPUTE contains all fields of the query (filters, free chars, chars in the rows, etc) and I need to now which characteristics are currently being showing in the Bex analyzer.
So is there an ABAP class or function module I can use to find out this kind of information at run time?
Any suggestion?
Thank you

Tank you for the feedback,
I tried to use the class you provided, but I'm stuck now in how to get from within my class that implements RSR_OLAP_BADI interface, a handle, reference, o whatever represent my runtime query (not the query at design time) . As the class you provide must be instantiated before I can use
In pseudo code could be something like this
DATA my_query type query_ref.
my_query = get_rt_query().
my_query->get_state()
regards

Similar Messages

  • Need transaction code for opening Bex query designer?

    Hi ALL,
      Can anyone help me with the transaction code for opening Bex query designer?
      Like RRMX for Bex Analyzer similarly i want for Bex query designer.
    Thanks & Regards
    Sameer Khan

    THERE IS NO TCODE FOR QUERY DESIGNER. BUT THERE IS AN ALTERNATIVE..
    OPEN BEX ANALYSER THROUGH RRMX
    OPEN A QUERY
    CLICK ON TOOLS-> EDIT QUERY
    THIS OPENS QUERY DESIGNER AND YOU CAN USE IT NORMALLY..

  • New OLAP connection for each BEx query?

    Hi,
    I am wondering whether it's really necessary to create for each BEx query a new OLAP connection in BO 4.0.
    This is the BICS connection as far as I know. But this would result in a lot of OLAP connections...
    Thanks!

    One OLAP connection is enough for one BW system.
    You can also dedicate a OLAP connection to one query if needed.

  • Linking a function module in Bex query

    Hi,How do I use a function module in a Bex query?
    Req is: use to get the diff b/w 2 date fields only if both the value are present otherwise leave the result column blank.
    Ex:
    Date1, date2, No. of working days
    X        Y         x-y
    Blank    Y         Blank(no value to be set)
    X        Blank     Blank(no value to be set)
    I tried to do this in Query, but then it results in zero in the 2nd and 3rd case which is not as per my req.
    Wanna try with function module DAYS_BETWEEN_TWO_DATES in the query. Steps to link this function module in a bex query wud be very helpful.
    Thanks in advance.

    Hi S R,
    Please take a look at these threads..
    Funtion Module for user exits  variables in BEx Queries.
    Funtion Module for user exits for variables used in BEx Queries.
    SAP BW BEx Analzyer Query in ABAP
    BEX Multi-Language SQL Query
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Query browser error for a Bex query

    Hello,
    I am using Query browser in Dashboards 4.0 to retrieve the data from Bex query. When I select a few dimension measures out of the structure with certain key figures and clicking the preview of the results, I am getting the error message as "Request Processing failed(XLS 000009)[] Error DBMAN(257):SQL Error:58115
    Error RS Exception:Arithmetic overflow error converting" kind of error message.
    When I remove some dimension members which were selected, I am able to see the preview of the data. What could be the probable reason for the above kinda error?
    Thank you.

    These are generic error, please go through the below link and let us know whether its helpful or not.
    Microsoft ODBC data manager not found
    Error during "Add Query" in Dashboard 4.0
    Happy to help you!
    -SumanT

  • Automatic generation of ABAP-classes from Function Groups?

    Hey there,
    is there a way of having (SE24)-ABAP-Classes generatetd outomaticaly by providing an existing function group?
    I think, the following mapping shold be possible::
    - the function group is the class
    - its function modules are public (static) methods
    - any form-routines are private methods
    -> I don't want to to that boring work myself, some tool should be able to do that just fine, right? So, is there such a tool?
    Thanks, regards
    Joachim

    Sorry, sounds like the only two people who answered are not aware of such a tool...
    There is one additional point, which I hadn't thought about initially. With ABAP OO you also have a much stricter syntax and many more statement variants that are obsolete and thus cannot be used. This is another hindrance for writing such a tool (but of course not impossible, I just kind of doubt that any reasonable programmer would write such a thing).
    Anyhow, I never understood why SAP is pushing OO so much (declaring all non-OO as obsolete), even going as far as implementing stricter syntax checks for OO. In my opinion a much better option would've been to implement some flag that switches on the more strict syntax checks, similarly to the Unicode check they've introduced. Coding in OO or non-OO, both have its use. Rules from SAP to code everything in OO even in cases where OO doesn't work seems straight silly as a general recommendation: E.g. if I have to code an RFC module, why would I want to bloat my code by introducing a class for implementing the functionality so that the RFC is just a wrapper around the class (unless the additional class gives me some real benefit)?
    As much as I appreciate using OO classes supplied by SAP, I often have difficulties seeing objects in the requirements that I have to code (which might of course just be a reflection of my programming skills). A class with just some static methods is often an indication of poor OO design, i.e. there is no reasonable/tangible object and all you have is a utility class with a collection of various methods. To me it's important that the code is well structured, doesn't have any side effects, etc. This can be achieved with non-OO coding as well as OO, but switching from non-OO to OO doesn't guarantee at all that the code is any better.
    In the end, if you just have a single function group, I'd recommend to do the translation manually and try to apply good OO design principles (instead of a straightforward 1-to-1 translation). E.g. for a class with just static methods (which I'd expect an automated translation would result in) one might want to take a peek at [singletons are evil|http://www.c2.com/cgi/wiki?SingletonsAreEvil] versus [singletons are good|http://www.c2.com/cgi/wiki?SingletonsAreGood]. I know it's silly advice if you're a seasoned OO programmer; but if not, I think your time is much better spent by thinking about the design and then applying it instead of using some automated tools where you'd later have to anyhow do some refactoring...

  • ABAP Classes and BADIs for HR

    Hi all,
    Can anyone give me a list of classes SAP has released for HR use by customers and all utility ABAP classes. Also any utility abap classes that would be useful for future. I am only interested in those relevant for ECC 5 and up.
    Could you supply the BADIs or Enhancement Spots for HR too.
    Thanks
    Wayne

    The BADI's I have found most useful are the BADI exits that duplicate the existing PA30 PAI / PBO User exits.  If you trace back to where the exits are called you will find the BADI call within a few lines of code - but the difference is that the BADI is called outside one layer of IF logic, so it gets called in some circumstances where the user exits do not - I think this was to do with certain change or copy data situations.
    Can't remember the name of the BADI, and do not have a system available to check at present, but it was not hard to find when I looked in the system.
    Others I have used are as exits in the HR to FI posting interface, and also some in the travel to vendor interface.  There is also an exit for customising the PERNR search help - cannot remember if this was a class or a FM.
    For moving data inside the user exits in a unicode compliant way there are classes for moving data from the flat PRELP character structure to individual infotype structures - CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN and CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP.
    For general unicode compliant constants such as a Tab character there is class CL_ABAP_CHAR_UTILITIES with attributes like CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    Also if you go to SE38, select the Blue "Online Help" button, and then go to the ABAP Overview, you will find under the ABAP by Theme branch an entry "ABAP System Classes and Interfaces" which documents 20+ general ABAP classes
    Hope this helps
    Andrew

  • Creating ABAP class in XI for ABAP mapping

    Hi All,
    While creating ABAP class in SE80 XI I am getting following message.
    “You are not registered as a
    developer.
    Please register in the Online
    Service System (OSS).
    In the OSS you will receive
    an access key.”
    Plz guide which role I required to do ABAP mapping/class creation.
    Regards

    Hi Rohan,
    for developing abap you need a developer key. You can get it with the corresponding authorisation at <a href="https://websmp209.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000103676&_SCENARIO=01100035870000000202&">SAP OSS</a>.
    Regards,
    Udo

  • Replace Abap-class by Java for Error

    hi,
    i tried what was said in Michal tutorial :
    /people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
    but i faced some problems, first of all i dont have Abap-class in the settings of my Interface mapping i just only have java , XSL and also MM it s weird but anyway could i replace the Abap-class that read the dynamic configuration with a java-class mapiing that could write in the error tag of the soap header.
    i followed the steps described in the tutorial i mean the code in the UDF but i cant use the Abap-class mapping in my interafce mapping is there any other way to write in the Error tag of soap header in the SXMB_moni
    thanx

    Hey
    You need to add a parameter to exchange profile before you can see ABAP-class in Interface mapping,please follow the below steps:
    Go to http://<host:port>/exchangeProfile in internet explorer
    Expand IntegrationBuilder ->IntegrationBuilder.Repository->click on com.sap.aii.repository.mapping.additionaltypes link ,then on right hand side just type
    R3_ABAP|Abap-class in i/o field. and save.
    You may need to restart Java engine for this take effect.
    Thanks
    Aamir
    Edited by: Aamir Suhail on Aug 5, 2009 1:02 PM
    Edited by: Aamir Suhail on Aug 5, 2009 1:02 PM

  • MDX for a BEx query with a characteristic structure

    Hi,
    I have a BEx query with a characteristic structure in the rows.
    Material     Structure     Measure1
    a-Material     a-Structure     ....
    a-Material     b-Structure     ....
    b-Material     a-Structure     ....
    b-Material     b-Structure     ....
    I am looking to run the query via MDX. Is that possible? If yes, how should be the mdx statement.
    Thank you in advance for your help.
    Regards,
    McGreen

    Hi,
    it will work, so long as you also include the Structure object in the WebI Query panel as a results objects.
    the SELECT syntax is much the same as a 'normal' MDX statement.
    the quickest way to tell them appart is how the Measures are called. normally, it starts:   SELECT [MEASURE.ABC123] NONEMPTY(CROSSJOIN( ...   ) )
    however, when you have a Structure, all the declarations from the start of the statement looks like : SELECT [ABC123.ABC123] NONEMPTY(CROSSJOIN( ...   ) )
    i hope this helps.
    Regards,
    H

  • Combining two Characteristics in one column for a Bex query

    Hi experts,
    I'm reproducing a Bex query ver. 3.x, with a new query version 7.0.
    Within 3.x query there are two char as rows, where the first has a hierarchy.
    The char are Product(Books) and Volume(book's series), where Volume rapresents a detail of Product.
    When I execute this query, both char are combined and are showed in a single column, not in two distinct columns.
    *NODE 1*
    *--NODE PRODUCT 1A*
       *--NODE PRODUCT 1AA*
          *-- VOLUME 1AA*
          *-- VOLUME 1BB*
          *-- VOLUME 1CC*................
    Instead my new query 7.0 shows me the two char into two distinct columns, not in one like example above.
    Besides, both two version of the master data are exacly alike.
    I'd like to reproduce the first query scenario.
    How can I do?
    Thanks in advance.
    Claudia

    Hi Simon,
    yes, the original 3.5 query have the hierarchy switched on.
    Have you any idea?
    Thanks.

  • Retrieving BEx Query Results Area for use in Excel formulas

    Hello,
    I run BEx queries in workbooks and then use Excel formulas ( mostly VLOOKUP(LookupValue, ResultsArea, ColumnReturned,) ) to retrieve certain information from the query ResultsArea.
    ****Problem:
    Depending on the query parameters, the query "Results Area" is larger or smaller.
    ****Non-optimal solution:
    One way to define the  ever changing Excel range occupied by the Results Area is to create an Excel name as:
    QueryRange = OFFSET(QueryFirstCell,,,COUNTA(OFFSET(Sheet1!$A:$A,,COLUMN(QueryFirstCell)-1,,)),COUNTA(OFFSET(Sheet1!$1:$1,ROW(QueryFirstCell)-1,,,)))
    Then, the only input required is the top-left cell of the Results Area, which stays the same (unless the query definition changes).
    ****Question
    What is the best way to refer to an ever-changing query Results Area in an Excel formula?
    Thank you!
    Louis

    It is actually much easier than that.
    Use a VBA statement like the following:
    Set RptRng = ActiveCell.CurrentRegion
    This will retrieve the data in the Results Area, no matter what the size is.
    Hope this helps...
    Bob

  • Transport Request for a Bex query ?

    HI  all ,
    i have a requirement that , i have a query which is in producton first, &  not available in development  .  we need to do some changes on it .
    for this we have copied from producton to  DEV .
    when i am  trying to changes it is saying  that , "Bex transport request is not availbele or not suitable :
    or choose an existing request .
    Plz suggest me how to rectify this .
    regards ,
    Srinivas .

    Dear Srinivas,
    I wanted to repeat the normal rules for how we must use the BEx transport in BW.
    This is a special transport that is always used in development. All query changes get written there - you don't choose your transport in the normal fashion. But this gives a problem - we have no control over what is in that transport. Therefore we never release it.
    Instead the process is to create a new transport and include your new query in it. You often find that part of the query is in the BEx transport, and you must delete it from that transport.
    It doesn't matter whether you delete just your query, or just delete all the contents of the BEx transport - but do not delete the transport itself, and do not release it either.
    Deleting everything in the transport is very fast and simple - if you do it this way. In se01, click on the 'tools' icon (fourth icon). then choose Unlock Objects (Expert Tool). Run it twice, first the task, then the request. Then return to se01 and all the objects in the transport are unlocked and can be deleted in one go.
    Thanks-RK

  • BI BEX Query execution from ABAP into a File w/ Text

    We are currently running BI 2004s and have a requirement from a user to load a file (preferably excel but a csv or txt file would also work) on a server with the results of a BEX Query and they need the format to look exactly like the Bex results including the columns for the char. text that are specified in the Bex query properties.  If we could run this ABAP program in background and foreground - that would be a big plus.
    I have searched and reviewed many of the FM, programs and transactions in this forum to do something like this but the text is always missing.
    Any suggestions (the simpler the better) would be appreciated.
    Thanks,
    SJ

    Sudheer,
    Yes, I did try RSCRM_BAPI.  It looks very promising but the text is not there.  Example - Business area 9160 shows up but the text for it "SAFLEX" does not and this text does show up in BEx.

  • Conditional Formating in Bex Query

    Hi Folks,
    Here requirement is like..if the value is +ve it should show <b>upward arrow</b> and  -ve it should show <b>Downward arrow</b> in Bex query result besides a particular value.
    could any one let me know what formula is required in Analyzer/Designer or is there any option to display..

    To show up arrow and down arrow for +ive and -ive result for the bex query result. You can modify your web query with the table interface. Table modify class.
    Please check out this  two document:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/403c789a-aafb-2910-e5a4-835645f0721b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49dfeb90-0201-0010-a1a2-9d7a7ca1a238
    Thanks
    Mona

Maybe you are looking for

  • ITunes freezes every time I open after upgrading to 9.1.1

    So every time I open iTunes now (after I upgraded to 9.1.1) it starts updating my iTunes library. Problem is that it gets to a certain point in the updating (maybe 5%) and then it freezes the whole computer. I've never had any problems with iTunes be

  • Error while starting the managed server

    Hi, While starting the managed server i get ClassNotFoundException for the following files. oracle.as.jmx.framework.wls.spi.StartupListener - jmxframework.jar oracle.security.jps.wls.JpsWlsStartupClass - jps-wls.jar oracle.security.audit.ajl.loader.J

  • How do i create a signature in email?

    I'm trying to put a signature line at the bottom of each email that I create and can't seem to make it stick.  What am I doing wrong?

  • Screen turns bright white while display freezes? Any one know why?

    The screen freezes and gets brighter and brighter until it becomes all white. If I move the screen of the laptop the display returns to normal for a brief second then starts turning white all over again. Anyone know what the problem could be? I have

  • Oracle for Windows 2008 R2

    Hi, I have try to install oracle 10g database on Windows 2008 R2 Standard Edition. But none of the 64 bit installation are not working. Checking operating system version: must be  5.1 or 5.2 .    Actual 6.1 Failed <<<< I check for specific Installati