BI 7 - BEX Query Designer variable question
Hi all,
If I have an Entry Variable in the selection screen of a query, is it possible to populate another variable based on the user input.
e.g.
If I have a Report Date with a mandatory input, and I want a CalMonth variable to be populated based on this.
Is the only way of achieving this through customer exits???
Many thanks,
Shane.
Hi Shane,
You would need to write a code in the CMOD for the variable, something like below:
Declare internal table IT_RANGE with type same as I_T_VAR_RANGE.
Also declare work area WA_RANGE like line of IT_RANGE
when 'variable_name'.
IF i_step = 2.
REFRESH e_t_range.
data: v_date type sy-datum.
data: v_date1 type sy-datum.
data: v_month type I length 2.
data: v_year type I length 4.
read I_T_VAR_RANGE into WA_RANGE where VNAM = 'variable_name' and IOBJNM = '0cal_day'.
if sy-subrc = 0.
v_date = WA_RANGE-LOW. "Date Entered by user
endif.
WA_RANGE-SIGN = 'I'.
WA_RANGE-OPT = 'EQ'.
* here we will write our logic to populate the 7 dates as required.
* and populate the date into v_date1.
WA_RANGE-LOW = v_date1. "Similar procedure to derive all 7 dates
append wa_range to e_t_range. "We append all the 7 derived dates to e_t_range
"(i.e. 7 append statements)
You should be careful while writing the logic for previous month to handle year ends.
you can use sample code like below for that:
v_month = v_date4(2). "month
v_year = v_date+0(4). "Year
if v_month = '01'.
v_month = '12'.
v_year = v_year - 1.
endif.
You will probably need an ABAPers help to write the logic for deriving the dates as required.
Here your logic will be like finding end date of previous months which can be done using function module LAST_DAY_OF_MONTHS
similarly you will have to get last dates of 3 quarters, which can be done by determining which quarter the input date falls in.
and same for the year end date.
Hope this helps
Regards,
Joe
Edited by: lazarus_joey on Feb 15, 2012 6:45 PM
Similar Messages
-
BEx Query Designer - Simple Question - Will Give Points Promptly
I have this query designed and looks like I have personalized the variables from the parameter screen. how do I undo it. I am running this report from query designer itself and not th web. Kindly assist.
Hi,
It may be helpful to know that ODS 0PERS_VAR stores all the entries. We have used this in the past to see who had turned this on & for what kind of objects. You can also selectively delete out of the ODS if you had to, for some reason.
OR
<b>(Better one)</b>
Start transaction SM31 (table maintenance)
Enter table RSPERSHEAD and click on [maintain]
It is not necessary to open the BW system for maintenance in SCC4.
Search for the line:
application component = VAR
version = A (active)
now un-check the checkbox in the table field "boolean" and save the changes.
As a result the BEX analyzer will show all the personalized variables in the selection screens again, you don't have to delete the data in the ODS 0PERS_VAR.
You can undo the changes by ticking the checkbox again.
I have implemented this solution on BW release 3.1
We only use BEX reporting so I don't know if this solution has any effect on WEB reports.
please let me know if one of you encounters any problem with this solution.
Regards,
San! -
Creating Restrictions in BEx query designer for (1-a), where a is variable.
Dear All,
>> Suppose for the variable in the BEx query designer, I've created restriction for 0FISCPER to the variable 0P_PER (as 0P_PER-1) by right clicking 0P_PER3, from that a dialog box appears. In that I've selected 0P_PER3 and then clicked on offset variable and when I set the offset variable, it works for (0P_PER-1.etc, 0P_PER+1,etc..)
But if I want to have (1-0P_PER), then plz tell me how to define this restriction?
Plz explain me the steps to perform (1-0P_PER) restriction in BEx query designer in BW1.
I'm using SAP BI 7.2 gui.
Expecting your reply soon,
with Regards,
JeraldMy requirement is that I want to have " 1-fiscal year"., But this I could not define using offset variables, since using offset we can define "fiscal year +1" or "fiscal year -1".
So there would be some other way to define "1-fiscalyear". So Please help me to define "1-fiscalyear" by giving me the steps.
Thank you,
with Regards,
Jerald -
Where to write IF THEN ELASE statements in BEX Query Designer
Hi All,
I need to write a formula in query designer...
saying that to display the all Quantities in KGs.. Now articles are in Grams and KGs...
So here i need to perform calculation like... if article is in KGs divide by 1, else if article is in Grams divide by 1000.
where can i write this logic to perform calculation ...
Thanks in advance..
ravi.phi chetan,
No its not work.. why because i need to convert the unit of measure in Masterdata Attribute values... that means ) ' 0grooss_wt'. this is attribute as a keyfigure of ' 0material' .. this ' 0gross_wt' values has to convert in KGs. at Present ' 0gross_wt' values are in KG and Grams...
I can change these values in update rules by writting Routine.. But I need to convert it in KGS at BEX Query Designer Level..
I need calculate like this
quantity sold * Gross Weight.
here Gross Weight is the formula variable which replacing the values of gross weight...
i tried by creating conversion types in RSUOM t-code. but it works on keyfigures of infocube.. not on attribute values of master data...
is there any solution to solve this Problem... -
Results based on From and To value in Bex query designer.
Dear all,
We are using BI7.00. In one of our report which pertains to PM user wants to get the details of number of breakdowns which falls in the value range 0 to 1 hours.
I created a condition which has 2 variables, one is From value and the other is for the To value (since user wants to enter both the limits). I have written a condition that if the breakdown hour is greater than or equal to variable1 and less than or equal to variable2.
Using the above condition if the query is run, i am not getting the desired output. The values avaialble in the report are 0.65,0.78,1.30,7.38,0 etc., when i give 0 to 1 i should get the values 0.65,0.78 and 0 but instead report displays "No valid results".
I changed the condition and selected "Between" variable 1 and variable 2 - yet no change in the query.
To my knowledge i foresee that system is not able to recognize the decimal and hence provides details only based on the whole numbers.
How to get my requirement achieved in the Bex query designer.
Experts suggestion with steps will be very useful to solve my problem.
Regards,
M.M
Edited by: Magesh Magesh on Dec 26, 2008 11:28 AMHi Magesh,
I think you could try one more way.
Create a formula inserting your two formula variables for limits .(FV - are ready for input ) .
The formula would return the result as 1 or 0 because it would have boolean condition in it.
You could then place a condition in the query designer to only show all records where the value of the formula key fig is 1.
You formula A would look like
( KF > FV1) AND (KF < FV2) * 1.
And in the condition put A EQ 1.
You could scale the key figures as well and multiply the limits mentioned by the users in FV1 and FV2 if decimals are still not recognized by SAP.(scaling)
Regards,
Sunmit. -
Difference between aggregation and calculation tab in BEx Query Designer
HI,
I am using BEx Query Designer for my report, for the key figures in the coloumn area i slected one numeric key figures, in the properties tab i found aggregation tab and calculation tab.
I need to sum up the total values for that particualar coloumn, when i used calculation tab i found to sum all the values for a particular coloumn, then what is the use the aggreagation tab?
I not able to used that Aggregation tab it is showing as a hidden fields...
can any one tell me whats the exact difference between these tabs and when we need to use which tab?
With Regards,
Thanesh Kumar.Hi Thanesh Kumar,
I moved this thread from forum Data Warehousing to Business Explorer since it is a query related question (as SDN moderator).
I could explain to you the difference between these two tabs.
For "calculation" tab, it changes the display of result and does not change the calculation logic.
It means that, if this key figure is used further in formula, still the original number (without "calculation" tab setting) is used for further formula calculation.
For "aggregation" tab, it changes the real calculation logic.
The system takes the setting as the aggregation rule for records.
The most common aggregation rule is of course summation. If you set to e.g. Average here, the system does the
Average instead of summation when aggregating records. And the Average value will be taken for calculation
in further formulas or other calculations.
For "aggregation" tab, you could only use it for CKF (calculated key figure) or formula and you could not use it for
a basic key figure. That should be the reason why you see it greyed-out.
Regards,
Patricia -
Problem with Queries Structures in Bex Query Designer and Universe Designer
Hi everyone,
I have a problem when i try to do a Universe from a Bex Query Designer.
When I use a Characteristic Restrictions in a Structure, the universe only show me the structure without the objects inside it.
EJ:
1) Bex Query Designer
Colunms
(Structure) ZSRT_123
- (Characteristic Restrictions) Reg Guayana
> (InfoObject) 0Product = 'XXX'
> (InfoObject) 0Country = 'YYY'
- (Characteristic Restrictions) Reg Caracas
> (InfoObject) 0Product = 'AAA'
> (InfoObject) 0Country = 'BBB'
Rows
(Structure) ZSRT_456
(Key Figure) Net Sales
2) Universe designer
(Class) ZSRT_456
>(Measure) Net Sale
(Class) ZSRT_123
>(Dimension) ZSRT_123
The universe dont translate the two Characteristic Restrictions in the structure ZSRT_123.
Any information would be much appreciated. Thank you.Hi,
I assume that you are using BOE XI 3.1 SP2.
We have added an option in SP2 to generate or not the L00 level.
Unfortunately this option applies not only on characteristics but also on hierarchies, hierarchies variables and structures: that's the reason why you have no elements belonging to the structure generated.
I recommend to always generate L00 in order to have your structure generated correctly.
This issue will be fixed in SP3.
Regards,
Didier -
Doubt on Rows and Coloums in BEx Query Designer.
Hello, Experts.
I have a Doubt in BEx Query Designer.
In the Rows I have a Fiscal year Period, if the user enters the Fiscal year period for e.g. : 001/2006 .
in the columns i have forecast for the Fiscal year period which user entered ( 001/2006 ), and we have another column pervious ( Prior )fiscal year period ( 001/2005 ).
My Questions is , as we are Restricting with 001/2006 will the query retrieve the values of 2005 or not?
Thanks in Advance .
Sharpyes i am Doing Offest.
I moved this Fiscal year Period to Free char, and i Restricted with Pervious Fical Year period and Fical year period . it worked. but
when i kept this in Rows and deleted Previous Fiscal Year period . it is displaying blanks. in prior years forecast.
is it because i am Ristricting it to only fical year period which user entered
Colums--> Forcast ( User Entered year ) Prior year
Rows
Fiscal year period
Fiscal year period( user enterd )
Thanks -
BEx Query Designer - Execute pops up blank Internet Explorer session
Hi gurus,
From BEx Query Designer, I choose Execute, and it pops up a blank Internet Explorer window rather than the query. It says about:blank in the URL and the page is white.
I read some posts that say to run RSPOR_SETUP, but I don't have a Java system or Portal system so does that still apply to me? I want the URL that pops up to point to the BW system which is an ABAP system.
E_URL_PREFIX http://BWSAPF00.mydomain.com:8100
E_URL_PATH /sap/bw/BEx
E_URL_PROTOCOL http
E_URL_SERVER BWSAPF00.mydomain.com
E_URL_PORT 8100
E_SUBRC 0
Warm Regards,
CMHi,
Please note that Java stack is mandatory for running Queries in web side
or for executing the Queries using Transaction RSRT -> Java Web or
for executing the Queries using Query Designer in Release 7.x .
So, please install Java stack and use BI Java components for running
Queries in web side here.
Also, please refer the following note for details:
917950 - SAP NetWeaver 2004s: Setting Up BEx Web
Also keep a note of the following:
Please check the following link:
http://help.sap.com/saphelp_nwpi71
/helpdata/en/45/61d5aaa0546628e10000000a1553f6/frameset.htm
"With SAP NetWeaver 7.1, the Visual Administrator (VA) is replaced by
the SAP NetWeaver Administrator, that is, all relevant functions of
the VA are available in the SAP NetWeaver Administrator.
The VA is no longer delivered as of SAP NetWeaver 7.1. "
The interface is a little bit different now, but the installation
steps still follow the same logic as SAP NetWeaver 2004s.
You can use manual steps to set up integration as per note 917950.
Also, please don´t use report RSPOR_SETUP for configuration check
between ABAP and Java for SAP NetWeaver 2004s.
The report has been replaced by the support desk tool.
Please have a look at note '937697 - Usage of
SAP NetWeaver BI Diagnostics & Support Desk Tool'
RSPOR_SETUP is obsolete in BI 7.x release and Supportdesk tool should
be used in 7.x release.
Also refer the following notes:
1512988 - Frequently Asked Questions:BI Java 7.30 SP's/patches
1512356 - Patches for NetWeaver 7.30 BI Java Support Package
1506722 - Generic Note for BI Java Patches and Support Packages
And, please note that Patch Level 0 is not supported for BI Java components as per the following note:
1789842 - Patch Level 0 for BI Java Installation
Please do look at the note 1789842 for details.
Please check the Support Desk Tool as per the note 937697 and if you find
any RED signals in the file systeminfo.txt included in the file
supportdesk.zip, please correct it as per the Solution mentioned
there and check if it helps.
Thanks & Regards,
Sapna
Message was edited by: Sapna J Gurudutt -
Execution of BEx Query Designer Querys in BI Java SDK
Hello experts,
i am actually occupying with the possibilities of the BI Java SDK. I checked the documentation but could not find an answer to my question, so i address this issue now to the community in the hope, that someone out there can give me a hint:
Is it possible to execute a BI query, which was designed in the BEx query designer, within the BI Java SDK OLAP query api?
Is there somewhere a method, which could be simply passed the technical names of the infocube and the query and then returns the query result as a IBIResultSet or IBIDataSet?
Thanks in advance for your help,
best regards,
ThiloHello Mohan,
thanks for this impression - thats a way i didn't think about at all before. I even think, that it is not necessary to publish the query as iview - it would suffice to invoke the BEx-AdHoc-Analysis Service via a HttpConnection-Object within a servlet and then parse the result delivered by the BEx service. You won't even need BI Java SDK for this, since this is plain Java functionality.
But as i see there seems to exist no BI Java SDK-"generic" possibility to invoke an existing query as i see....
If anybody has got another idea, it is very welcome. But i think i will investigate on the approach with the native HTTP call to AdHoc Service.
Thanks anyway & best regards,
Thilo -
Settings for SAP Portal start page from BEx Query Designer
Hi!
In order to see queries I would like to use SAP Enterprise Portal from BEx Query Designer.
When I push "execute" button within BEx Query Designer a wrong page will be shown in browser.
I changed the settings in table RSPOR_T_PORTAL, but still get the wrong Portal page shown in browser.
Question:
What is the transaction/table/report to customize the portal start page using by BEx Query Designer?
Thank you very much!
regards
JürgenHi Anton?
Many thanks for your reply.
But I mentioned that I changed the URL within table RSPOR_T_PORTAL and this does not help...
Do you speak Russian? Me too
Can you also help me with the following problem?
Hi!
I am about to implement SAP Best Practices scenario "B34: Accounts Receivable Analysis".
Therefore I load the data from SAP ERP IDES system into SAP NetWeaver 2004s system.
My problems are:
when I try to load the transaction data for Infosources 0FI_AR_4 and 0FI_AR_6 from SAP ERP system the following happens:
- the status is getting u201Cyellowu201D (194 from 0 records)
- at the next day the status is getting u201Credu201D and I received the following error:
Errors while sending packages from OLTP to BI
Diagnosis
No IDocs could be sent to BI using RFC.
System Response
There are IDocs in the source system ALE outbox that did not arrive in the ALE inbox of BI.
Further analysis:
Check the TRFC log.
You can access this log using the wizard or the menu path "Environment -> Transact. RFC -> In source system".
Error handling:
If the TRFC is incorrect, check whether the source system is fully connected to BI. In particular, check the authorizations of the background user in the source system.
Comment:
I did not find any entries on "Environment -> Transact. RFC -> In source system"
The Source system connection EC6CLNT100 is OK
Can some one help me to solve this problem?
Edited by: Jgen Pfeiffer on Feb 5, 2009 12:48 PM -
IF and ABS condition statement in BEX query designer
Hi,
I would like to ask the best way for me to produce an acceptable result from Excel IF and ABS Condition statement.
The condition statement that I have on my Excel file is
=IF((A2-B2)>0,ABS(A2-B2),0)
I'm trying multiple times to reproduce this in BEX Query designer, unfortunately I'm getting a bad result or unacceptable formula.
Anyone who could help me with my issue?
Thanks,
ArnoldHi Arnold,
Thank you,
Nanda -
Message in BEx Query Designer Formula
Hi Experts,
I need to display message based on the value of the formula result. For Example:
If K.F1 =<2.5 Then <Message: ODD>
ElseIF K.F1 >2.5 Then <Message: Even>
Else
<Message: Determine the value>
EndIF
Thease above messages would be build in the formula column of BEx query designer
Thanks and really appreciate your response.
Regards,
WaseemHello,
I have done the same funtionality with the help of workbook.
May be experts can guide us how to display messages in the formula column of BEx query designer.
Thanks.
With regards,
Anand Kumar -
Drilldown in BeX Query Designer
Hello,
I am new in SAP. I am having problem creating Drill down. I have this report where all the data is Transactional data. So I haven't created any Master Data. So I won't be able to use Navigational Attribute for Drill down purpose and I don't want to use Hierarchy. Is there any possibility of getting the Drill down in BeX Query Designer? Any help will be appreciated.
Warm Regards,
DebayanHi Debayan,
first of all, what is your requirement to create a drill down?
A drill down in BEx query means showing additional information from report output. There are 3 ways to drill down a query in BEx
1. Master data-Navigational Attributes
2. Master data- Hierarchies
3. Free characteristics
As you dont have any master data in the report (which is very strange) you can use the additional characteristics provided in the 'Free characteristics' to see how the drill down works in BEx.
Please share your exact requirement.
Hope this helps.
-Swati. -
Division in bex query designer
Hi experts,
I have a strange problem in bex query designer. I am trying to calculate margin in % but the calculation gives the wrong result.
The two figures I try to calculate are -25124 and -91248 (figures in 1000 NOK)
The result should be (-25124/-91248)100 = 27,53* (when formula entered in excel)
I have tried the following in Bex query designer
-25124 %A -91248 = -0,02753%
(-25124/-91248)*100 = 0,02753
What might be the problem here?Thanks again for your answer,
I will try to explain my report (requirement from the business user)
Actual (KF)----
Budget (KF)
Sales-- -91248--
-77153
FSP-- -25124--
-18918
Margin % -
(FSP Actual/Sales Actual) 100---(FSP Budget/Sales Budget)100
Dim
Dim
Result
The margin is calculated in the cells in the bex query designer to differentiate between actual and budget. There is no option to calculate the margin in the columns as this would influence all other rows aswell.
Maybe you are looking for
-
I have a personal itunes account with an iPhone5s (perosnal mobile numer) and an iPad 4 mini (no SIMM). I have unlocked my old iPhone 4 to use for work on a different SIM and new number, Do you know if I can have all devices associated to my single a
-
Yoga 2 Pro : BIOS Update on a clean Windows 8.1 Pro install
Hi, I recently bought the Yoga 2 Pro. Like everybody I have the yellow problem. After buying it, I reinstalled my computer with a fresh Windows 8.1 pro install. I was wondering if anybody has already tried updating the BIOS on a clean Windows 8.1 ins
-
Problem with opening repository in Administration Tool
Hello! I have a problem when I want to open saved repository in Administration Tool. I've saved uncompleted repository (without Presentation Layer) in offline mode (BI Server was stopped all the time) and then I've closed A. Tool. BI Server was stopp
-
Photos I take now don't appear on the map?
I have the new ipod touch. It was working until yesterday evening. I love this feature. GPS is working by the way. Any ideas?
-
Error in executing Flight Demo
Hi all I am getting an error while trying to execute the Flight demo.the error is as follows:- The following error text was processed in the system IXI : An exception that could not be caught occurred. The error occurred on the application server SAP