Update table on change of field detected by javascript
Good afternoon HTML DBers.
I am not familiar with Javascript...and I think I will need it to solve the following problem...and so I have posted this request.
I have a multi line report with one updateable field in each row(a quantity field). When the user updates this field on any of the rows, I wish to update an oracle table with the new quantity value.
From my reading, I suspect that I may need some 'OnChange=' javascript to pick up when the field is updated.
Then I guess I would somehow set up a REQUEST value that I would identify in a process to do the UPDATE of the table.
But how do I send the unique key (the order number) of the row where the quantity value has been changed?
Thankyou in anticipation. Tony Calabrese. 27/9/2004
Forget javascript, Tony.
The MRU mechanism updates what needs to be updated provided you submit the page. Then, after updating the fields, you may branch to another page or reload the current one (by branching to the same page number).
Javascript works on the client side, your data is stored on the server side, so, in general, it's very hard to update the server side with client data unless you submit a form.
MRU works fine, don't be scared by the need of reloading the page.
Bye,
Flavio
Similar Messages
-
Function Module for updating Username( last changed by field)-
Hi,
Do we have any standard RFC function modules/BAPI available for updating a field in R/3 ( for eg:"last changed by field" of an item of a notification(plant maintenance).
As the FM is an RFC FM, it always updates this field with the RFC user name.My requirement is to update this field by a value(user name) which is either keyed in in the FM or an SAP login name.
This requirement is for a scenario in the mobile application as I need to update the notification item details by the user(mobile user- the mobile user name is available in R/3 also.) who is updating the notification item in the mobile.When synchronisation is done ,the filed gets updated by the RFC username which is used to exceute the BAPI wrapper..
Do we have an option to change the user name?
Regards,
Muralikrishna THi
try these.
READ_TEXT_INLINE-Like READ_TEXT. In addition, it passes the first few text lines to a second lines table.
EDIT_TEXT_INLINE-----Merges the inline lines with the other text lines and calls the text editor.
Thanks,
usha -
Updated Table Name Changes Applescript Operation in Numbers 3.5
I've been using Applescript in Numbers for some time to copy/paste data (set cell values) from one sheet table to another sheet table.
My original script was heavily cribbed from something Yvan Koenig had posted 2-3 years ago.
I recently updated to Yosemite and Numbers 3.5 after testing to ensure my original script remained functional (and it did).
I subsequently updated my source data table by duplicating my old table and editing this new source.
I then updated my Applescript to to reference the new source table.
Testing yielded a good functional result, but Numbers changed its behavior by displaying its work while setting values in the target sheet table.
This obviously slows the script down and adds measurable processing time given the amount of data being moved.
Does anyone know how I can prevent this behavior from occurring?
I don't believe I changed anything material in my original script so I'm really not sure why Numbers changed its behavior.
I have included my script below. Thanks very much for any help!
property the_goods : {}
property patient_name : {}
property patient_count : {}
property run_date : {}
on run
set sheet_source to "1500 EXPORT"
set table_source to "OA Data"
set column_source to 1
set row_source to 2
set sheet_destination to "CLEARING HOUSE EXPORT"
set table_destination to "Export Table"
set column_destination to 1
set nb_rows to 0
set nb_columns to 244
set patient_sheet to "SESSION DB"
set patient_source to "User Input Table"
set patient_tracker to "Tracking Table"
set source_column to 3
set source_row to 2
set destination_column to 2
set date_column to 3
set patient_count_column to 3
set patient_count_row to 3
set run_date_row to 5
tell application "Numbers"
set document_source to name of front document as string
set document_destination to name of front document as string
end tell
tell application "Numbers"
tell document document_source to tell sheet patient_sheet to tell table patient_source
set patient_count to value of cell patient_count_column of row patient_count_row
set run_date to value of cell patient_count_column of row run_date_row
end tell
end tell
set row_destination to patient_count
tell application "Numbers"
tell document document_source to tell sheet sheet_source to tell table table_source
set the_goods to value of cells column_source thru (column_source + nb_columns) of rows row_source thru (row_source + nb_rows)
end tell
tell document document_destination to tell sheet sheet_destination to tell table table_destination
set r to 0
repeat with one_row in the_goods
tell row (row_destination + r)
set c to 0
repeat with one_value in one_row
set value of cell (column_destination + c - 0) to one_value
set c to c + 1
end repeat
end tell
set r to r + 1
end repeat
end tell
tell document document_destination to tell sheet patient_sheet to tell table patient_source
activate
end tell
tell document document_destination to tell sheet patient_sheet to tell table patient_source
set patient_name to value of cell source_column of row source_row
end tell
tell document document_destination to tell sheet patient_sheet to tell table patient_tracker
set value of cell destination_column of row row_destination to patient_name
set value of cell date_column of row row_destination to run_date
end tell
end tell
set the_goods to {}
set patient_name to {}
set patient_count to {}
set run_date to {}
end runHere is a simple example that copies values from a source row 3 in Table 1 to a target row 5 in Table 2.
On my aging MBA it was very fast (about a second) with 150 columns.
In addition to speed, an advantage of this approach is that you don't have to code table dimensions; the target table will expand automatically if needed.
Save the script in a script folder (in my case ~/Library/Scripts/Applications/Numbers) and run it from there by choosing it from the script menu. (Running it from Script Editor will paste the values into Script Editor instead of into Numbers as you want).
If keeping the original number format is important, substitute 'formatted value' for 'value' in the script.
SG
property src : {d:1, s:"Sheet 1", t:"Table 1", r:3}
property tgt : {d:1, s:1, t:"Table 2", r:5}
tell application "Numbers"
tell document (src's d)
tell sheet (src's s)
tell table (src's t)
tell row (src's r)
set vv to cells's value -- makes AppleScript list
set the clipboard to my makeTSV(vv)
end tell
end tell
end tell
end tell
tell document (tgt's d)
tell sheet (tgt's s)
tell table (tgt's t)
set the selection range to row (tgt's r)'s cell 1
tell application "Numbers" to activate
tell application "System Events" to keystroke "v" using {option down, shift down, command down}
end tell
end tell
end tell
end tell
to makeTSV(aLst) -- turns AppleScript list into tab-delimited string
set oTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to tab
set tsvStr to aLst as text
set AppleScript's text item delimiters to oTID
return tsvStr
end makeTSV -
How to check which fields of a table are changed
Hi
I have a FM in which i pass VBAK and VBAP. I store records of table in internal tables and update the values during execution and at the end of this i have to cpmare VBAK and VBAP with internal tables to chcek which field value is changed in both VBAK and VBAP. Its not possible to check all fields bcause there are so many fields in VBAK and VBAP. Can any body help me.
Thanks and Regards
AdityaHi,
Try using where used list.
click on the field. pree F1. select Technical Info from the pop-up. then from the field data, double click one the field name. it will navigate to the table/structure where the field is used. double click on the field there or
press CntrlShiftF3.
It will give you the where used list.
Pls reward poins if useful.
Regards,
Chandru -
Update BDCP table custom infotype custom field
Hi All,
I have created a custom infoype and added a custom field with in this infotype.
I have clicked change document button for the dataelement.
When i changed the value with in that infotype the entry is not updating in table BDCP.
When i changed the value in standard infotype the value is updated in table BDCP table.
Is it possible to update the BDCP table for custom infotype custom field.
If yes please let me know the procedure.
Thanks,Hi Tarangini,
Check the below transactions once again:-
BD61 - To activate the Change Pointers
BD50 - Activate the change pointer for the message type
BD52 - To include the fields which needs to be tracked
BD66 - Maintain Segment field and change document field.
Check all the above transactions once again and you could resolve the problem.
Thanks,
Mahesh. -
Updating database table for 'CHANGE' and 'ADD' buttons.
Hi,
I am working on module pool program. Here i am using table control.Below is my requirement:
1) I have designed a selection - screen with 'CHANGE' and 'DISPLAY' buttons and in screen 100 i have 'ADD' and 'SAVE' buttons.
2) when i click on 'CHANGE' , it will move to screen 200 here i need to change quantity field for that particular record which is in table control.once i change the field value and click on 'SAVE' a message should be populated that "RECORD IS SAVED' and this record should be updated in database table with new quantity field value and it should return back to my selection screen.
3) When i click on 'ADD' , it should display already existing records in disable mode and a new line should be added inorder to enter new records. Once i enter the data and click on SAVE, this new record should be saved in the database table along with existing records.
Kindly suggest me a sample code for this as am new to table control in module pool programming.Hi Gaurav,
I've a similar problem!! any solutions to your problem!! -
Database table not updating with the changes
Hi friends,
Iam having a tablecontrol where iam gettting the data from the ztable for a particular key field. When i change certain fields in the table control and when i click save, it should update the changes in the ztable.
module save output.
modify zslip_po1 from table x_po1_slip.
here slpno is the key field. if I change a field for a particular slpno it should update the changes for that slpno value only.
but it is not updating the changes. although iam setting the slpno field dynamically.
Please give me ideas.
thanks and regards
Murali Krishna THi,
1. Have 2 Internal Tables, the first one must contain the original data(before change ) and the second one contains the update data(after changed ie. table control data).
2. loop the first table and read the data from the second table using index.
3. inside the loop, compare the work area of both the internal table.
if both are same, then no change was made to that particular record, so no need for updation
if both are not same, then some changes were made on that record, so need to update.
4. use modify command to update that particular record from the work area.
i think in performance wise also this logic will be helpful, since we are updating only the changed record.
since this is addon table, so i hope the no of records will also less, so no need to worry about loop.
check with this, it may work out......
thank you,
SenthilPandi C
Edited by: SenthilPandi ChandraSekaran on Feb 4, 2010 5:36 PM -
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. -
Can we change the fields of database unique index in a customised table?
Hi all..
I want to know that can we create or change or delete the database unique index of a customized table?
In my case, there is a customised table with 4 primary keys with all the records to be maintained thru transaction code SM30.
There is database unique index maintained for this table which has 2 fields. These 2 fields are out of the 4 primary fields of the table.I hope I have made myself clear!
Now when I am trying to insert a record in the table it give me a short dump.( It says duplication of records is not allowed)
The reason being that the new record that I am trying to insert in the database table has those 2 fields for which the unique index is maintained is the same as an already existing record.And the other two fields are different from the already existing record.So overall the combination of the 4 primary fields is different.
Please tell me how shall I proceed now?
I also tried to change the Unique index but it is asking me some kind of authrization(You are not authorized to make changes (authorization object S_DEVELOP)).Also I am not sure whether changing the unique index is feasible or not.?
Thanks.hi
I think you will not be able to do unique indexing withou the help of primary keys,so use all the primary keys into the table field selections and and then create indexing otherwise dupilication of keys can occur. if you are not able to keep the primary keys then go for non unique key indexing,where you have to add the client field and the any keys of your wish. -
How to find the user who has changed a field in a table
Hello
Someone has changed a field cost center in my table so i need to find the user who hav changed it.Can anyone tel me how to find it.
RegardsHI ,
Create a Z test program using the particular table and filed .
Now goto SE38 and execute the program " RSDEPEND "
give the ur test program and then execute . u will get the list of the last change of ur program
( table and fields used inthis program)
Another way :
for data element :
refer table
DD04L and get the user name
for domain
DD01L
Edited by: shambhu sharan pandey on Nov 13, 2009 5:49 AM -
How do I create a dynamic table in the form for auto field detection?
I am new to Acrobat. We need to create a form template that contains dynamic table control so that it can be populated using auto field detection.
Our dynamic table contains reimbusement information, the rows vary from one claim to another.
Please help. We are having Acrobat 9 Pro.
Thanks
PrasadhA lot is possible. There is a scripting language which should fill the gaps of missing features. There is data merge, there is XML, there is InCopy. Read everything about it and you will surely find what you need.
-
How to change the Field Symbol, so Adobe Forms takes it as a Table?
Hi guys,
I created an Field Symbol, in a Interface which I use for Adobe Forms. The type of the Field Symbol is STANDARD TABLE, and this field symbol I fill with data from another program.
But the problem is that in adobe forms, this Field Symbol is taken as TEXT FIELD and not as Table... and this shows me a Dump because it can't convert Internal Table to type C (the dump is like that).
What I need, is how to change the Field Symbol, so Adobe Forms takes it as a Table?
I looked at Adobe Form, and found this:
The Type Category of the Field Symbol is DICTIONARY TYPE and I think I need to change it to Internal Table as shown in the right picture.
Does someone have any idea?Hello Taly,
To what i understand your requirement, you need to pass data from Field symbol to internal table in Adobe form.
You have done it correct partially. I have replicated your scenario and steps are below -
1) Create a Z structure
2) Create Z Table Type
3) Create Adobe Interface with Table & Field Symbol. Also do coding as shown to assign the internal table populated in driver program to filed symbol.
4) Design Form as -
5) Code driver as -
*& Report ZR_AF_FS_1
REPORT zr_af_fs_1.
DATA: fm_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_outputparams TYPE sfpoutputparams,
it_kna1 TYPE ztt_fs_1.
* Sets the output parameters and opens the spool job
CALL FUNCTION 'FP_JOB_OPEN' "& Form Processing: Call Form
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---- Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' "& Form Processing Generation
EXPORTING
i_name = 'ZAF_FS_1'
IMPORTING
e_funcname = fm_name.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*-- Fetch the Data and store it in the Internal Table
SELECT kunnr name1 name2 adrnr FROM kna1 INTO TABLE it_kna1 UP TO 15 ROWS.
* Language and country setting (here US as an example)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
*&--- Call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
it_data = it_kna1
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---- Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* E_RESULT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
6) Output -
BR. -
Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
I am using this code :
<HTML>
<HEAD>
<SCRIPT>
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length;
for(var i=0; i<colCount; i++ ) {
var newcell = row.insertCell(i);
newcell.innerHTML = table.rows[1].cells[i].innerHTML;
switch(newcell.childNodes[0].type) {
case "text":
newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select-one":
newcell.childNodes[0].selectedIndex = 0;
break;}}}
function deleteRow(tableID) {
try {var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(null != chkbox && true == chkbox.checked) {
if(rowCount <= 2) {
alert("Cannot delete all the rows.");
break;}
table.deleteRow(i);
rowCount--;
i--;}}}catch(e) {alert(e);}}
</SCRIPT>
</HEAD>
<BODY>
<INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
<INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
<TABLE id="dataTable" width="350px" border="1">
<TR>
<TD width="32"></TD>
<TD width="119" align="center"><strong>Activity</strong></TD>
<TD width="177" align="center"><strong>Cost</strong></TD>
</TR>
<TR>
<TD><INPUT type="checkbox" name="chk"/></TD>
<TD>
<select name="s1" id="s1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</TD>
<TD><input type="text" name="txt1" id="txt1"></TD>
</TR>
</TABLE>
</BODY>
</HTML>Hi,
Let me make sure u r working with table control.
First u have to create a event(VALIDATE) to do the validation.
Inside the event,
1. First get the current index where user has pointed the curson
2. Once u get the index read the internal table with index value.
3. Now u can compare the col1 and col2 values and populate the error message.
1. DATA : lo_elt TYPE REF TO if_wd_context_element,
l_index type i.
lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
CALL METHOD LO_ELT->GET_INDEX( RECEIVING MY_INDEX = l_index.
above code should be written inside the event.
Thanks, -
CSV upload and update table fields
Hi,
Is there any way to update any field of the underlying table from HTMLDB while importing the CSV file?For e.g, if there are XYZ table have 200 ermployee where empno is primary key.
Once we upload the data from CSV its fine.Now after 2 weeks i need to update the sal and ename corresponding to the previous 100 employees only.So now when i trying to update the data a unique constraints violation occurs since the empno have already present so my concern is that -- how to get out of this problem specially when updation of huge no. of records needed and also no updation required for some records already present?Do the CSV update be helpful on that circumstances?
One thing we can do that we can track down the list of 100 employee whose information going to be updated.Put those info in excel and add rest 100 emplyee to that excel and again doing the CSV upload ?
This is a huge issue and not only the tedious task but also errorprone and that task will be increased with the amount of data increasing in the table.
Please anyone can suggest ?
Regards,
ROSY.The best way to solve your problem is next way.
1º) Save the file with the data to import like a BLOV ITEM.
Ok it can be done. CSV placed on BLOB data field.2º) Make a procedure to manage this BLOV item that can be fired by user pushing a buttom. (you can do it easy from HTMLDB).
how to manage ? What need to be fire to push the CSV to the target table with the actual field population ?3º) Into this procedure insert the records freely and dont worry for anything more. (maybe you can be worry about duplicate records is so, only, into this same procedure make any pl/sql lines to be sure record is not duplicate before insert)
? ? ? If the data already exist it should be needed to truncate before insert that is not my reqr rather the existing data should be updated based on PK if any chages occurs in the CSV fo that data.4º) after you are sure the insert work properly and if you need any other treatment to record, with a trigger in the table or calling any other procedure from the same trigger make the traeataments that you need.
that can be done highly .......before insert trigger.Remember. Dont put any commit.
sure.......5º) Go down from horse. Dont take coffe or Tea in exceed. And remember all we are the same, people that only want go to eat with childs in week-end.
i m in land no way to go down........nothing i take ya eat & eat much ....but this is not the right place for making comments about Weekend....Regards and good luck.
anyway embargo starts...........enjoy Cheers...........Wish u All Hp XMas... -
Is there a function module or BAPI to change the field UVP03 in table VBUP
When certain conditions are in place I need to change the value of VBUP-UVP03 (items reserve status 3) to a value of C).
there must be a FM or bapi to do this - thanks.
ScottWe had to do this from a custom program that runs in a batch job. It changes a field in VBAP using the BAPI_SALESORDER_CHANGE - that in turn will execute a user exit called userexit_set_status_vbup, that we added code to update the field vbup-uvp03. it works.
Maybe you are looking for
-
Error in Accessing AQ Anydata queue containing LCRs from JMS
Hello, I tried to access Anydata queue containing LCRs (captured by oracle stream capture process) configured in Oracle 10g 10.2.0.3.0 from JMS. I am getting following error: oracle.jms.AQjmsException: JMS-225: Invalid JDBC driver - OCI driver must b
-
Daisychain my old Cinema Display
Hi Is it possible to connect my old cinema display to my new Thunderbolt drive and then chain that to my MBP which only has one Thunbderbolt port? Currently the Cinema display has a Thunderbolt adaptor and works fine through the Tunderbolt port conne
-
Crstal Reports XI - Crosstab Report - Displaying Dates (Cashflow)
Hello I was wondering if any one would be able to help me with an issue I'm having. I need to create a cashflow report at the moment I'm trying with a crosstab report (this may be the problem)!! I need it to display in the following way. (you may no
-
Condition of amount in report column
Hello, I have created a report in xml template and registered in oracle apps.i have created a rdf report which is showing two column values in output.the following requirement as follows? First condition: There are tow columns A and B.If column A hav
-
PNG transparency lost using event.target.loader.content.bitmapData
I load a png 24 (tripple checked alpha is ok) override public function loadData():void var request:URLRequest = new URLRequest(url); var loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageloadedSucces