How to dynamically update the Table?
Hi All,
Hope somebody will help me out ot resolve my issue.
In my application, about 10 analog channels data coming in. Out of which two parameter needs to get updated dynamically on the table. (For each Rpm between 500-1000, in steps of 50, have to capture Pressure points & show it on the table.)
I seen there is one method called table method available which helps to set the value of a particular cell specified by corresponding row and column index.
I tried this. In row 0, col 0 & col 1 it put what value I specified by using that table method. when it goes to row 1, col 0 & col 1 also got updated but vanishing the above put row 0, col 0 & col 1 values. so at any point of time, I am able to see only the current row values.
Hope there should be some dynamic refreshing method available or else I dont know how to handle this situation. Pls. clarify.
Thanks,
Kousy
Hi,
Thanks.
But I am not able to update dynamically.
I just done slight changes to your update.vi. Just run Update_1.vi and after update
button is pressed, change the row, col index to see the update. please note
it is not able to update if matrix exceeds 3x4. i.e set row index=3
col index=0; new cell value = 10. it is not updating.. it might because of initialization
of 3x4 matrix values at the start.. ot the way I am trying out is bad?
By using Table method itself I got the solution what I want. I have attached that vi too.
just check out and reply if any flaw..
Thanks,
Kousy
Attachments:
update_1.vi 94 KB
Table Update.vi 96 KB
Similar Messages
-
How to dynamically change the table name for a update statement
Hi All,
I need to update a coulumn xyz in either of tables abc and efg based on some condition.
I wrote a cursor which has union of two queries(one querying abc and other efg)
Now based on some inparameter only one will be executed at a time.
And based on some condition a coulumn xyz needs to be updated which is in either of the table.
As the update condition is same
Update abc/efg set xyz=data where condition
I am looking to initialize a variable like v_tname based on some condition and update like
update v_tname .........
(Exactly that may not be like so, But looking a technique like this)
Please helpIf there is only two tables you'll need to update then you are better off using static SQL and implementing something like this instead:
DECLARE
update_condition BOOLEAN;
BEGIN
-- initialize update_condition
update_condition := <some_boolean_check>;
IF update_condition
THEN
UPDATE abc
SET xyz = some_val
WHERE some_col = some_other_val;
ELSE
UPDATE fgh
SET xyz = some_val
WHERE some_col = some_other_val;
END IF;
END;
/Hope this helps! -
How can I Update the table so that....
I have a table XYZ with values like
x y
1 null
1 null
1 null
1 null
2 null
2 null
3 null
4 null
4 null
4 null
I want to update my table so that the values for column y appears the serial no for the given x. The output would be like
x y
1 1
1 2
1 3
1 4
2 1
2 2
3 3
4 1
4 2
4 3
How can I write the Update statement?SQL> CREATE TABLE t (x INTEGER, y INTEGER)
Table created.
SQL> INSERT INTO t
VALUES (1, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (1, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (1, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (1, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (2, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (2, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (3, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (4, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (4, NULL)
1 row created.
SQL> INSERT INTO t
VALUES (4, NULL)
1 row created.
SQL> UPDATE t t1
SET y =
(SELECT l
FROM (SELECT ROWID rid,
ROW_NUMBER () OVER (PARTITION BY x ORDER BY NULL) l
FROM t t2)
WHERE t1.ROWID = rid)
10 rows updated.
SQL> SELECT *
FROM t
X Y
1 1
1 2
1 3
1 4
2 1
2 2
3 1
4 1
4 2
4 3
10 rows selected. -
How to dynamically change the table name inside a view
Hi All,
create table t_auto_feeds
id number,
table_name vachar2(100));
insert into t_auto_feeds values(1,'T_FEED_POSITIONS');
insert into t_auto_feeds values(2,'T_KAP_MTM');
assume there are 100 records on id=1 in T_FEED_POSITIONS and 100 records of id=2 in T_KAP_MTM (id 1 is present only in t_feed_positions & id 2 is present only in t_kap_mtm)
i need to create a view such that it needs to give the count of records based on the id
create or replace view aa_view as
select count(*), id from t_feed_position group by id
union
select count(*), id from t_kap_mtm group by id;
I am getting a proper result when i query the view like select * from aa_view where id=1 but will the other union query seems to be a overhead?. I am having 10 such tables configured for different id in t_auto_feeds.so do i need to put 10 unions or is there a better way to handle this stuff.
I know i can use a PLSQL block and dynamically build view structure, the problem is the view itself is configured in a table , so i cant write a proc for this.. can this aa_view be modified such that it queries only the table(using the t_auto_feeds ) which matches the id rather than the entire list.
Kindly help me in this regard and let me know in case u need any further information from my side.>
so do i need to put 10 unions or is there a better way to handle this stuff.
>
Yes - you need 10 unions
Yes - there is a better way so that only one of the 10 queries does anything.
You can use SYS_CONTEXT to control the query selection.
Here is an example of using SYS_CONTEXT. Try this code in the SCOTT schema.
create or replace context VIEW_CTX using SET_VIEW_FLAG;
create or replace procedure SET_VIEW_FLAG ( p_table_name in varchar2 default 'EMP')
as
begin
dbms_session.set_context( 'VIEW_CTX', 'TABLE_NAME', upper(p_table_name));
end;
select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
select * from emp2 where 'EMP2' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
exec set_view_flag( p_table_name => 'EMP' );
exec set_view_flag( p_table_name => 'EMP1' );
exec set_view_flag( p_table_name => 'EMP2');
SELECT sys_context( 'VIEW_CTX', 'TABLE_NAME' ) FROM DUAL
CREATE VIEW THREE_TABLE_EMP_VIEW AS
select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
union all
select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
union all
select * from emp2 where 'EMP2' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
SELECT * FROM THREE_TABLE_EMP_VIEWNote that you set the context for the table you want. This doesn't have to be a table name it could just be flag value
-- use the emp table
exec set_view_flag( p_table_name => 'EMP' );
-- ue the emp1 table
exec set_view_flag( p_table_name => 'EMP1' );
-- use the emp2 table
exec set_view_flag( p_table_name => 'EMP2'); -
How can I update the table with a single query for...
I have a table with columns C1 and C2.
C1 C2
A1 null
A1 null
A1 null
A1 null
A2 null
A2 null
A2 null
A3 null
A4 null
A4 null
I want to update my table with a single query so that I would have data like
C1 C2
A1 1
A1 2
A1 3
A1 4
A2 1
A2 2
A2 3
A3 1
A4 1
A4 2
The updated column C2 has the values like serial no grouped on the column C1.SQL> create table mytable
2 ( c1 varchar2(2)
3 , c2 number(2)
4 )
5 /
Tabel is aangemaakt.
SQL> insert into mytable (c1)
2 select 'A1' from dual union all
3 select 'A1' from dual union all
4 select 'A1' from dual union all
5 select 'A1' from dual union all
6 select 'A2' from dual union all
7 select 'A2' from dual union all
8 select 'A2' from dual union all
9 select 'A3' from dual union all
10 select 'A4' from dual union all
11 select 'A4' from dual
12 /
10 rijen zijn aangemaakt.
SQL> select * from mytable
2 /
C1 C2
A1
A1
A1
A1
A2
A2
A2
A3
A4
A4
10 rijen zijn geselecteerd.
SQL> merge into mytable t1
2 using (select c1
3 , row_number() over (partition by c1 order by null) rn
4 , rowid rid
5 from mytable
6 ) t2
7 on (t1.rowid = t2.rid)
8 when matched then
9 update set c2 = rn
10 when not matched then
11 insert values (null,null)
12 /
10 rijen zijn samengevoegd.
SQL> select * from mytable
2 /
C1 C2
A1 1
A1 2
A1 3
A1 4
A2 1
A2 2
A2 3
A3 1
A4 1
A4 2
10 rijen zijn geselecteerd.Regards,
Rob. -
How can i dynamically update a table in my program?
Hi there!
I would like to know if anyone can assist me with advice on how to dynamically update
a table within my program, with new values from the database?
Thanking You all.Add rows to its model.
Kind regards,
Levi -
FM to update the table HRPAD25
Hi All,
Is there any FM to update the standard table HRPAD25? I need to update the values entered by the user on the LSO Followup screen in this Table. I have enhanced this screen in LSO_PSV2 with an additional field 'Score'. How do i update the table HRPAD25? Is there any BADI or FM to do this. Any input on this will be of great help.
Thanks and regards,
PavithraHi Eric,
I do have some similar kind of requirement where in i am asked to use the IDOC COND_A02. The point where i am stuck is in populating the custom segment field values which we need to be passed with the IDOC. I am able to execute the IDOC from WE19 but both the exits EXIT_SAPLVKOE_001 and EXIT_SAPLVKOE_002 were not getting triggered.
We need this IDOC to be generated whenever there is a change in the Pricing Conditions (PB00 DISC1 DISC2). Please let me know how can i populate the custom segment values and trigger the IDOC.
Good Day,
Thanks & Regards,
Uday S. -
How to update the table when change list item in classic report
hi ,
i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
my question
1- how to do this by javascript and get the value from list item and update the table with new value
2- is i must use API to create list item so i can get the value of item in report or what.
Thanks
AhmedI coded the following to give you direction:
1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
<script language="JavaScript" type="text/javascript">
function updateTable(pThis)
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
</script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value. -
How to update the table value in the valuechange event?
I have an input field in the datatable with the valueChangeListener
<rich:dataTable id="cart" value="#{cart.cartList}" var="item">
<h:inputText value="#{item.cost}" id="qty" valueChangeListener="#{items.updateCost}" onchange="submit()">
<h:outputText value="#{item.errorMsg}"> </h:outputText>
in the backing bean
Item item = (Item) model.getRowData();
// do some update, if the cost too larger, change to max_cost
item.setCost(max_cost);
item.setErrorMsg("Error Msg");
After calling the valuechange method, the screen output doesn't update the cost.
How to update the table value in the valuechange event?As you're misusing the valueChangeListener to set another input field, you need to skip the update model values phase. Otherwise the value set in the valueChangeListener will be overridden by the submitted value. You can do this by calling the FacesContext#renderResponse() inside the valueChangeListener method. This will shift the current phase immediately to the render response phase, hereby skipping the update model values and invoke application phases.
-
How to write a procedure for update the table
Hi all
can any body please tell me how to write a procedure to update the table......
I have a table with about 10,000 records...........Now I have add a new column and I want to add values for that like
registration Code Creidits
13213 BBA
1232 MCS
I had add the creidit now i want to update the table.........the new value want to get by SQL like
Creidit = select creidit from othere_table...........
Hope u can understand my problem
Thanks in advance
Regards
Shayan
[email protected]Please try the following --
update Program_reg a
set TotalCreidit = ( select tot_cr <Accroding to your logic>
from Program_reg b
where a.Registration = b.Registration
and a.Enrollment = b.Enrollment
and a.code = b.code
where a.Registration in ( select distinct Registration
from Program_reg );
N.B.: Not Tested....
Regards.
Satyaki De. -
How can i update the REMARK field in ADRT database table
Hi all,
How can i update the REMARK field in ADRT database table
By using Function modules or BAPIs
Please reply me fastHi,
you can try this code:
SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
IF sy-subrc = 0.
CLEAR adrct.
SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
IF sy-subrc = 0.
adrct-remark = wa_remark.
MODIFY adrct.
ENDIF.
ENDIF
best regards,
Thangesh -
How can I update the trigger table?
I need a insert trigger on a table and also wants to insert the result value in one of its field.
it gives mutating error........
so wots the way of updating it? how can i update the same table.For example like this (inside the BEGIN/END section of the trigger):
:NEW.Col2 := :NEW.Col1;
C. -
How can i update the ADRT table REMARK field
How can i update the ADRT table REMARK field
by using only function modules or BAPI's not by direct update's
please help me
i need it urgentlyHi,
you can try this code:
SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
IF sy-subrc = 0.
CLEAR adrct.
SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
IF sy-subrc = 0.
adrct-remark = wa_remark.
MODIFY adrct.
ENDIF.
ENDIF
best regards,
Thangesh -
If record is in application server how do u update the single table
hi
could anybody tel me
if record is in application server how do u update the single table
by using direct input methodIf your Flash player/plugin is older, the only way is to go to Adobe's site (use Limnos' link) and download the full installer. A .DMG file, which you doubleclick to have it mount on the desktop. Inside is the Flash installer app you doubleclick to run and have it upgrade all. Will need an Admin user account.
After you've upgraded to the latest & greatest, currently 11.5.502.110, a Flash perfpane will show up in System Preferences, where you can set it to auto-update itself, warn you of new updates or manually check for same. -
How to find program/TCODE which has updated the tables
Hi All,
Is there any way to find out program or transcation which has updated the tables.
BR
Kamalyou can see in the table CDHDR or CDPOS which will give you the transaction code and program names.
Regards,
Krishna
Maybe you are looking for
-
Balancing field "Profit Center" in line item 001 not filled...ERROR
Dear All, We wan to make Down payment thru F11O, following steps were followed First Step: We created noted item thru T.code: F-47 Second Step: In APP, we got error Balancing field "Profit Center" in line item 001 not filled Can you pls give solution
-
GL Field Status Validation @ PO Creation
Hi Gurus, We are facing the issue summarized below:- In FI, itu2019s set up that internal order field as mandatory for GL account 38701404. This is achieved via the field status group at GL account level. However, with indirect procurement, itu2019s
-
Hi my Snapz pro X and WireaTap Studio don't record sound in OS Yosemite
Hi my Snapz pro X and WireaTap Studio don't record sound in OS Yosemite. Why? What shall I do to fix it? Best regards Lars B. <Re-Titled And Email Edited By Host>
-
Fill a field at the btadmini context node
Hi experts Iu2019ve to fill the field ZZCURVAMAT at the btadmini context node when I put a product in the order item. Iu2019m trying to fill that field in the get_ordered_prod method with the code below: CALL METHOD lr_entity->if_bol_bo_property_acce
-
Adobe Application Manager - updates cannot be installed
Dear guys, pls help me with the following problem: This message has appeared for a while now! THX! Robert