Change Data Using Javascript
Hi Guys,
I'm wondering can I change a data in the data view without binding it to a UI using javascript?
Thanks,
Mao
Hi,
I mean in the hierarchy node select the field to which you want to populate the value. And in the script editor write this.rawValue = <your value>.
Regards,
Vidya Chowdhary A.
Similar Messages
-
How to compare dates using javascript?
Hi,
I have to compare dates using javascript. The dates are in format "mm/dd/yy" for eg "10/09/06".
I have written a script to compare the dates but the problem I 'm facing is with the year.
For example if I compare "10/09/06" with "10/04/98", then "10/04/98" is coming out to be greater than "10/09/06" because it is considering year "98" to be greater than "06".
Please advice/suggest.
Thanks in advance...Dude, you're here in a Java forum, not in a Javascript forum. Those are two entirely different languages.
The answer in Java is to use java.text.SimpleDateFormat to convert String to Date and use java.util.Date and/or java.util.Calendar to compare dates. -
Hi Guys,
I ran into this trouble, basically, what I need is to post data into this url using REST:
www.thissite.com/comment
now it says:
do this with a variable name content, containing "key: value" line by line:
id:
Action: comment
Text: the text comment
now it has a sample on how to do this using java:
import java.io.IOException;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
public class RtTicketCreator {
static final String BASE_URI = "http://www.thissite.com/REST/1.0";
public static void main(String[] args) throws IOException {
PostMethod mPost = new PostMethod(BASE_URI + "/1234/comment/");
Part[] parts = { new StringPart("content", "id: 1234\nAction: comment") };
mPost.setRequestEntity(new MultipartRequestEntity(parts, mPost.getParams()));
HttpClient cl = new HttpClient();
cl.executeMethod(mPost);
System.out.println(mPost.getResponseBodyAsString());
Now, my question is: Can I do this using javascript? If yes, could you at least give me an idea how to accomplish this?
Thanks Guys,
Best Regards,
AaronHi Vishvesh,
Could you please let me know how you resolved the issue.
I am also developing a web app in eclipse consuming the odata and when checking the script in Firebug i gor the error as
GET http:/<server>;port/sap/opu/sdata/sap/GURU/$metadata/$metadata?$format=xml
00:01:50 2012-04-06 The following problem occurred: HTTP request failed0,, -
Thanks and regards
Gururaj -
Reading form data using javascript
Hello.
I want to go over the data received from the context to the PDF file using JavaScript, without binding it to any elements on the form.
How can I access the data?
I've tried using xfa.data or xfa.dataset, but didn't manage to get to it.
How can it be done?
Thanks.The following applies if it's a PDF generated from ABAP :
Let's say a simple type parameter from context is named EBELN. To get it from javascript, you must use :
$data.data.EBELN.value
or
$record.EBELN.value
(it's the same)
For example, to display the value, use:
xfa.host.messageBox( $data.data.EBELN.value );
Edited by: Sandra Rossi on Jan 28, 2009 7:34 PM : added $record line -
Capture who changed data using Forms Personalization & changed to what data
Dear All,
When the data is changed to a new data (say the price has been changed), I need to capture
a) the original data
b) newly changed data
c) who changed the data
into a newly created custom table using FORMS PERSONALIZATION.
How do I do using FORMS PERSONALIZATION?
Thanks.
MatthewHey guys, I did it.... and it does work. Here is what I did.
I created a table to capture the required data.
CREATE TABLE XYKA_PRICE_CHANGE_DTLS
LIST_LINE_ID NUMBER,
PRODUCT_ID VARCHAR2(240),
PRODUCT_ATTR_VAL_DISP VARCHAR2(4000),
NEW_PRICE NUMBER,
DIV_NAME VARCHAR2(240),
PRICE_CHANGED_BY VARCHAR2(6),
PRICE_CHANGED_TIME DATE,
OLD_PRICE NUMBER
Create two procedures which needs to enter data into this XYKA_PRICE_CHANGE_DTLS table. We will pass values from FORMS PERSONALIZATION by calling this
procedure in the ACTION tab.
CREATE OR REPLACE procedure PRICE_CHANGE_DETAILS(price IN number,updated_by IN varchar2,disp IN varchar2,prod_id IN varchar2,line_id IN number,head_id in number,old_price in number) AS
v_name varchar2(240);
BEGIN
select name into v_name from qp_secu_list_headers_v where list_header_id = head_id;
insert into XYKA_PRICE_CHANGE_DTLS(NEW_PRICE, PRICE_CHANGED_BY,ITEM_NUMBER,PRICE_CHANGED_TIME,PRODUCT_ID,LIST_LINE_ID,PRICE_LIST_NAME,OLD_PRICE) values (price,updated_by,disp,sysdate,prod_id,line_id,v_name,old_price);
COMMIT;
END;
CREATE OR REPLACE procedure APPS.PRICE_CHANGE_DTLS(price IN number,updated_by IN varchar2,disp IN varchar2,prod_id IN varchar2,line_id IN number,head_id in number,old_price in number) AS
V_PRICE_CHANGED_TIME date;
V_PRODUCT_ID varchar2(240);
V_LIST_LINE_ID number;
V_count number := 0;
BEGIN
select count(*) into v_count from XYKA_PRICE_CHANGE_DTLS
WHERE LIST_LINE_ID = line_id AND PRODUCT_ID = prod_id AND NEW_PRICE = price;
if nvl(v_count,0) = 0 THEN
PRICE_CHANGE_DETAILS(price,updated_by,disp,prod_id,line_id,head_id,old_price);
else
null;
end if;
END;
In fact, I want to capture the current price and the changed price in pricing which is OPERAND field in qp_list_lines_v table (OM MANAGER > PRICING > PRICE
LISTS > PRICE LIST SETUP)
In the FORM PERSONALIZATION, enter the seq and the description
Seq 1
Description GLOBAL_VARIABLE
Level Function
In the CONDITION tab
Trigger Event WHEN-NEW-ITEM-INSTANCE
Trigger Object LIST_LINES.OPERAND
Processing Mode Not in Enter-Query Mode
Level Site
In the ACTION tab
Seq 1
Type Property
Description Operand Value
Language All
Object Type Global Variable
Target Object XX_EXIST_OPERAND_VALUE
PropertyName VALUE
Value ${item.list_lines.operand.value}
Seq 2
Type Property
Description USER
Language All
Object Type Global Variable
Target Object XX_USER_ID
PropertyName VALUE
Value =fnd_global.user_id
Seq 2
Description CONDITION & PASSING PARAMETER
Level Function
In the CONDITION tab
Trigger Event WHEN-VALIDATE-RECORD
Trigger Object LIST_LINES
Condition ${item.list_lines.operand.value} <>${global.XX_EXIST_OPERAND_VALUE.value}
Processing Mode Not in Enter-Query Mode
Level Site
In the ACTION tab
Seq 1
Type Builtin
Description PASSING_VALUE
Language All
Builtin Type Exceute a Procedure
Argument ='begin PRICE_CHANGE_DTLS('''||${item.list_lines.operand.value}||''','''||${global.XX_USER_ID.value}
||''','''||${item.list_lines.product_attr_val_disp.value}||''','''||${item.list_lines.product_id.value}
||''','''||${item.list_lines.list_line_id.value}
||''','''||${item.list_lines.list_header_id.value}||''','''||${global.XX_EXIST_OPERAND_VALUE.value}
||''');end'
Click APPLY NOW button. Save it and the close this FORMS PERSONALIZATION. Go back to the navigation and then click on the module. Try changing the price.
Your current and the newly changed price along with who changed it, time etc will be inserted into XYKA_PRICE_CHANGE_DTLS table.
Edited by: e-brain on Sep 14, 2009 11:21 AM
Edited by: e-brain -
Changing language using Javascript
Hi,
Does anyone know what the JavaScript code would be to change the language option to English UK in Adobe Acrobat?
I.e. the same as would be achieved by going to:
File -> Document Properties -> Advanced -> Reading Options -> Language
I need to run this as a batched process on c10,000 files, which is why I need to use JavaScript.
Grateful of any help.
Thanks
BenThanks for the reply Dave.
Preflight isn't something I had come across before so have just been reading up on it.
I have managed to find the Edit Profiles window but can't find a 'converting to PDF/A' profile. I am using Acrobat 6.0, is it available in there do you know?
Cheers
Ben -
How to sort pdf documents by modified date using Javascript action
Hello,
I want to use a Javascript action to sort multiple pdf documents in a folder before I run a Javascript action that prints the last page of multiple pdf documents. I received help from this forum on the last page print script and it works perfectly. The downside is it prints in default NAME order and I need them to print in accending DATE MODIFIED order. I'm not sure if the sort function could be incorporated into the print script or if it would be a seperate code/action.
This is the script to print the last page of several pdf documents:
this.print
({bUI: false,
nStart:this.numPages-1,
bSilent: true,
bShrinkToFit: true});
I would appreciate help from anyone that is willing to share the code to "sort by DATE MODIFIED".
Adobe Acrobat 10 Pro
Windows 7
Thank you in advance,
David C.I'm not a code writer. I'm trying to streamline some operations here at work. The original code assistance was to print the last page of several pdf documents (sometimes as many as 100 to 150 at a time) without having to open each file, scroll to the bottom, Ctrl-P, current page, Print. Can't express how beneficial it was to get that to work. I realize I'm looking a gift horse in the mouth, but when it prints out, it would be great to have them print in DATE MODIFIED order since they are kept in processed order rather than alpha order.
If the two processes are too labor intensive I fully understand and appreciate all the assistance thus far. I was hoping it would be as simple as the first script coding to do the actual printing.
Thanks,
David C. -
How can Access mysql data using JavaScript
Hi Friends,
Could u please tell how can i access data from mysql using Java Script..
please help me on this ..
thanksIs there any another possible ways..
My problem is ..
i want display svg graphic file by getting the graphic attribute values from database ,then i will generate DOM ... by using Servlet ..
Here my problem is whenever changes is made in the data base (That is graphic attribute values) it should modifies the svg images..without regenrating the whole DOM( svg file)
please give me some suggestion on this .if any otherways is there for solving this problem..
thanks -
Hi,
I have created a BW reportin BeX WAD. At viewtime (in internet explorer), I'm extracting some data from a table in the report with some custom javascript (I'm using HTML DOM).
Is there any way to directly query the data provider of the table (in javascript) to get the needed data? Because using DOM is not that elegant and not that easy to generalize (the number of rows varies depending on the number of characteristic values etc).
Thanks,
JeroenHi,
If you are profficient with ASP and Multi Dimensional Expressions you will be able to accomplish your goal. See:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3ff37884-0401-0010-3c96-ab0e2f383c5a
If you stick to Javascript then AJAX can be your solution (although a not trivial one...) See Raja's blog:
/people/durairaj.athavanraja/blog/2006/02/06/read-sap-table-data-from-bw-webtemplate-ajax-in-bw-webtemplate
Good Luck,
Xibi -
Iw31/iw32 change date using userexit
HI,
I need to change a date(CAUFVD-GLTRP) when PM work order creates or changes based on the rules(tcodes IW31,IW32).
I have tried couple of userexits. i didn't gey any luck. Please help , if anyone come across this issue.
thanksCheck Note [441323|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=441323] for change log or use revision field for change the date
-S.N -
Batch change dates using filenames as source
Howdy all!
I take a lot of pictures with my cell phone, and the date and time of the jpegs usually are just close, but not exact. The file name however usually contains all the data I need. It is something like 1227091536.jpg, which would be a photo taken today at 3:36 pm. So I use that info to manually update the date and time of each photo.
However, it would be really neat if a plugin, or anything for that matter, existed that would take the filename in that format, and use that info to update the date and time of the photo.
Anybody know of anything like that out there? Or come up with some clever way to speed up the process of correcting dates and times for cell phone pics?
Thankee!
DavidUpdate:
Upon further inspection of my files, the phone almost consistently always added 5 hours onto each image. So it was easy to fix those. But, there were still photos here and there, that the phone was off in the date and time by up to a month. Those photos were set aside for individual adjustment.
Still a pain to sift through and find the ones that are not off by the magical 5 hours, but it's a small percentage of the overall pictures.
Dave -
How do I get the difference of time and/or date using JavaScript?
Hi All,
I have four user text entry values (Date and Time) which require a difference to be performed on them. The results would be put into a fifth text box named "Burn_Time". The entries are
Start_Date, Start_Time, Stop_Date, and Stop_Time.
How do I calculate the elapsed time between the entries? For ease of calculations I surmised putting the values in 24 hour format would be helpful (not sure if this is true or not).
Here is an example:
Start_Date = 2012-04-10
Start_Time = 10:00
Stop_Date = 2012-04-12
Stop_Time = 10:00
Burn_Time = 48 (hours).
Any help would be greatly appreciated!Here's the first in a series of three tutorials on the subject: http://acrobatusers.com/tutorials/date_time_part1
-
Changing a select list using javascript
Hi all,
yesterday I had a doubt using apex_item.checkbox and how to change them using javascript:
Re: Passing a checkbox as a parameter to a javascript function
Today, I'm facing a similar problem, but with select lists. Here it goes. I have a report with apex_items, like this:
select
apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM@'')"','NO') sTATUS,
apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
from Fx1_vThe javascript code is as follows:
<script type="text/javascript">
function setItems(cb,estat){
elem = $x(cb);
alert(elem.value);
$x(cb).checked = true;
elem2 = $x(estat);
alert(elem2.value);
</script>The idea is that everytime the item g_f02 (a select list) changes, calls the JS function with two parameters: a checkbox (g_f01) and another select list (g_f03). The function should change the items to a defined values. The checkbox changes ok thanks to the help I got yesterday, but I can't work with the third item (select list g_f03). When I try to show the value, it says "undefined".
how could I see the actual value of the select list LOV and change it to 1, for example?
Thank you very much, any help will be appreciated!!!
Edited by: Elena.mtc on 19-may-2011 8:11Hi,
Do you have typo in query?
Should it be
select
apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM#'')"','NO') sTATUS,
apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
from Fx1_vAnd JavaScript
<script type="text/javascript">
function setItems(cb,estat){
elem = $x(cb);
alert(elem.value);
$x(cb).checked = true;
elem2 = $x(estat);
alert(elem2.value);
$s(elem2,1); // $s function is for changing item value
</script>Regards,
Jari -
Changing data does'nt reflect in UPDAT and UPTIM fields
Hi...
I'm very new to abap, I'm trying to trace the date and time on which a record was altered in tables kna1,knb1,knvv
and similarly in lfa1,lfb1,lfm1...
so please help me...
I'm changing data in these tables but UPDAT and UPTIM fields are not updating itself..
I'm changing data using fk02, fd02 transactions...Hi,
Hi there is something called confirmation of change, Once you confirm the change, these fields will be updated.
Try it....
Award Points If Useful -
Can I change the order in which the month and day are displayed in Calendar
Server using JavaScript? Specifically, I would like the date to be displayed
in the format D/M/Y instead of M/D/Y.
<P>
Yes. You can change the format of the date by editing the JavaScript variable
in the file <I>
loadpoint</I>/CalendarServer/cal/uicust/en/main.html
. The variable is located in the
"Misc" section in the
following line:<BR>
<P>
i18n['def date order'] = 'M/D/Y';
<P>
Edit the line as follows:<BR>
<P>
i18n['def date order'] = 'D/M/Y';Hello Mark,
yes, it is possible. In Calendar Express under
"Options | Settings -> Date"
"Show brief dates in the following order: Date, Month, Year".
BTW.: iCS 5.0 P4 is out since August, 2001. It's worth upgrading!
Regards,
Jakob.
Maybe you are looking for
-
On my desktop, when wanting to see pictures on a CD, if I click on the picture icon it open as a word document. I must right click on the icon then click on preview and can then see all pictures on the CD. This just started after the last Firebos upd
-
Exception thrown : java.lang.IllegalStateException: No AdfRenderingContext
I have an adf application which was built in RAD 6.0.1, I migrated it to RAD 7.5.3, and I still use run time 6.0, but when loading first page, I got error: SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /loginSelec
-
Date Being Returned Is 1-Jan-4000
Hi. I am using Oracle 10gR2 on a Solaris server. I've set up Oracle's Change Data Capture (CDC) and am noticing thta the date column in my chnage table is set to 1-Jan-4000 when, in fact, the actual data from my source table is 5-Mar-2007. Can someon
-
Merge to HDR transform error?
Can anyone help (Photoshop CS5.5), Please could you help me with the Merge to HDR tool. Although I have used this successfully on numerous occasions. I have encountered something new on the last few tries, very recently. The HDR image I am presented
-
Just upgraded iPad when I click the plus in tool bar won't let me bookmark?
Just upgraded my ipad. When I tried to bookmark by using the plus sign in toolbar it brings me to favorites but no option to add one. How can I bookmark?