cancel
Showing results for 
Search instead for 
Did you mean: 

Call Bex Query result from ABAP

jan_balek
Explorer
0 Kudos
3,333

Hello BW Community, what is the best way for call Bex Query result from ABAP program?

thanks

View Entire Topic
hendrik_brandes
Contributor
0 Kudos

Hello Jan,

you can use the Function Module  RS_VC_GET_QUERY_VIEW_DATA_FLAT to execute a query.

In this FM you can also pass Parameters to your query.

The result-Structure will give you a list off cells and a definition about your axis.

Kind regards,

Hendrik

hendrik_brandes
Contributor
0 Kudos

Hello Jan,

I assumed, that you are running you BW with Release < 7.30. With 7.30 you will have a very easy access point by using the so called "Easy Queries": http://scn.sap.com/community/data-warehousing/netweaver-bw/blog/2012/02/17/my-first-steps-with-easy-...

WIth those, you will have a clear function module with a typed structure for your concrete query and you do not have to deal with cells, rows, axis and so on.

Kind regards,

Hendrik

jan_balek
Explorer
0 Kudos

Hello Hendrik,

thanks for helpfull answer,I have BW 7.01, do you know which FM is better for calling Bex Query result , RRW3_GET_QUERY_VIEW_DATA or your RS_VC_GET_QUERY_VIEW_DATA_FLAT?

thanks

sapna_jgurudutt
Advisor
Advisor
0 Kudos

Hi,

Can you please refer the following link regarding RRW3_GET_QUERY_VIEW_DATA  and check whether it is relevant:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/b7a332352056a4e10000000a1553f6/frameset.htm

Thanks & Regards,

Sapna

jan_balek
Explorer
0 Kudos

Hi Sapna,

but I need all data of query, not only key figures. With RRW3_GET_QUERY_VIEW_DATA I see only KFs.

Do you know, how Can I get all query data?

thanks

hendrik_brandes
Contributor
0 Kudos

Hello Jan,

the parameter e_axis_data has the informations about the rows and columns. Look in the debugger and you will see that AXIS = 0 is the column-axis and AXIS = 1 is the row-axis. Within this structure you will have a field called "SET" as internal table with the concrete data.

The structure within these data tables is organized by so called tupels. Each tupel represents one row and you have to fill it up with the cell-data.

Hope this helps.

Kind regards,

Hendrik