How to use a characteristic value variable in a formula?
Hi all,
I have created a characteristic value variable (manual input) for 0CALDAY in a query to get the Start & End date. There is requirement in the report to display a KF showing the duration between Start & End Date.
I have tried to create a Formula Variable with Replacement Path, Ref Char 0CALDAY. In the Replacement Rule, there is an option to Replace Variable With variable. However, I wasn't able to locate the variable I have created for user input.
Any idea how to achieve this?
Many thanks,
Yoong-En
hi,
if you have the start and end dates as user entry then follow this
1) create a formula variable with reference char as start date of the type customer exit
2) create another formula with end date as reference char of type customer exit
3) in the cmod write the code your logic should be in such a way the the value at the user entry should be passed on to this formula variable the same for end date code
4) create a formula with ( start date formula variable - end date formula variable)
you can use this code
WHEN 'ZV_YRFKDAT'.(formula variable name)
IF I_STEP = 2. "after the popup
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZV_KEYDAT1'.(user entry variable name)
CLEAR L_S_RANGE.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW. "low value, e.g.YYYY (2006) part of key date (20060625)
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
repeat teh same for end date
hope this helps
Thanks
krishna.y
ENDIF.
Similar Messages
-
How to use the prompted value in the filter expression
Hi
Is it possible to use the prompted value in the filter expression?
My requirement is that user will be prompted for a date field and I need to filter the records such that the records are displayed for the last 5 weeks from the date entered by the user.
If somehow I know how to use the prompted value in the filter expression then this requirement is easy to be done. If this is possible, please guide me?
If there are other ways to acheive the desired results then please suggest.
Thanks
-JazEdit: example added
SQL> create table tb_test
2 ( id number(5)
3 , tot number(5)
4 , mon_tot number generated always as (tot*15) virtual
5 );
Table created.
SQL> insert into tb_test (id, tot) values (1, 5);
1 row created.
SQL> select * from tb_test;
ID TOT MON_TOT
1 5 75
1 row selected.
SQL> update tb_test
2 set tot = 15
3 where id = 1;
1 row updated.
SQL> select * from tb_test;
ID TOT MON_TOT
1 15 225
1 row selected. -
How to use a cumulative value in a formula
hi, experts
I have a question about how to use a cumulative value in a formula. Below is the example:
wk1 wk2 wk3 wk4 wk5....wk n
sales order 5 10 15 10 5
build plan 8 8 10 15 10
result 3 1 -4 1 6
result row is what I want to get, the formula is:
wk1 result = wk1 build plan - wk1 sales order
wk2 result = wk1 build plan + wk2 build plan - (wk1 sales order + wk2 sales order)
wk3 result = wk1 build plan + wk2 build plan + wk3 build plan - (wk1 sales order + wk2 sales order + wk3 sales order)
I've already ticked the cumulative in properity of the key figures. It seems like that the cumulative results only can display, but can't be used in formula. Could you please help me? Many many thanks !!Hi
In properties of that formula, there is option called 'formula collision' there you select 'formula from compiting result'. I think this will solve the problem. -
How to use cfloop index value as part of another variable
Hello,
I have a RATE form that first asks "how many rates will you
be adding?" that answer generates a series of form elements based
on the answer. You then have a form grid to populate, 3 values for
each rate (price, code, name).
This part works fine. The issue is now I need to INSERT the
values into the table, so I need to use the INDEX value of the
cfloop to recreate the amount (and names) of the fields in the
INSERT statement. How do I escape, or re-create the evaluated form
elements ( in which their count is #i# as the loop goes) when I
need to evaluate for #i# AND evaluate for #form.sku_i_name# at the
same pass?
I am passing, for example, #form.sku_2_Name# where that might
equal "Half Page". The number 2 in that variable was assigned
during the form creation by the current index of a cfloop. Since my
action (insert) page does not know how many (out of 50 possible)
sku's are coming, how do I use the skuCount (another hidden value
passed as well) to create a proper INSERT SQL command when I need
to eval the form element and the index at the same time?
Obviously #sku_#i#_Name# does not work, and #sku_i_Name# does
not either... I know this can be done, and that I am just doing it
wrong.
Thanks for any help!bigbrain28 wrote:
> Thank You, cfsearching! I don't quite understand 100%
how it works
As all three of us indicated you use array notation for this
type of
requirement. In ColdFusion you can use array notation or dot
notation
to access structure data. Almost all data in ColdFusion is
now some
type of structure.
I.E. #Form['myField']# is the same as #Form.myField#.
The advantage is that with array notation you can do things
you can not
do with dot notation. You can reference elements that have
keys that
are illegal variable names such as one with a space.
I.E. #url['my field'] is allowed, #url.my field# would fail
or course.
And you can concatenate the key string as we did with your
example.
I.E. #Form['aString' & aVariable]#
There are many powerful things one can do with this
knowledge. One can
access record sets with array notations. This can allow for
very
sophisticated parsing of a record set.
I.E. #myQuery['column'][row]#
You can dynamical call a variable. Thus creating dynamic code
that does
not even need to know what variables exist until run time.
I.E. #variables[anyName]#
This just scratches the surface. -
How to use an BPM Instance Variable in JSP page
Hi All,
I am using the JSP Presentation, but i don't know how to use an Instance variable in JSP page, that instance already declared in the process. And Can u explain the syntax that to include the JS file into jsp page
Regards
Vasu.
Edited by bpmvasu at 04/03/2007 10:43 PMHi Mariano,
I'm using JSP presentation too. In "Interactive Component Call" active i'm using "Use JSP presentation", but i only can define one instance variable, i need to add more instance variables. In "Advanced" option of this task, i have the argument mapping .. but i don't understand how to use it.
I have a instance variable called "genders" of the type String[Int] (Associative Array) and i'm mapping this instance variable in "Arguments Show In" option of the advanced option of JSP presentation. In JSP presentation i have the code:
<select <f:fieldName att="person.gender"/>>
<c:forEach var="gender" begin="0" items="${genders}" varStatus="status">
<c:choose>
<c:when test="${person.gender == gender}">
<option value="<c:out value="${gender}"/>" selected="true"><c:out value="${gender}"/></option>
</c:when>
<c:otherwise>
<option value="<c:out value="${gender}"/>"><c:out value="${gender}"/></option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>And in my screenflow i have the code:
genders[0] = "Male"
genders[1] = "Female"But when i run my application, i have the error: "The task could not be successfully executed. Reason: 'java.lang.ClassCastException: java.lang.Integer'."
What's the problem? -
How to use column name as variable in select statement
hi,
i want to make a sql query where in select statement using variable as a column name. but its not working plz guide me how can i do this.
select :m1 from table1;
regardsHi,
Is this what you want..
SQL> select &m1 from dept;
Enter value for m1: deptno
old 1: select &m1 from dept
new 1: select deptno from dept
DEPTNO
10
20
30
40
SQL> select &m1 from dept;
Enter value for m1: dname
old 1: select &m1 from dept
new 1: select dname from dept
DNAME
ACCOUNTING
RESEARCH
SALES
OPERATIONS
SQL> select &&m1 from dept;
Enter value for m1: loc
old 1: select &&m1 from dept
new 1: select loc from dept
LOC
NEW YORK
DALLAS
CHICAGO
BOSTON
SQL> select &&m1 from dept;
old 1: select &&m1 from dept
new 1: select loc from dept
LOC
NEW YORK
DALLAS
CHICAGO
BOSTONIf you use single '&' then each time you fire the query, It will ask for the new value..
But if you will use double '&&' the value of m1 will be persistent across the session..
Twinkle -
How to use wild card with variable in powershell
HI
i am trying to use wild card with variable but getting an error message, "You cannot call a method on a null-valued expression."
$src = 'C:\Temp'
$TabletzipPath = $src + "tab*.zip"
i would like to copy the tablet zip file which is placed in in $src to be copied in $TabletzipPath.
i am using tab* because this file name changes continuously. so if i give a fix name for example tablet1.zip than it works fine.Not sure if the wildcard will work without seeing how you're using the variable.
That said, I can say that it looks like you're missing the backslash between the $src path and the wildcard filename. As-is the above code assigns a value to $TabletzipPath of "C:\temptab*.zip" instead of what you are likely expecting ("C:\temp\tab*.zip")
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights -
How to use Decode with a variable
Maybe you've seen this done.
I want to take statement strMenu4 and subtract the previous value
that is stored in an array as shown in strMenu5.
My problem is this change as shown in strMenu5 produces
an error code:
ORA-00904 invalid column name
So either I'm coding something wrong or it can't be done within the
SUM(decode) construct. If I replace the variable with a literal
like 1000 the code works:
SUM(decode(name,'DBWR lru scans', c1.value) - 1000) DBWR_lru_scans
but with an array variable or even a constant the code fails:
SUM(decode(name,'DBWR lru scans', c1.value) - Array(3)) DBWR_lru_scans, "
Any ideas how I can use Decode with a variable and not have it interrupt it
as a invalid column name?
Thanks,
Joseph Karpinski
[email protected]
[email protected]
strMenu4 = "SELECT d1.instance, " _
& " to_char(sysdate, 'dd-mon-yy hh24:mi:ss') start_time, " _
& " SUM(decode(name,'DBWR buffers scanned', c1.value)) DBWR_buffers_scanned, " _
& " SUM(decode(name,'DBWR lru scans', c1.value)) DBWR_lru_scans, " _
& " SUM(decode(name,'db block gets', c1.value)) db_block_gets , " _
& " SUM(decode(name,'consistent gets', c1.value)) consistent_gets , " _
& " SUM(decode(name,'physical reads', c1.value)) physical_reads " _
& " from dual, v$sysstat c1, v$thread d1 " _
& " group by d1.instance "
strMenu5 = "SELECT d1.instance, " _
& " to_char(sysdate, 'dd-mon-yy hh24:mi:ss') start_time, " _
& " SUM(decode(name,'DBWR buffers scanned', c1.value) - Array(2)) DBWR_buffers_scanned, " _
& " SUM(decode(name,'DBWR lru scans', c1.value) - Array(3)) DBWR_lru_scans, " _
& " SUM(decode(name,'db block gets', c1.value) - Array(4)) db_block_gets , " _
& " SUM(decode(name,'consistent gets', c1.value) - Array(5)) consistent_gets , " _
& " SUM(decode(name,'physical reads', c1.value) - Array(6)) physical_reads " _
& " from dual, v$sysstat c1, v$thread d1 " _
& " group by d1.instance "Re-posting in the SQL and PL/SQL forum.
It's more appropriate.
Thanks,
Closing -
How to sort the characteristic values in layout
Hello,
I wont to use a layout with key figs in data columns and two characteristics in lead columns. The problem is that the sorting of first characteristic values is displayed in alphabetical order. How can I change the order to another exact defined combinations for characteristic values?
I read the thread with the same problem (see below the link), but the solutions are not satisfacroty.
Has anyone another idee?
Thanks for any help!
Larissa BräutigamHi Larissa;
I had the same problem and they propose this:
Attributesu0092 order that the system displays in the Planning Layout
That was not the solution presented to the customer. Because of system performance, a programmer was there and created a VBA code. But I wasn't there so I don't have the code.
regards -
How to use the prompt value in the report column
Hi
I have a report prompt column which is 'Adj Type' which holds values 10,20,30 and when user selects Adj Type = 10 then this value should be passed to report column.
For Eg. Column 1 value is 10 and this should multiple with prompt value and the output should be 10* 10.
Any thoughts how to capture the prompt values in report column for calculation.hi hsekar,
1) Declare a presentation variable in prompt under the Set Variable section -->Presentation Variable -->P_var
2) In Fx Table_name.Your_column * @{P_Var}
@{P_var}{20} ( 20 is default value it will override when a user selects value in prompt
Thanks,
Saichand.v -
How to use the updated value in the same update statement
Hello,
I just wonder how to use the updated new value of other column in the same udpate statement. I am using Oracle 11.2, and want to update the two columns with one update statement as following:
create table tb_test (id number(5), tot number(5), mon_tot number(5));
update tb_test set (tot = 15, mon_tot = tot *15) where id = 1;
...I would like to update both tot and mon_tot column, the value of mon_tot shall be determinted by the new value of tot.
Thanks,
Edited by: 939569 on 1-Feb-2013 7:00 AMEdit: example added
SQL> create table tb_test
2 ( id number(5)
3 , tot number(5)
4 , mon_tot number generated always as (tot*15) virtual
5 );
Table created.
SQL> insert into tb_test (id, tot) values (1, 5);
1 row created.
SQL> select * from tb_test;
ID TOT MON_TOT
1 5 75
1 row selected.
SQL> update tb_test
2 set tot = 15
3 where id = 1;
1 row updated.
SQL> select * from tb_test;
ID TOT MON_TOT
1 15 225
1 row selected. -
How to use copy default values for material from vendor master in Account Group
Dear all:
In define AccountGroup for vendor ,there is a field named DURAS which means default values,who can tell me how to use it?
Any informations are appreciated!Hi Katherine,
I have tried using default value as B in the customizing
If i maintain default values in the vendor master record, it will automatically adopt in the purchase info record.
Here i tried using sales person & telephone no field in vendor master record & it automatically adopts to purchase info record.
Region sales person and telephone no i have maintained in vendor master record, it automatically fetches to info record for the particular account group. I am not sure if there is any relation between vendor master and material master record.
Regards
Subbu. -
How to use the date repository variable in filter expression
Hi Gurus
I am getting error in using the date repository variable in Filter expression. I am using the below formula
filter( Fact.calls USING "Dim Time"."Fiscal Month End Date" = VALUEOF("month_start") )
I am getting below error
Formula syntax is invalid.
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22024] A comparison is being carried out between non-compatible types. (HY000)
SQL Issued: SELECT filter( fact.Calls using "Dim Time"."Fiscal Month End Date" =VALUEOF("month_start")) FROM "Call Data"
Then i tryed the below format i am getting still the error
filter( Fact.calls USING "Dim Time"."Fiscal Month End Date" = DATE'(VALUEOF("month_start"))' )
Formula syntax is invalid.
[nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 46047] Datetime value (VALUEOF("month_start")) from (VALUEOF("month_start")) does not match the specified format. (HY000)
SQL Issued: SELECT filter( Fact.Calls using "Dim Time"."Fiscal Month End Date" =DATE'(VALUEOF("month_start"))') FROM "Call Data"
Please let me know what i am missing or what is the correct syntax for fitler using the date repository variable.
Thanks in advance
Regards
@liHi @li,
Syntax-1 is fine it will work,What kind of Variable is it?
Static or Dynamic
Thanks, -
How to use a colum value as background color in a report template
I need to use a colum value as background color of report template
es.
<td style="padding:0px;border-bottom:1px #cccc99 solid;border-right:1px #cccc99 solid;font-size:8pt;background:??????;" #ALIGNMENT#>#COLUMN_VALUE# </td>
I have a column named COLORE_VAL1
I try with:
<td style="padding:0px;border-bottom:1px #cccc99 solid;border-right:1px #cccc99 solid;font-size:8pt;background:#COLORE_VAL1#;" #ALIGNMENT#>#COLUMN_VALUE# </td>
but the value remain #COLORE_VAL1#.
Please, help me.
BarbaraYou need to change the processing type to customer exit of that variable.
Now in i_step = 1 write the following code:
Data:dt LIKE sy-datum,
zper TYPE /bi0/oifiscper,
YR type /bi0/oicalyear,
per LIKE t009b-poper.
IF i_step = 1.
WHEN 'X_FSCPRC' .---User input variable based on cmod.
dt = sy-datum.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = dt
i_periv = 'M3'---Give the fiscal year variant according to your system
IMPORTING
e_buper = per
e_gjahr = yr
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc = 0.
Concatenate YR Per into Zper.
l_s_range-low = Zper.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
endif. -
When we run query how it gets the characteristic values and attributes.
Hi,
When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
Bye
GKwhen we run the query how it checks and gets the characteristic values and attributes.
Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID.
Maybe you are looking for
-
Hi. I lost my iMac's hard drive and had a new one installed. I reloaded my old iWorks 08 software and then transferred my Pages documents from a portable HD to the iMac. The files open but the original text in them (they are journals) are in white ag
-
Adobe Photoshop CS5 (Windows 7) Lagging Brushes & Tools
What I'm Using: - Toshiba F60 Qosmio Laptop w/ Windows 7 - Adobe Photoshop CS5 (64 bit) Hey Everyone, I'm having an issue with my new Adobe Photoshop CS5 (64 bit) installed on my Brand new Laptop (Toshiba F60 Qosmio). Basically I have optimized via t
-
Creating read-only calendars for syncing
How can I create a read-only or protected calendar? Is it possible to create a calendar which, after syncing with the family computer, would be read-only, protected or non-editable, by the family computer user? Thank you, cj
-
Remote Play Connection Issues - WiFi / Bluetooth Conflict / Interference?
I have been looking forward to this feature on my Z3c and it was finally released yesterday. Connecting to my PS4 and using the touch screen controls works flawlessly. However, as soon as I connect my DualShock 4 via Bluetooth, lag and connection iss
-
Image attachments and EXIF data
Hi, It appears that when I use the iPhone to save attachments to Photos, it renames them and removes their EXIF data. So for now I have to use the MacBook and put them into iPhoto from there. Is this a known bug with Apple or should I report it? Or a