09-05-2007 10:52 AM
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 .
CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
EXPORTING
input = query_name
IMPORTING
output = p_genuniid.
IF p_genuniid IS INITIAL .
RAISE query_not_found .
ENDIF.
Create instance of cl_rsr_request
CREATE OBJECT r_request
EXPORTING i_genuniid = p_genuniid .
Create instance of cl_rsr_variables
i_var[] = query_variables[] .
CREATE OBJECT wf_query_var
EXPORTING
i_r_request = r_request
i_t_nvar = i_var
EXCEPTIONS
user_not_authorized = 1
no_processing = 2
bad_value_combination = 3
x_message = 4
OTHERS = 5.
IF sy-subrc <> 0.
CASE sy-subrc .
WHEN 1 .
RAISE user_not_authorized .
WHEN 3 .
RAISE bad_value_combination .
WHEN OTHERS .
RAISE unknown_error .
ENDCASE .
ENDIF.
Set the variable and execute the query
TRY.
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
09-06-2007 12:39 PM
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.
Cheers
Jimbo
09-07-2007 4:47 PM
I'll redo the all FM
the only solution I've seen so far
Thanks for your help