Update layout with var value
Hello all.
I have a dropdown list with values and a button on page1, and I have an layout on page2.
The problem is that I want that the layout on page2 could be updated depending on the value of page1.
Could anyone help me!!
Vitor Ramalho
you can pass the value of Page 1 to Page 2 via Navigation->SET_PARAMETER(name = 'your_variable' value = 'Value') &
then based on the value u received from Page 1, update the Page 2. can you be more specific to help you more.
TO show values in Layout use below syntax:
<%= your_variable %>
Note: DOnt forget to set the "Auto" checkbox in Page2 parameter.
Raja T
Message was edited by:
Raja Thangamani
Similar Messages
-
Updating PK with same value - effect on CASCADE UPDATE
Hello,
I would like to understand how sql server 2008 deals with cascade updates
For example I have
Parent table: Employee with column Id as varchar(20) primary key
Child table with IdEmployee as varchar(20) foreign key
I set up Cascade Update for those two tables, meaning any change to primary key in Employee table will cause update in child table rows that match affecting Id
Scenario 1:
Update Employee
set Id = 'ABC',
Name = 'something new'
where Id = 'CCC'
Result of child table: all rows with foreign key IdEmployee and value of 'CCC' are updated. Expected behavior.
Scenario 2:
Update Employee
set Id = 'ABC',
Name = 'something new 2'
where Id = 'ABC'
This time, i am doing something different. I am beside update of column Name with new value, also update primary key but
with SAME value
Question is: what is going to happen to child rows? Are they ALL going to UPDATE due to CASCADE UPDATE
So far, what i did in order to find solution is:
1. I put an timestamp column in child table that should update each time row gets updated
2. I put a trigger for update event on child table that will write something to some log table
*After I set up those two I ran example like above just to be sure timestamp gets changed as well trigger is being fired
Results of updating PK with same value:
1. Timestamp didnt change
2. Trigger didnt fire
Is this enough to make conclusion that updating primary key with same value ALONG with updating some other columns won't
affect child tables with UPDATE CASCADE ON
Update:
Database is CI AS collation
If i do following
Update Employee
set Id = 'abc',
Name = 'something new'
where Id = 'ABC'
1. Timestamp will change
2. Trigger will fire
Conclusion: Case sensitive is important here!
Thank you very much in advance
Milos>> would like to understand how sql server 2008 deals with cascade updates <<
Your posting has a number of conceptual errors.
1. The terms “parent” and “child” are not RDBMS; they are used in network databases. We have “referenced” and “referencing” tables; they can be the same table.
2. A table models a SET of things, so there is no “Employee” table unless you truly have a one-man company. We want a collective or plural name for the SET/table. A better name is “Personnel” for this table.
3. Her is no such thing as a generic “id” in RDBMS; it has to be “<something in particular>_id” to be valid. Identifiers are usually fixed length
4. It is very, very rude not to post DDL on a forum. You also do not know the ISO-11179 Rules for data element names. They do not change names from table to table! Does your name change whenever you use it in a new place?? NO! Same principle with data.
5. The ISO standard uses “<property>_<attribute property>” syntax, no the old PascalCase.
6. Why did you post a useless narrative? How do we compile “I SET up Cascade UPDATE for those two tables,..” to test it??
CREATE TABLE Personnel
(emp_id CHAR(20) NOT NULL PRIMARY KEY,
emp_name VARCHAR(25) NOT NULL,
CREATE TABLE Health_Plan
(health_plan_acct CHAR(20) NOT NULL PRIMARY KEY,
emp_id CHAR(20) NOT NULL
REFERENCES Personnel(emp_id)
ON UPDATE CASCADE
ON DELETE CASCADE,
Scenario 1:
UPDATE Personnel
SET emp_id = 'ABC',
emp_name = 'something new'
WHERE emp_id = 'CCC';
Result of child table: all rows with foreign key emp_id and value of 'CCC' are updated. Expected behavior.
Scenario 2:
UPDATE Personnel
SET emp_id = 'ABC',
emp_name = 'something new 2'
WHERE emp_id = 'ABC';
This time, I am doing something different. I am beside UPDATE of column emp_name with new value, also UPDATE PRIMARY KEY but
with SAME value.
>> Question is: what is going to happen to child [sic: referencing] rows? Are they ALL going to UPDATE due to CASCADE UPDATE. <<
SQL uses a set-oriented model, so the whole table is updated as a unit of work in theory.
So far, what I did in order to find solution is:
>> I put an timestamp column in child [sic: referencing] table that should UPDATE each time row gets updated <<
Why? It is not in the SET clause list; it cannot change. As an aside, The T-SQL TIMESTAMP is not the ANSI/ISO TIMESTAMP; it is DATETIME2(n) in T-SQL. The old TIMESTAMP is being deprecated because it stinks both in concept and implementation.
>> I put a trigger for UPDATE event on child [sic: referencing] table that will write something to some log table.<<
TRIGGERs are fired by what is called a “database event” shown in the ON [DELETE | UPDATE] clause. T-SQL adds INSERT as an event. An update to any value or to no value at all is still an update. Depending on the collation, case may or may not matter in the final
outcome.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Update column with ROW_NUMBER() value
I have a column that I would like to update with a ROW_NUMBER() value partitioned by a specific column.
CREATE TABLE ##tmp (id INT NULL,
value1 VARCHAR(10),
value2 VARCHAR(10))
INSERT INTO ##tmp (value1,
value2)
VALUES ('A', 'asdfasdf'),
('A', 'asdf'),
('A', 'VC'),
('B', 'aasdf'),
('C', 'sdfgs'),
('C', 'xdfbhsdty'),
('C', '23sdgfg'),
('C', '234')
-- update the ID column with the values below
SELECT ROW_NUMBER() OVER (PARTITION BY Value1 ORDER BY Value2),
Value1,
Value2
FROM ##tmp
I have 14 million records. Can someone explain the best way to do this? Does the ORDER BY destroy performance for this many records?
Thanks!CREATE TABLE ##tmp (id INT NULL,
value1 VARCHAR(10),
value2 VARCHAR(10))
INSERT INTO ##tmp (value1,
value2)
VALUES ('A', 'asdfasdf'),
('A', 'asdf'),
('A', 'VC'),
('B', 'aasdf'),
('C', 'sdfgs'),
('C', 'xdfbhsdty'),
('C', '23sdgfg'),
('C', '234')
-- update the ID column with the values below
; with cte as (
SELECT ROW_NUMBER() OVER (PARTITION BY Value1 ORDER BY Value2) as RowNumber,
Value1,
Value2
FROM ##tmp
update cte
set Id = RowNumber;
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com -
JCA adapter doesnt update MarkReadColumn with correct value
Hi,
I've created a JCA adapter in the SOA suite which polls a certain database. The poll works perfect only during configuration I set it to do a logical delete. My JCA looks like:
<adapter-config name="SchoolFitListener" adapter="Database Adapter" wsdlLocation="../WSDL/SchoolFitListener.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="eis/DB/SchoolFit" UIConnectionName="SchoolFit" adapterRef=""/>
<endpoint-activation portType="SchoolFitListener_ptt" operation="receive">
<activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
<property name="DescriptorName" value="SchoolFitListener.PollSchoolfitPolltable"/>
<property name="QueryName" value="SchoolFitListenerSelect"/>
<property name="MappingsMetaDataURL" value="SchoolFitListener-or-mappings.xml"/>
<property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
<property name="MarkReadColumn" value="MESSAGE_READ"/>
<property name="MarkReadValue" value="READ"/>
<property name="MarkUnreadValue" value="UNREAD"/>
<property name="PollingInterval" value="60"/>
<property name="MaxRaiseSize" value="1"/>
<property name="MaxTransactionSize" value="10"/>
<property name="NumberOfThreads" value="1"/>
<property name="ReturnSingleResultSet" value="false"/>
</activation-spec>
</endpoint-activation>
</adapter-config>When I look in the log, it does the update only with the wrong value:
UPDATE POLL_SCHOOLFIT_POLLTABLE SET MESSAGE_READ = ? WHERE (((((((((((((MESSAGE_TYPE = ?) AND (MESSAGE_READ = ?)) AND (EMPLID = ?)) AND (SF_ID = ?)) AND (VOORNAAM = ?)) AND (ACHTERNAAM = ?)) AND (VOLLEDIGE_NAAM = ?)) AND (STRAAT = ?)) AND (HUISNR = ?)) AND (POSTCODE = ?)) AND (WOONPLAATS = ?)) AND (GEBOORTEDATUM = ?)) AND (BSN = ?))
[2011-06-15T15:34:17.067+02:00] [osb_server1] [TRACE] [] [] [tid: [ACTIVE].ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: weblogic] [ecid: 0000J2JW9fx7y0G_yx0FyW1Dvr150008l6,0] [SRC_CLASS: org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism] [APP: JCA Transport Provider] [dcid: ae78371b7bf314eb:253fe233:1306f4ea111:-8000-00000000000149e2] [SRC_METHOD: executeBatchedStatements] bind => [UNREAD, C, UNREAD, SF9905731, 131983, John, Doe, John Doe, DowningStreet, 79, 57112, NY, 15-3-1994, 1234567890]Can anyone tell me why it does an update with the wrong value?
Much thanks!Found it. Marked too many fields as PK's during wizard so it couldn't find the right row for the update.
-
Best way to reuse a layout with different values?
I want to reuse the code of the <div id="placeInfo"> on the next page (place.xhtml). I simplified it's code for this question.
Of course I can use <ui:include> for <div id="placeInfo"> but on the next page I would need e.g. #{myBean.selectedPlace.name} instead of #{place.name}.
Any smart idea how to do this efficiently?
<ui:repeat value="#{myBean.places}" var="place">
<p:commandLink action="place?faces-redirect=true" ajax="false">
<f:setPropertyActionListener value="#{place}" target="#{myBean.selectedPlace}" />
<div id="placeInfo">
#{place.name}
#{place.openHours}
</div>
</p:commandLink>
</ui:repeat>Research composite components. Its a little cumbersome to do these things in jsf to be honest. I just copypaste the xhtml content most of the times. Its not like it will save you time to turn this into a reusable component.
-
How to update iterator with popup values
Hello all,
I've got a question regarding updating my iterator tableview (non-mvc bsp application). I've used some javascripting to open a popup window and retrieve the selected value back into a hidden input field on my cart page. Now, what I need to do is get the value into the appropriate field in the iterator tableview. Any ideas? (Right now, there is no event fired in the cart page after the popup is closed).
Thanks in advance,
LisaHi Lisa,
You need to fire an event when the popup closes by placing the following in the the cart page:
<bsp:htmlbEvent id = "closing_event"
name = "closing_event"
p1 = "closing_event" />
This event is fired when you close your popup by using the following JavaScript:
window.opener.closing_event('POPUP');window.close( );
Regards,
Patrick. -
Sales forecasting-updating opportunities with booked values
Hi,
we have a need where a user creates an opportunity for a large deal (say worth 6M USD) which will be realized over say 6 months. each month from the day the oppty is created say 1 MUSD worth orders will be created.
how do we incorporate this scenario in the monthly sales forecast. challenge here is that one opportunity will result into multiple orders each month. how will the sales forecast know that against the large deal of 6 MUSD, some amount is already realized/booked and it should subtract that amount from forecast report. need is to avoid double forecasting in such scenarios.
is there a standard report which takes care of such scenarios?
i am sure this is not a unique situation in almost all B2b sales this should be a need.
any pointers will be appreciated
thank you.I referenced the post below.
http://social.msdn.microsoft.com/Forums/en-US/6f68404d-82f3-4df0-b5b9-00e353cbcf68/conditional-split-expression-evaluates-to-null?forum=sqlintegrationservices
it is not working for me. I don't understand the approach of using derived column to get rid of NULLs neither. Can you help?
Thank You Warmest Fanny Pied -
How to update a column with different values but all other row values r sam
Hi,
I have a table like this.
Col1 col2 col3 col4
10 20 30
10 20 30
10 20 30
i need to update col4 with different values coming from other table like this
Col1 col2 col3 col4
10 20 30 xxxx
10 20 30 yyyy
10 20 30 zzzz
how can i update the table. pls let me know how to use the where condition in the update stmt.
thanks,
jay
Edited by: user2558790 on Nov 20, 2009 12:26 PMwhat is the logic for this kind of update...????
Greetings,
Sim -
Deleting rows with missing values in field in start routine of update rule
Hello experts,
how can I delet rows with missing values in a specific field in the start routine of update rules?
I think ABAP code should look something like this:
delete ... from DATA_PACKAGE where Z_NO = ''.
thanks in advance for any suggestions!
hizaWrite:
delete data_package where field = value.
Hope it helps.
Regards -
J_1IRG23D Table was not updated With Correct Values While Doing MIGO
Hi Friends,
I am new to the Excise duty , facing a proble in CIN -While doing MIGO, the Excise Calculation are coming correct values (i.e 10% ),but in the table it was not updated correctly (J_1IRG23D) only one entry is showing wrong ,the other entries in the table are correct.
In table -J_1IEXCDTL the EXBED it was with correct value 10% of the Base value
But In table -J_1IRG23D the EXBED,ADE,CESS It was updated with 0.06% on the base value .its gives wrong value
Kindly help in this issue.
Regards
SivaHi,
Go to T Code - J2I5 (not 215 it is j 2 i 5) enter details and select register PLA Check box and execute. This can be extracted many times - no problem.
After J2i5 balance will update in registers including tables.
Ramesh -
i am updating my airport express. However, the message comes up with Invalid value - advertising a service globally using Bonjour requires a global hostname. WHat does this mean?
thank you thank you for taking an interest. this is so frustrating.
i only have apple keyboard, mighty mouse, and 20 inch cinema display connected. this morning took out memory and tried to boot up with individual pairs in the first bank. first the (2)256, the (2) 1g, and then the other (2) 1g modules. everytime I get the weird fuzzy wheel under the logo after a while, black screen flashes, then grey apple logo fuzzy screen then black forever.
I ran tiger updates this morn. still will only boot to safe mode. then tried to run leopard disk to install it
will not boot from leopard disk.
tried safe boot, then doulble click install leopard, restart, then the saga repeats with the pixely red square around the wheel.
these are fresh drives with only what came on instll disk loaded.
thanks again for taking an interest.
i love this system(well at least i did). I want to install leopard on my powerbook too but am terrified to do so right now since it is working and I have work to do. Can't afford to have no computer to do my work on...self employment is great?!
This is making me crazy. I anxiously await your words of wisdom. -
Updating multiple rows with different values
Hi!
I have a problem. I need to update more then 1000 rows with different values. How can I do it?
For exsample i have table:
id; color, date,
1 red
2 green
3 white
I need to update date field.
Update table
set date='01.02.03'
where id=1
Update table
set date='01.03.03'
where id=2
Maybe there is way how to update multiple rows at one query?
Sorry for my bad english.
Thanks!Hi,
You can try this
UPDATE TABLE SET DATE = CASE
WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
ENDcheers
VT -
MIGO not updating with excise value.
Hey Guys,
I am facing with this problem of MIGO not
updating with excise value.
When I am creating the MIGO doc, and after
I give the excise invoice no. the excise
values are not picking up. Its showing
zero values.
The following
steps are being followed by me.
ME21N - Create STO from plant to warehouse
VL04 - Create outbound delivery
VF01 - Create invoice
J1IIN - Excise invoice
MIGO - Goods receipt at warehouse
Earlier it was working fine, but after
we upgraded the system with patches and implemented
Secondary higher education cess the
problem arose.
Please advise.
Appreciate your help.
Thanks,
ZakGot answer from SAP..dunno what they did but it was rectified.
-
How to UPDATE multiple rows in T1 with unique value from T2
Hi,
having on mind update query with where clause:
WHERE (SELECT LEFT(ColumnName,7) FROM tblName) = emp2.ColumnName
error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
What am I suppose to change in WHERE clause....
Note: there is always unique value in T2 while, in T1, there could be both, only one value to be updated or number of them that all need to be updated with that unique value from T2 (alias emp2)
T1
T2
colimn1 column2 column3 column4
001A001A string1 001A001 string10
001A001B string2 001A005 string20
001B005A string3
001B005B string4
001B005C string5
should become:
T1
colimn1 column2
001A001A string10
001A001B string10
001B005A string20
001B005B string20
001B005C string20
UPDATET1
SET column2 = emp2.column4
FROM T2 as emp2
WHERE (SELECT LEFT(column1,7) FROM T1 = emp2.column3Hi daredevil3011,
Based on my test, the error is caused by where statement in the query. Just as the error message, in your where statement, there is a subquery “SELECT LEFT(ColumnName,7) FROM tblName” follows ”=”, this is not permitted in SQL Server.
To fix this issue, please modify your query to like below:
UPDATE T1
SET column2 = emp2.column4
FROM T2 as emp2
WHERE LEFT(column1,7) = emp2.column3
Reference:
WHERE (Transact-SQL)
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Importing a text file with variable values into web reporting
Hello,
I'm looking for a possibility to import values from a text file into a variable selection in Web reporting.
With BEx reporting in Excel this is possible, by clicking on the multiple selection button in the variable popup screen, and subsequently selecting the "Import from Text file" button.
However, this function seems not to be available for web-reporting...
It would be great if someone could help me out with this!
Thanks & regards,
ArvidHi,
we could resolve this issue, so i thought it may also be helpful for others:
In our example we used a file with numbers for materials. This file is stored somewhere in a directory, to which SAP BI must have authorization to read.
The file looks something like this:
4711
4712
4713
4714
The file is named "import.txt" and lays in directory "/usr/sap/EC6/files/bi/"
*& Include ZXRSRU01
* global variables
Data: intern_range LIKE LINE OF i_t_var_range,
l_s_range TYPE rsr_s_rangesid,
line(100) TYPE c,
p_file(128) TYPE c,
length_rangelow type i,
tmp_rangelow like l_s_range-low.
* internal tables for selection-transfer from transaction
* Data: BEGIN OF it_file occurs 0,
* it_p_file(128) TYPE c,
* END of it_file.
IF i_step = 1.
** variables can be changed or set before pop-up appears
CASE i_vnam.
* take material from external file to selection-list
WHEN 'ZSD_UPMA'.
** call of transaction, with which the path can be set
*CALL TRANSACTION 'ZBW_VARIABLE' using it_file
*MODE 'A' " call should be visible, so that variable can be set
*UPDATE 'S'. " first transaction, then processing
** Der Pfad, der in dem Selektionsbild eingegeben wird, wird an die Variable übergeben
** Der Set-Parameter ist in Report ZSD_SELECT_VARIABLE
* get parameter id 'VAR' field p_file.
p_file = '/usr/sap/EC6/files/bi/import.txt'.
* further handling of variable in BI
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
READ DATASET p_file INTO line.
WHILE sy-subrc = 0.
IF line(2) <> '//'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = line.
* fill with leading Zeros
* in variable tmp_rangelow the value from l_s_range-low is taken
tmp_rangelow = l_s_range-low.
* read the length
length_rangelow = strlen( tmp_rangelow ).
* in our case: material has 18 characters
while length_rangelow lt 18.
CONCATENATE '0' tmp_rangelow INTO tmp_rangelow.
length_rangelow = length_rangelow + 1.
endwhile.
* initialize l_s_range-low
clear l_s_range-low.
* set with filled values
l_s_range-low = tmp_rangelow.
* transfer to structure
APPEND l_s_range TO e_t_range.
ENDIF.
READ DATASET p_file INTO line.
ENDWHILE.
ENDIF.
CLOSE DATASET p_file.
ENDCASE.
ELSEIF i_step = 2.
** in step 2 all variable values from pop-up input can be processed or
** User Exit variables can be derived
* UserExit Ende.
ENDIF.
Hope i could help!
Best regards,
Tobias
Maybe you are looking for
-
How to make iTunes recognize the music library in my external hard drive after instaIling Yosemite? I tried re-setting the media folder location, but it didn't work. What else should I do?
-
E-mail error: Cannot Send Mail: The sender address was invalid
I can receive e-mail but cannot send it. Everything goes to my outbox. I did not change any settings. Nothing has changed that I know of. For months I could send e-mail -- now I cannot. I even e-mailed myself, and it says the sender address is invali
-
ITunes Radio says No Content.
ITunes Radio says No Content. It was functioning properly but is no longer. Anyone know how to fix that? Thanks in advance.
-
Semi-colon in URL from WebLogic 7.0
Hello, We're running WebLogic 7.0 SP1 on two Sun Solaris 8 boxes clustered together with JDK 1.3.1_04 and all the necessary Sun patches to suite. The problem I have is that quite a few of our URLs are hardcoded to have a question mark (?) to begin a
-
i've read the command line admin guide and have tried dscl and dsimport to handle LDAP account creation, but i was wondering about how others perform these tasks. are there "best practices" to follow in mass account creation? do you have any recommen