Skip to Content
author's profile photo Former Member
Former Member

Data from BI query

Hi ,

I'm stuck on an Abap program

I have to execute a Bex Query then store the retreived data, the old logic uses classe cl_RSR_Query_variables, this doesn't exist any more.

I want to keep my logic and substitute only the type of my query variable

here it is the part of logic to modify

DATA: wf_query_var TYPE REF TO cl_rsr_query_variables .

DATA: r_request TYPE REF TO cl_rsr_request.

DATA: r_dataset TYPE REF TO cl_rsr_data_set.

MOVE: query_name TO cube_name .

  • Convert the query name to technical id

CLEAR p_genuniid .



input = query_name


output = p_genuniid.

IF p_genuniid IS INITIAL .

RAISE query_not_found .


  • Create instance of cl_rsr_request


EXPORTING i_genuniid = p_genuniid .

  • Create instance of cl_rsr_variables

i_var[] = query_variables[] .

CREATE OBJECT wf_query_var


i_r_request = r_request

i_t_nvar = i_var


user_not_authorized = 1

no_processing = 2

bad_value_combination = 3

x_message = 4


IF sy-subrc <> 0.

CASE sy-subrc .

WHEN 1 .

RAISE user_not_authorized .

WHEN 3 .

RAISE bad_value_combination .


RAISE unknown_error .



  • Set the variable and execute the query


r_request->variables_set( i_t_var = i_var ).

r_request->variables_start( ).

r_request->read_data( ).

r_dataset = cl_rsr_data_set=>get( i_r_request = r_request ).


Thanks for any suggestion

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 06, 2007 at 11:39 AM

    You Might (I say Might) possibly have better luck if you can use the BI accelerator. On 640 of course the old BW methods and classes are still in the system.

    I haven't actually used the BI accelerator but I'm told by people who have that it's an excellent tool for almost limitless queries. I'm sure some "Googling" or browsing the BI Forum might also help you.

    Often when a new release is installed people try and "replicate" old stuff. In general (although I know it's not always true in SAP's case) if stuff has been removed in a new release it's either because the old method is "deprecated" or there's a hugely better method available.

    I'm sorry I can't be more helpful than that but if you MUST have this query class you can always I suppose try and get it "Retrofitted" to your system. I'd advise against that approach however.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2007 at 03:47 PM

    I'll redo the all FM

    the only solution I've seen so far

    Thanks for your help

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.