Variable for Query without changing Datamodel
Hello Experts,
I need in the Query a variable, which should have inpact on the processing in the user-exit. This variable should no be used directly for constraining data.
It is an Yes/No variable. And I don't have in my multicube any characteristic which have Yes/No in their domain.
In such situation I have always added to Multiprovider and Cube an new characteristic and created an variable for this characteristic.
But I don't like this solution, because this changes in the datamodel are in really not important for the datamodel. It only an work around for getting the possibility of adding a variable.
Does someone know an better idea for adding variables to query, without changing datamodel like this.
Thanks
Wojciech
Hi Bhanu,
Not really - I don't want to change Cubes.
Thanks
Wojciech
Similar Messages
-
Can we create range variable for Query Key Date
Hello Gurus,
Can we create a range variable for Query Key Date ? when I tried to give a range of values for Query Key Date, I am unable to find Range Values option. I found only Single Values.
so, Please let me know if we can use Range variables for Query Key Date ??
Thanks in advance,
Regards,
AarthiHi Aarthi,
This is relevant for the time dependant master data that is being pulled in thw query. Like if you are using a nav attr in the query and this nav attr is time dependant, then which record (from the char master data) is to be pulled into the report, depends upon the key date that you specify.
The default key date value is the date on which the query is executed, that is <Today>.
Hope this helps... -
CF Set form.variable for query and Next/Previous pages error
I have a CF form with a select that posts to a CF "action" page.
On the action page I: CFSET ItemNumber=#form.ItemNumber#
I CFOUTPUT the 'ItemNumber' into the CFQUERY (which is an Inner Join dependant on the '#ItemNumber#')...
All of the above works just fine and displays the database fields in color alternating rows, per the rest of the code.
Here's the problem:
I'm displaying 40 rows on a page per "Next and Previous" code. (CFPARAM name="start" default="1" and CFPARAM name="disp" default="40" along with the rest of the NextN code in the header and body). This does display 40 rows on the page and puts a link at the bottom of the page "Next 40 Rows", etc.
Note: I'm only querying the database once and using the query (query name="data") to populate the table rows And the NextN code (CFOUTPUT name="data") And (CFIF start + disp GREATER THAN data.RecordCount, etc)...
The problem happens when you click the "Next 40 Rows" link to display the 2nd page of rows. Since (I'm assuming) this NextN code is 're-reading' the same page from top to bottom, an error is thrown when the code tries to read the CFSET ItemNumber=#form.ItemNumber# at the top of the page.
With the #form.ItemNumber# on this action page Originally coming from the previous posting of the form to this action page, when the "Next 40 Rows" link is clicked and the NextN code re-reads this action page - the CFSET ItemNumber (#form.ItemNumber) is not getting populated and throws the error...
I hope I've not made this sound confusing.
I can get the NextN code to work when I'm just querying the database without "flying in" a form variable. But when I CFSET a variable (#form.ItemNumber#) that is inserted into the query, the second page of the NextN throws an error and doesn't display.
I would include the page code here but it would be fairly lengthy and, as well, the NextN code is a 'standard' CF code -- I've narrowed the problem down to the above "Element is undefined" (when the page tries to reload from the "Next 40 Rows" link) and am hoping there's a simple fix or another way to display the records in Next and Previous pages.
Thanks to anyone in advance for shedding light on this.
- eThank you for the reply, Owain.
Yes - The Next/Previous at the bottom of the page are hyperlinks.
<a href="ThisPage.cfm?start=#Evaluate("start + disp")#">
The following is at the top of the page (and is the variable from the form that I CFOUTPUT in the query):
<cfparam name="ItemNumberDropdown01" default="">
<cfset ItemNumber = #form.ItemNumberDropdown01#>
The error report showed that the "Next Page" hyperlink was reading an undefined variable... although when the "action page" first opens from the form posting to it, it populates the CFSET just fine (per the cfparam and cfset above)... As you mention, the hyperlink clearing the form scope is what causes the error in trying to display the next set of records...
The form page and the 'action page' are both secure pages with an application page setting the session, etc. Am I at risk in using an URL scope?
Where would this URL scope be put? (The href is shown above - would the URL scope go in this? - How would this be written?)
The CFPARAM and CFSET would still exist at the top of the 'action page' and still throw an error wouldn't it or would this be replaced with something else to read the form.variable for this 'first' action page to be displayed?
Thanks again for the 'education' on this...
- ed -
Me and my daughter have same Apple ID for my iPhone iPad and her iPod and iPad mini. Is there any way to get an iCloud account for her devices without changing her Apple ID. She has an old iCloud account from older iPod but can't activate it or remember her old iCloud account.
ThanksYou have to use a different Apple ID to create a new iCloud account (each ID can only be used with a single account). You don't have to use the ID for anything else though, she can continue to use her current ID for other services such as iTunes, iMessage, FaceTime, etc.
The only limitation is that each device can only create three iCloud accounts. -
Hi All,
I am using time dependent master data, i want to count number of employees on particular key date for diffferent Orgunits. So i created variable in the query properties for dynamic date selection .I also have other variable - Calendar month.
If the user enters particular Calendar Day (21.03.2008), then the report should show the total number of employees for that particular day.
If the user chooses Cal Year/month then the report should show the total number of employees for that time frame (12.2007-12.2008).
When i enter Cal Year/month and execute the system not allowing to execute the report. It says Calender Day is mandatory.
How can i bypass the calenderday when i choose calyear/month.
Variable for Key date :
Char - Calender Day
Mandatory
Ready for Input
Regards
A.VasisterHi,
For this work you have to create another 2 variable.
1. Make your both user entry variables as optional.
2. Create another 2 variables processing type as user exit.
3. In the CMOD program, identify which variable contains data.
- If the user entered month, then in the user exit of Calender day's from date should be
first day of the month parameter and to date should be the last date of the month parameter.
- If the user entered date, then pass corresponding month&year value of the date to calmonth variable.
Let me know the position.
Vivek -
Hai Gurus,
I have a report which gives all the requisitions with differrent status in the report based on Req. start date.
In addition to this i got a requirement in the same report where user can enter date interval..
Based on the user date interval it should populate the req's in the report only with Status ="OPEN".
My question is can we restrict this status in the Customer Exit.
If possible how can we achieve that..
Please let me know if you need any further details..
Thanks & Regards,
VJHi,
If I got you correctly, you have a report which gives PRs based on user entered Required start date. Now in the same query, you would like to put condition based on status as well.
You can achieve this in 3 ways.
1) After executing the query, you can filter the results of query by status 'Open'. This would have to be done after each time the report is executed. This approach wil not need any exits/ transport requests.
2) Create a characteristic variable on status characteristic. Make the type of this variable as 'Default/ User entry'. Select the option for 'Ready for input' and the variable should be 'Select-option'. You can give default values so that this values are populated when query is executed and pop-up comes up for user to give selection.
If you have status like 'Open', 'In progress', 'Completed', 'Terminated', then in default values section, you can give value like this
'Completed' to 'Terminated'
This would cover all the status. And if query is executed wth this value, PRs would come for all the status.
If you want the query to be executed for only 'Open' status, refresh the query, again th pop-up would come. Now, you can remove the default values and only give 'Open'. This time it would only give PRs with open status or given date range.
3) You can do 2nd step but by creating it of customer exit type. Have 'Ready for input' selected. And in customer exit, fill the variable under i_step =1 for all the statuses. therefore, when query is execute, it would come with same default values and you may change them based on your need. -
Parsing List in URL Variable for Query
Hi, I am sending a url variable as in the following example:
http://mypage.com/lookup.cfm?var=1001,1002,1003
I then need to query a database given the string
"1001,1002,1003" in #URL.VAR# to find all records that contain
those RecID numbers in my table. Has anyone done this before, and
if so what is the best way to accomplish this?
Thanks!i tried using the following code, but keep getting an error:
<cfif listLen(url.var) neq 0>
<cfquery name="lookup" datasource="#application.dsn#">
select *
from INVENTORY_CATEGORIES
where
<cfloop list="#url.var#" index="i">
<cfif isNumeric(i)>
CATEGORY_ID= <cfqueryparam cfsqltype="cf_sql_integer"
value="#i#">
and
</cfif>
1=1
</cfloop>
</cfquery>
<cfelse>
<cfset LOOKUP.recordcount=0>
</cfif>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
</tr>
<cfoutput query="lookup">
<tr>
<td> </td>
<td>#row_id#</td>
</tr>
</cfoutput>
</table>
The error I am getting is:
Error Diagnostic Information
ODBC Error Code = 37000 (Syntax error or access violation)
[Microsoft][ODBC Microsoft Access Driver] Invalid use of '.',
'!', or '()'. in query expression 'CATEGORY_ID= Pa_RaM000 and 1=1
CATEGORY_ID= Pa_RaM001 and 1=1'.
The error occurred while processing an element with a general
identifier of (CFQUERY), occupying document position (2:1) to
(2:54).
Date/Time: 07/24/06 09:50:54
Browser: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
Remote Address: 127.0.0.1
Query String: var=2042,2045
Any ideas? Also, please keep in mind that the variables I
will send across th eurl may also have letters. For example,
var=m1001,1002,p30014. Thanks! -
Use Yesterday as variable for Query Filter
Post Author: rrburton
CA Forum: WebIntelligence Reporting
I want to have a query filter that refers to the previous day. In regular SQL I would use something like "= trunc(sysdate)-1". I don't see any option for doing it this way in web intelligence, the closest it comes is selecting object and then assigning the Beginning of Last Week item from the System Date table. What am I missing?Post Author: rrburton
CA Forum: WebIntelligence Reporting
Nevermind - I figured it out just now. It isn't very intuitive. In the Objects and Variables dialog in the SystemDate table there are a bunch of items like 1 day, 2 days, etc. and you select one of those and then in the code it looks like:
WHERE PKG_NTD_CONV.TO_ORCL_DATE(TROUBLE_TICKET_ARCHIVE.CREATE_DATE) = ( sysdate )-1
It should say something like 1 day ago, 2 days ago, etc. -
Mandatory variables for Query in APD
Hi,
I have embedded a query in APD. The query has some mandatory variables. These mandatory variables give an error in APD.
Error Message: This entry type OP_FPER(mandatory variable) requires you to enter a value
I can give a variant for the query but I want the user to enter the values for the mandatory variables in the selection screen when the APD is executed.
My question is,
1) Is it possible to have a mandatory variable in the query if it is used in APD? If so, then what should I do?Hi Anita,
no, unfortunately APD can not process a variable input screen. All variables need to be filled via query variant, hence the Analysis Process is not dynamic concerning variables.
Cheers
Thomas -
Hi!
How can i list every query variables created in my BI system?
I would like to see all variables created in BI querys.
Thank´s!Tables - RSZGLOBV and RSZELTTXT
Edited by: Srinivas on Jul 22, 2010 10:00 PM -
Using Text Variable for Query Description
hi all,
I am currently trying to include this text variable in the query properties of the query.
This text variable should be able to grab the 0CALMONTH as filter to be included into the query properties. but currrently cannot grab the particular information from the query properties.Hi
If I got your Question properly , You are trying to use Replacement Path Variable .. If it is so
/people/kamaljeet.kharbanda/blog/2006/12/28/bex-characteristic-variable-with-replacement-path
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
Hope it helps -
How do i change font size for iMac without change the screen resolution?
I have a iMac 27", and it have maximun resolution screen of 2560 x 1440, then the size of the font into the bar of the windows and application is to small. If I change the resolution (1920 x1080) the font size increased, but the definition o apparence is to low. I wants to keep the higthes resolution and obtain larger font.
Thank you.
Tengo un computador iMac de 27 pulgadas que además tiene una resolución de pantalla de 2560 x 1140, por lo tanto el tamaño de font o letra en la barra de menús de cualquier ventana o aplicación se ve muy pequeña. Si se cambia la resolución a una inferior el tamaño aumenta; pero se ve borroso. Quisiera mantener la máxima resolución y tener un tamaño de font mayor.
GraciasHello,
You can't really change it overall, but you for some Apps, like Safari>Preferences>Appearance, Mail>Preferences>Fonts & Colors. -
Changing the query without changing the workbook
Hi all,
I've got a workbook containing 6 queries. Now I've changed the queries (changed the hierachy used).
However, the workbook still uses the "old" hierachy. Is there anyway to update the workbook within having to reinsert the queries into the workbook and save the workbook.
Please note that we are using BW 3.5!
Thanks!
Cheers,
RobHi all,
I found the following solution.
Opened the workbook, made the SapBexQueries tabpage visible via the Macro editor. Than searched for the technical name of the old hierarchy and changed it to the new technical hierarchy name. Save... and run! No problem!
Worked like a charm!
Cheers,
Ron -
Dear all,
I am working on a BEx query. I would like to show MTD and YTD actual & planned expenses. My questions are as follows:
(1) how can I set up variables or variants which can look up the system date to calculate the MTD and YTD date? For example, I execute the query without input the date and I would like the query automatically look up the date for YTD (e.g. 1/1/2009 u2013 2/20/2009) and MTD (2/1/2009 u2013 2/20/2009) for actual expenses?
(2) Since the planned data is by year and distribute 12 months equally and not by day, how can I set up variables which can look up the system date to calculate the number of the days from the beginning of the year up to today and beginning of the month update to today so I can calculate the MTD and YTD planned expenses based on the annual budget.
ThanksThanks Reddy,
Since my variable for planned data is not date variable anymore, it is a factor = current date / number of days in current month and I used this to multiple by the planned monthly data. If I used entire month and the plan data will be overvalue, I can't compare to the MTD actual data since actual date is updated by day. How can I create a variable for this and use it to caluclate in the BEx Query?
I believe the function will work but I don't know much about ABAP. I try to search sample code for the function. here is what I get but I don't think it is going to work. Can you point out what is missing? I believe I need to put it under 'ZXRSAU01'
Under CASE I_DATASOURCE
I put
WHEN 'ZMTDFACTOR'. #the variable name of the MTD factor
PERFORM ZMTDFACTOR_EXIT.
In ZMTDFACTOR_EXIT and here is the code I get so far
WHEN 'ZMTDFACOTR'.
DATA: SDT TYPE SY-DATUM,
MON_FACTOR TYPE N,
ST_CD(2) TYPE N,
ST_LD(2) TYPE N.
l_date_in type sy-datum,
l_date_out type sy-datum.
SDT = SY-DATUM.
*current date
ST_CD = SDT+6(2).
CONCATENATE l_v_calmonth '01' into l_t_range-low.
l_date_in = l_t_range-low.
CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
EXPORTING
day_in = l_date_in
IMPORTING
LAST_DAY_OF_MONTH = l_date_out
EXCEPTIONS
DAY_IN_NOT_VALID = 1.
*last date
ST_LD = l_date_out+6(2).
*Calculate the factor based on the MTD
MON_FACTOR = ST_CD / ST_LD.
How can I send MON_FACTOR to ZMTDFACOTR and back to the query?
Thanks again. -
I have three different listings for Bob Seger on my iPod (Bob Seger, Bob Seger System and Bob Seger and The Silver Bullet Band) How can I put all 3 in the same artist folder without changing artist name?
Can you just create a new "Playlist", name it Bob Seger and drag what you want into the Playlist.
File/New Playlist
Maybe you are looking for
-
hello! my aol email has frozen on my phone. I tried refreshing and that did not work. I deleted my email account and now when I try to restart the email account it says authentication failed (after checking incoming server settings). my friend has
-
Lock and Unlock user for a period of time
I need to lock a specific su01 user for a specific period of time each day. Does anyone have any idea how to accomplish this task?
-
IPhone 3G dropped on the floor on the first day
it looks like the slot where you switch SIM card is a bit damaged too since I got another card stuck and it took me an hour too take out. Then I updated the phone and got it locked, and on ITunes it says that the SIM card inserted is not supported, s
-
Test Scripts for Process Chains
Hi Gurus, Can anybody send me the sample test scripts or the available links for process chains to my mail Id. [email protected] I will assign full points. Thanks in adance. Maruthi.
-
Add records in the beginning of the table
Hi, Is that possible to add or append the records in the beginning of the table. For example, CREATE TABLE app_test (n NUMBER, n1 VARCHAR2(200)); and inserting new records INSERT INTO app_test VALUES (1, 'test'); INSERT INTO app_test