BEx query with variant from ABAP
Hello,
I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
regards,
Krzysztof
Hi,
the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
Here is my example, which is not working.
DATA:
lv_query(30) TYPE c,
lv_genuniid TYPE rsrrepdir-genuniid,
ls_var TYPE rrx_var,
lt_var TYPE TABLE OF rrx_var.
lv_query = 'YB_MAKLER_DETAIL'.
CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
EXPORTING
input = lv_query
IMPORTING
output = lv_genuniid.
IF lv_genuniid = ''.
WRITE: / 'There is no Query', lv_query.
ELSE.
ls_var-vnam = 'YS_MKLE'.
ls_var-sign = 'I'.
ls_var-opt = 'EQ'.
ls_var-low = '0000005100'.
APPEND ls_var TO lt_var.
ls_var-vnam = 'YS_VTGJ'.
ls_var-sign = 'I'.
ls_var-opt = 'EQ'.
ls_var-low = '1999'.
APPEND ls_var TO lt_var.
CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
EXPORTING
i_genuniid = lv_genuniid
I_OBJVERS = 'A'
i_hide_sapgui = 'X'
TABLES
I_T_VAR = lt_var.
ENDIF.
If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
Do you have any idea how to pass parameters to the query with this function module?
Regards,
Krzysztof
Similar Messages
-
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.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 -
Refresh BEx-Query with variant
Dear all,
i have a question about refreshing Queries with variants.
To refresh a BEx-Query (BW3.5) in a Workbook with VBA is no problem.
For example:
Run "SAPBEX.XLA!SAPBEXrefresh", False, myRange
But is there a possibilty to refresh a BEx-Query with a variant (also with VBA)?
My target is to create a VBA-Tool:
1 which user can select a single Query and the available variant.
2 Then push a VBA-Button
3 After the selection no Variable-Screen will pop-up
and the refreshing is completed.
Thanks allHi Ashok,
refreshing Queries automatically on Workbook open is standard...
What i need is to refresh a Query with variant (saved variable-values for a query e.g. the name of the variant is "ZMYVARIABLES").
The user should not select an existing variant (ZMYVARIABLES)
manually with Shift+F5 (Get Variant) on the Query-Variable POPUP-Screen.
What i need is a codefragment which implement that all.
Pseudo code:
Sub RefreshQuery(QueryID As String, Variantname As String)
End Sub
Thanks,
Erol -
MDX for a BEx query with a characteristic structure
Hi,
I have a BEx query with a characteristic structure in the rows.
Material Structure Measure1
a-Material a-Structure ....
a-Material b-Structure ....
b-Material a-Structure ....
b-Material b-Structure ....
I am looking to run the query via MDX. Is that possible? If yes, how should be the mdx statement.
Thank you in advance for your help.
Regards,
McGreenHi,
it will work, so long as you also include the Structure object in the WebI Query panel as a results objects.
the SELECT syntax is much the same as a 'normal' MDX statement.
the quickest way to tell them appart is how the Measures are called. normally, it starts: SELECT [MEASURE.ABC123] NONEMPTY(CROSSJOIN( ... ) )
however, when you have a Structure, all the declarations from the start of the statement looks like : SELECT [ABC123.ABC123] NONEMPTY(CROSSJOIN( ... ) )
i hope this helps.
Regards,
H -
Report on BEx query with 2 structures (one in rows and one in columns)
Hi, experts! I have to make Crystall report on BEx query with 2 structures, one in columns (with KF's), and one in rows. Is it possible to create such report? Because when I create such report, I cant see fields in structures, only characteristics fields.
Ok, I found samr problem in another thread. Sorry.
Edited by: Mikhail Sychev on Dec 5, 2009 9:53 PMHey Flora,
Happy to hear that its working now.
Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
or
If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
Hope this helps in clear, please revert me for any clarification. -
Refreshing Hierarchy node variable in BEx query with change in hierarchy
Hi all,
We have used a hierarchy node variable on Characteristic ZECCSAC (user-defined) and used it in a BEx query with default value set to a particular node value. Upto this, it is working fine.
The hierarchy used in the query, with the hierarchy node variable, was later changed ( and in future it can undergo changes ). Since the number of records in the hierarchy are changing, the nodenames of the hierarchy nodes are changing. But the hier node variable default value is still set to the earlier nodename for that node description. So at runtime it is giving an error "ECCS Account Number is invalid"!
Can anyone suggest how to refresh a hierarchy node variable default value each time a query is run so that the latest nodename is always taken ?
Quick reply will be appreciated.
ThanksHi,
You get this with User exits.
Thnaks -
Drill Down BeX Query with hierarchy in WEBI
Hi,
I am using a Bex Query with Hierarchy in my WEBI report. Is it possible to drill down ? I am not able to use Scope of Analysis because it is disabled. I am very new to WEBI. Please help me out.
Thanks in Advance.
Lakshmi Mohanhttp://www.google.co.in/url?sa=t&rct=j&q=drill%20down%20bex%20query%20with%20hierarchy%20in%20webi%20%20%20&source=web&cd=2&ved=0CDQQFjAB&url=https%3A%2F%2Fcw.sdn.sap.com%2Fcw%2Fservlet%2FJiveServlet%2FpreviewBody%2F137316-102-1-277519%2FWeb%2520Intelligence%2520on%2520SAP%2520implementation%2520best%2520practices.pdf&ei=xofcTpSgF5DJrAeaxpiIBw&usg=AFQjCNHuwDIpvxciPKJyEdoz3GiVjRKgqA
http://www.scribd.com/doc/62293080/40/Query-Drill-for-hierarchies -
WAD: Execute query with variant
Hi,
I would like to create a web report so that for a web item to select a query with variant. Is it possible using WAD?
Or is there any parameter that could be used in the URL so that I can create directly the URL for this web report, without using WAD anymore?
Could you please give me some sugestions regarding this problem?
Thank you,
IulianaHI Iuliana,
Take a look at this post:
Re: Variant for a Web Report
Hope this helps... -
BEx query with keyfigure rank in row, chars and other keyfigures in columns
Hi All,
I have a BEx query with Plant and Region in rows and two keyfigures(% and rank calculation) in the column. Now my requirement is to display rank in the first column, plant and % cal. in the next columns in query output.
Query ouput should look like :
rank plant %
1 XYZ 63.00
2 ABC 76.94 and soon.
Is any way possible to achieve this and if yes can anyone explain in detail with steps, I apprecaite your help with points.
Thanks
Eric.Hi Jerome,
Thanks for quick response, is there any alternate way like customer exits or etc. This is my requirement and I need to provide the users the solution. I appreciate your valuable time.
Regards
Eric -
Column chart from Bex query with 2 characteristics in rows and column
Hi,
We're trying to represent the following column chart in Dashboard Design:
Material/Month
January
February
March
Material 1
100
200
300
Material 2
400
500
600
Material 3
700
800
900
The BEX query has:
Result objects: Material, Month/year; amount
The problem is when i paste the Material dimension in the Excel, i'm getting the following result:
Material/Month
January
February
March
Material 1
100
200
300
Material 1
400
500
600
Material 1
700
800
900
So, when i display the column chart, the material tag is incorrect:
as the image attached shows.Hey Flora,
Happy to hear that its working now.
Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
or
If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
Hope this helps in clear, please revert me for any clarification. -
SAP BO WebI Report on top of BI Bex Query with Authorization Variable
Hi,
We are trying to restrict row level data using BI 7.0 analysis authorization concept. We have an authorization variable in the Bex query and is working perfect in Bex Analyzer as well as in RSRT.
Now we are trying to achieve the same thing in BO webI. We created an Universe using Authentication Mode SSO. We are on BOXI 3.1 and implemented SSO. When we try to run the query in WebI we get the error
"A database error occured. The database error text is: Error in MDDataSetBW.GetCellData..(WS 10901)"
Just for testing purpose, when we use query filter in WebI and use Values from List, it is showing only the authorized value it supposed to show and runs well with that value selected. But we have to achieve this without the query filter in WebI.
So are we missing some thing here or any patch issue? Please share if you have done this type of reports in BO.
Thanks in advance for your help.
Moorthy.Yes I did run MDXTEST and it gives error as 'you do not have sufficient authorization'. The reason it is giving, I guess and we are debugging that to confirm, is first it looks for 0BI_ALL and throws error which is not the case in Bex. See the following trace in RSRT trace.
InfoObject Properties Defined
Reading of Directly Assigned Authorizations
Direct Assignment Does Not Include Universal Authorization 0BI_ALL
Reading the Indirect Assignments with Authorization Object S_RS_AUTH
Does user have OBI_ALL?
No, the User Does Not Have Universal Authorizion 0BI_ALL
Negative Entry in SU53 Result of Failed Check for 0BI_ALL
Indirect assignments found; no universal authorization
Reduction of Authorization Dimensions on Characteristics in InfoProvider
Reduction Successful
Thanks!
Moorthy -
Zero Suppression Not working in Bex Query with Formula Variable
Hi Friends,
I have a peculiar issue here. We upgraded from 3.5 to 7.0 recently. Some of our Bex queries have been behaving abnormally after this. In these queeries,
we have some key figures which use formula variables (ready for input and mandatory) in 3.5. User can enter either 1 or 0. The actual key figure is multiplied to the formula variable so, the entire column gets the actual key figure value if the user enters a value '1' and the gets the value 0 if the user enters '0' in the formula variables. Zero suppression is activated on the rows and columns and this report. This technique was used successfully to show/hide a column.
After upgrade, the same query works but, the zero suppression is not working. When the user enters a value of '0' in these formula variables, all the entries in the column for the key figure are displayed as 0 but the column is still displayed. It is like the zero suppression setting is not active at all.
I created one of those queries in Bex 7.0 to see if that works but, the issue still exits. Have anyone come across this kind of a scenario? Please get back to me if anyone has any idea on this situation.
Thanks and Regards
Subray HegdeWhich SP level are you at in BI 7? There is an OSS Note that would need to be applied if you're on lower than SP10. That note is:
[OSS Note 964756 - Formula variables with replacement from difference in BI 7.0|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=964756] -
Error while integrating BEx Query with Cognos
Hi all,
we have made 999 rows and 150 columns..
but we r unable to integrate it with cognos if we remove free characteristics....
and it thows me the following error
1.BAP-ERR-0002 a BAPI error has occured in the function module RFC_READ_TABLE. NOT_AUTHORIZED
2.error when generating data provider
3.Query is too large
Please do reply immediately with the correct solution
Regards
MadhaviHi Vani Reddy
Jus one quick finding are there any new patches upgrade taken place in your system . its in generally occurs because patch issues please refer the following note 1325527.
it may helps you in this reg.
Hope its clear a little..!
Thanks
K M R
***Even if you have nothing, you can get anything.
But your attitude & approach should be positive..!****
>
vani reddy wrote:
> Hi All,
>
> While executing Bex Query user is getting below error message after 20 mins and coming out of BEx.
>
>
>
> Error Group
>
> RFC_ERROR_SYSTEM_FAILURE
>
> Message
>
> An exception that could not be cought occured.
>
> Thanks in advance
> Vani
Edited by: K M R on Aug 12, 2009 2:14 PM -
Open an IE browser with link from ABAP code
How to open an IE browser in separate window with dynamic link from ABAP code. The IE should open in a separate window.
Eg:
strHttpLink = 'http://www.xxss.com'.
open IE browser using strHttpLink.Hi,
have a look at this:
http://www.erpgenie.com/abap/controls/htmlviewer.htm
Best regards. -
Calling a BW Bex Query in Web Dynpro ABAP
Hi Team,
I'm trying to call a BW Bex query in my web dynpro screen. The Web Dynpro is written in our ERP (ECC 6.0) system. I have specific parameters and values in my web dynpro context which I want to pass to a BW query and then display the actual query in my web dynpro. I found an element BIApplicationFrame but don't know if that is the correct way to display the query. Some questions:
1) How do I pass the username/password for the BW system in the Web Dynpro written in ERP?
2) How do I pass the parameters to the query
3) How is the security and roles managed. The web dynpro is enables as an iView in the SAP Portal.
Thanks much for your guidance.
Regards
SanjayPetr:
I managed to pass the selection variables to the query through BIApplicationFrame. This is how I did it.
1) Added the BIApplicationFrame UI element to the View of the Webdynpro application and named it ZBIQUERY with the following properties relevant to my system.
- dataProviderStateName property is set to my query name which is 'ZPUR_M02_Q08'
- dataProviderStateType is set to 'Query'.
- server is set to 'housapdbw.noble.cc:8000'
- templateId is set to 'ZPUR_M02_W02'
- variableScreen is Unchecked.
2) Added two attributes to the view under the attributes tab. They are
M_APPL_FRAME RefTo CL_WD_BIAPPLICATION_FRAME
M_METHOD_HANDLER RefTo IF_WD_BI_APPLFRAME_METHOD_HNDL
3) Then add the following code in the method WDDOMODIFYVIEW.
data:
lt_parameters type if_wd_bi_applframe_method_hndl=>tt_name_value,
ls_parameters type if_wd_bi_applframe_method_hndl=>t_name_value.
define add_parameter.
clear ls_parameters.
ls_parameters-name = &1.
ls_parameters-value = &2.
append ls_parameters to lt_parameters.
end-of-definition.
if first_time = abap_true.
wd_this->m_appl_frame ?= view->get_element( 'ZBIQUERY' ).
wd_this->m_method_handler ?= wd_this->m_appl_frame->_method_handler.
endif.
Please note that the selection screen on my query has Select-options and its name is
XREF_NUM0001. I am passing a value of '11111' to it as shown below.
refresh lt_parameters.
add_parameter 'CMD' 'PROCESS_VARIABLES'. " This is for Execute button
add_parameter 'SUBCMD' 'VAR_SUBMIT'. " This one also for Execute Button
add_parameter 'VAR_NAME_1' 'XREF_NUM0001'. " Name of my select-option
add_parameter 'VAR_OPERATOR_1' 'EQ'.
add_parameter 'VAR_SIGN_1' 'I'.
add_parameter 'VAR_VALUE_LOW_EXT_1' '11111'. " Value for my select-option
wd_this->m_method_handler->execute_command( lt_parameters ).
endif.
The above code needs to be added before the view is called in th is method.
Hope this helps.
Krishna Muppavarapu
Maybe you are looking for
-
I want the same conversations on my ipad and MacBook as I do on my iphone 5.
-
QQ about Camera Raw Cache and why mine is empty
Quick question about Camera Raw Cache: Mine is empty. Always. I've read that the Develop module stores information on photos it opens in the Camera Raw Cache, while the Library module stores its previews in the LRDATA directory adjacent to the Lightr
-
Report Viewer 2015 not navigating to next page
I am using a report viewer 2015 in an ASP.NET application with credentials passed using IReportServerConnection2. But after clicking next page on report viewer toolbar, 2nd page of report is not shown. The issue is reproducible with ASP.NET applica
-
QUESTION:hp photosmart c4780
This new wireless printer is working great with documents from any web site BUT i cannot PRINT from word. Excell or word documents that i can view on my imac but can't print. Can anyone help with that question please.
-
Upgraded SDK, classes missing, now what?
I have Flex Builder 3 with a professional liscense. FB3 includes classes like AdvancedDataGrid, AdvancedDataGridColumn, etc, that have a watermark over them until you enter the license, which then also unzips the files so you can see the source code.