cancel
Showing results for 
Search instead for 
Did you mean: 

Query with variant from ABAP

Former Member
0 Kudos

Hello!

I need to execute a BW-query from an Abap-report.

I tried it already with function module 'RRW3_GET_QUERY_VIEW_DATA' and with classes / objects 'CL_RSR_REQUEST' resp. 'CL_RSR_DATA', but:

I want to use the query with a variant, which could be found in table RSRPARAMETRIZA.

(Btw: even with a variant in table RSRVARIANTDIR I don't get the results wanted...)

Is there a direct way to call a BW-query with a variant from Abap?

Alternatively: How do I get the variant-contents? Is there a 'universal' way to work with both kinds of variants? (RSRVARIANTDIR / RSRPARAMETRIZA)

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the link.

Well, I already read that document and I followed the links to the former blogs on this subject.

But this solution doesn't work for me: CL_RSR_QUERY_VARIABLES is unknown.

I read the pdf and the function-module-code, but I still don't have an idea how to work with query- variants . The example-coding includes a line

DATA: wf_variant TYPE variant .

but that's not used, or is it?

(I don't have a set of variables and conditions, but just a variant-name. The variant will be created by other people, who would start my report.)

Greetings

former_member205352
Active Contributor
0 Kudos

Have you checked this paper?

[ABAP to call BW Queries|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/43db5ee1-0701-0010-2d90-c3b991eb616c]