on 2012 May 24 9:48 AM
Hello BW Community, what is the best way for call Bex Query result from ABAP program?
thanks
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amine,
look at:
Function module RRW3_GET_QUERY_VIEW_DATA - SAP NetWeaver Business Warehouse - SCN Wiki
Kind Regards,
Jan
Hello Jan,
sorry for so many different posts;-)
Look at this: http://wiki.sdn.sap.com/wiki/display/BI/Expose+BI+Query+as+RESTful+Service
This describes very well, how to use the FM RRW3_GET_QUERY_VIEW_DATA. Although it is not so easy to read, it works as designed. If you replace the part of creating the XML-Response with a XSL-Transformation for filling internal tables, you get your desired result.
Kind regards,
Hendrik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hendrik,
big thanks for help,I want to use FM RRW3_GET_QUERY_VIEW_DATA or FM RS_VC_GET_QUERY_VIEW_DATA_FLAT to call all query result from ABAP.
But I don't know how to transform export from these FM's to result, which is similar to simple query result in RSRT.
Do you know any FMs how to transform it? or can you send me abap code?
thanks
Hi,
In transaction SQ01. Follow this path: Query->More Functions->Display Report Name.
Check this report in transaction SE38 and analyze this and find the Select statement in the report.
Use the same Select statement for getting the data in an Internal table.
Regards,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.