How do I update a date field through CMP
I wonder how to update a date field through CMP.
For example, I can't update an employee table with following statement.
employee.setHire_date('2002-03-20');
Thanks,
Thats correct......
Try using the following code....
String strDate ="2002-03-20";
String date_fmt = "yyyy-MM-dd";
java.text.SimpleDateFormat sdf=new java.text.SimpleDateFormat(date_fmt);
java.util.Date hireDate =null;
hireDate =(Date) sdf.parse(strDate);
employee.setHire_date(hireDate);
Hope this helps
Cheers
--Venky
Similar Messages
-
How do i update the date on the calender icon in cloud
How do i update the date on the calender icon in cloud?
Hi Scott, There is no single-click to update all the Adobe CC apps, but you can go through the Adobe Application Manager to download the Creative Cloud app, which will let you install the new CC versions of photoshop, premiere, etc.
So basically you will still have your CS6 software, and it will install the CC software next to it. That way if any of your plugins haven't been upgraded yet, you can still use CS6. -
Update a date field using execute immediate statement..
I need to update a date field dynamically .
Below is the code I have written for the same..
EXECUTE IMMEDIATE
'UPDATE Temp_Emp ' ||
' SET ' || V_Fieldname || ' = ' || D_Value ||
'WHERE Emp_Id = ' || 8447;
I am getting the following error..
ORA-00904: "AUG": invalid identifier
Pls anyone have any ideas..
Thanks,
Xyzput D_Value in single quotes like this
EXECUTE IMMEDIATE
'UPDATE Temp_Emp ' ||
' SET ' || V_Fieldname || ' = ''' || D_Value ||''' WHERE Emp_Id = ' || 8447; -
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 regup-sgtxt field in sap script
Hi experts,
I have created sap script for payment print prog. In that one field is amount discription "REGUP-SGTXT". i want to use field "REGUP-SGTXT" as a discription. for sap script payment print i use T-Code f-43, fb03,f-58... now in whic T-code i fiiled the value of "REGUP-SGTXT"?? how can i update value in my sap script?? cause i ceateed so many doc no but "REGUP-SGTXT" its blank... so how can i fill this fiels???
Give me suggetion
ZenithiHi
Most of the times this text won't get populated
So better write an external PERFORM subroutine in the SCRIPT and fetch it from BSEG/BKPF tables using BELNR field and use in the cheque printing.
see the sample code for subroutines
How to call a subroutine form SAPscripts
The Form :
/:PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
/:USING &EKKO-EBELN&
/:CHANGING &CDECENT&
/:ENDPERFORM
The report :
REPORT zkrpmm_perform_z1medruck .
DATA : BEGIN OF it_input_table OCCURS 10.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_input_table.
déclaration de la table output_table contenant les
variables exportées
DATA : BEGIN OF it_output_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA : END OF it_output_table.
DATA : w_ebeln LIKE ekko-ebeln,
w_vbeln LIKE vbak-vbeln,
w_zcdffa LIKE vbak-zcdffa.
FORM CDE_CENT
FORM cde_cent TABLES input output.
it_input_table[] = input[].
it_output_table[] = output[].
READ TABLE it_input_table INDEX 1.
MOVE it_input_table-value TO w_ebeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_ebeln
IMPORTING
output = w_ebeln.
SELECT SINGLE zcdffa FROM ekko
INTO w_zcdffa
WHERE ebeln = w_ebeln.
it_output_table-name = 'CDECENT'.
MOVE w_zcdffa TO it_output_table-value.
MODIFY it_output_table INDEX 1.
output[] = it_output_table[].
ENDFORM.
/: PERFORM
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
Example:
In script form
/: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
/: USING &EKKO-EKORG&
/: USING &EKPO-WERKS&
/: USING &EKKO-EKGRP&
/: USING &EKKO-BSTYP&
/: CHANGING &COMPNAME&
/: CHANGING &SENDADR&
/: CHANGING &INVCADR&
/: CHANGING &COMPADR&
/: CHANGING &COVERLTR&
/: CHANGING &SHIPADR&
/: CHANGING &REMINDER&
/: CHANGING &REJECTION&
/: CHANGING &POSTADR&
/: CHANGING &LOGO&
/: ENDPERFORM
In program
FORM Read_texts - To extract the standard texts from the table *
FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA : L_EKORG TYPE EKORG,
L_WERKS TYPE WERKS_D,
L_BSTYP TYPE BSTYP,
L_EKGRP TYPE BKGRP.
READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
CHECK SY-SUBRC = 0.
L_EKORG = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
CHECK SY-SUBRC = 0.
L_WERKS = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
CHECK SY-SUBRC = 0.
L_EKGRP = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
CHECK SY-SUBRC = 0.
L_BSTYP = IN_PAR-VALUE.
CLEAR Z08M1_ORG_TEXTS.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = L_BSTYP.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = SPACE.
ENDIF.
READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SENDADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'INVCADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COMPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REMINDER'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REJECTION'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'POSTADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'LOGO'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
REPORT ZMPO1 .
form get_freight tables in_par structure itcsy out_par structure itcsy.
tables: ekko,konv,t685t.
data: begin of itab occurs 0,
ebeln like ekko-ebeln,
knumv like ekko-knumv,
end of itab.
data: begin of itab1 occurs 0,
knumv like konv-knumv,
kposn like konv-kposn,
kschl like konv-kschl,
kbetr like konv-kbetr,
waers like konv-waers,
kwert like konv-kwert,
end of itab1.
data: begin of iout occurs 0,
kschl like konv-kschl,
vtext like t685t-vtext,
kbetr like konv-kbetr,
kwert like konv-kwert,
end of iout.
data v_po like ekko-ebeln.
read table in_par with key 'EKKO-EBELN'.
if sy-subrc = 0.
v_po = in_par-value.
select
ebeln
knumv
from ekko
into table itab
where ebeln = v_po.
if sy-subrc = 0.
loop at itab.
select
knumv
kposn
kschl
kbetr
waers
kwert
into table itab1
from konv
where knumv = itab-knumv and
kappl = 'M'.
endloop.
loop at itab1.
if itab1-kposn <> 0.
select single * from t685t
where kschl = itab1-kschl
and kappl = 'M'
and spras = 'EN'.
iout-vtext = t685t-vtext.
iout-kschl = itab1-kschl.
iout-kbetr = itab1-kbetr.
iout-kwert = itab1-kwert.
append iout.
clear iout.
endif.
endloop.
sort itab1 by kposn.
loop at iout.
sort iout by kschl.
if ( iout-kschl eq 'GSDC' OR
iout-kschl eq 'GSFR' OR
iout-kschl eq 'GSIR' ).
at end of kschl.
read table iout index sy-tabix.
sum.
write:/ iout-kschl,iout-vtext,iout-kwert.
out_par-name = 'A1'.
out_par-value = iout-vtext.
append out_par.
out_par-name = 'A2'.
out_par-value = iout-kwert.
append out_par.
endat.
endif.
endloop.
endif.
endif.
endform.
IN THE FORM I AM WRITING THIS CODE.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:ENDPERFORM
&A1&
&A2&
This Code is to be written in the PO form under ADDRESS window.
/:DEFINE &A1& = ' '
/:DEFINE &A2& = ' '
/:DEFINE &A3& = ' '
/:DEFINE &A4& = ' '
/:DEFINE &A5& = ' '
/:DEFINE &A6& = ' '
/:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
/:USING &EKKO-EBELN&
/:CHANGING &A1&
/:CHANGING &A2&
/:CHANGING &A3&
/:CHANGING &A4&
/:CHANGING &A5&
/:CHANGING &A6&
/:ENDPERFORM
&A1&
&A2&
&A3&
&A4&
&A5&
&A6&
Regards
Anji -
Problem updating a date field via UnitOfWork - TopLink 9.0.3
Hello,
we want to change an exisiting application that employs TopLink 9.0.3, Build 423.
The data is stored in an Oracle 9.2.0.6.
The specific table has a composite primary key consisting of four fields.
I can easily create a new Object (foo)
uow.registerNewObject(foo)
uow.commit()
and see the results in the database.
If I obtain an exising Object (bar) and change an integer
bar = (Bar) Session.readObject(Bar.class, expr);
cloneBar = (Bar) uow.registerObject(bar);
cloneBar.setSomething(42);
uow.commit()
everything is fine.
But if I dare to change a Date field
cloneBar.setSomethingElse(cal.getTime());
then
uow.hasChanges()
returns true
but the update does not happen. It is neither logged nor is the data changed in the database.
Is this a known bug?
What have I done wrong?
How can I avoid using hard-coded SQL to update my Bar object?
Bye,
StephanHello,
it is very disturbing, but I finally found the reason for this problem.
After decompiling the Project class file (we have no source code of this third-party library), I saw that the mapping for this specific field is set to "readOnly".
I did not know that TopLink is able to have specific fields "readOnly" and others "readWrite", but it can handle this!
So it seems that the behaviour is not a bug but a feature :-(
We can change the mapping before creating the session, with the result that the field is updatable.
Have a nice day. -
DateFormat for updating the metadata field through RIDC
Could you please tell me what will be the valid date time format for updating metadata field value through RIDC.?
I am using ADF technology to connect with webcenter UCM and using all services to check-in,update, search generic screens using UCM services. I am able to update other text type metadata field through ADF screen BUT when i update date field then i am getting date parsing error..
xSubmitDate DATE type in UCM.
xSubmitDate value = 05/08/2013 05:36 PM
oracle.stellent.ridc.protocol.ServiceException: Unable to update the content item information for '0804'. The field 'xSubmitDate' does not contain a valid date. Unable to parse date '05/08/2013 05:36 PM'.
Thanks in Advance.This blog post I wrote may be of some help: http://www.redstonecontentsolutions.com/5/post/2011/10/parse-date-usingridc.html
Jonathan
http://jonathanhult.com -
How to MASS update LC data in BOM's and Routings
Hello,
Hello,
I am using SAP APO where I need to use LPP Heuristics. I need to update LC Data. I tried to do it via batch input as I did not find any Function Module. I faced however a problem that I could not overcome.
Initially field Maximum Prod. Length is display only. When I set a value to Length Calculation Method field then it becomes editable but entry is required. In this way it is impossible to update it in one step with the batch input method.
Does anyone know how to overcome it?
Thank you in advance,
AngelosOk... Sorry, I thought I explained it better.
I have 40K+ records that were extracted from a parent table into a "temporary table" called NRN_WEIGHTS. Each has a primary key column, ADMIN_CN_FK, and two data columns. SVEXPAND, and NVEXPAND. ALL the data in this table was extracted from the parent table NRN_ADMIN, and then the NV/SVEXPAND records updated to current values.
Now they want me to update all the parent table records so that they reflect the new values.
Parent table = NRN_ADMIN primary key is ADMIN_CN
Child table = NRN_WEIGHTS primary key (FK) is ADMIN_CN_FK
So I have to essentially say in some kind of looped structure...
for i in select admin_cn_fk from nrn_weights, update nrn_admin
set nvexpand = (select nvexpand from nrn_weights where admin_cn_fk = i)
svexpand =(select svexpand from nrn_weights where admin_cn_fk = i)
Does that make more sense?
As far as the create table goes, I didn't want to really be specific to this one instance to be honest. This is something that I will be doing a lot, so I was hoping to approach it from a more generic approach. -
USEREXIT to update BSEG-BVTYP field through VF01 transaction
Hi Folks !
I have a requirement where I have to update the Partner Bank Type(BSEG-BVTYP) field through the transction VF01.
I tried with many exits like SDVFX008, RV60AFZC, RV60AFZZ and Includes like ZXVVFU01, ZXVVFU08, but unfortunately no results.
I want to know which structure is passed from SD to FI when we create a invoice in VF01.
Please help me, how could i update this field through VF01.
Thanks in advance !Hi Sudarsan
What u r telling u tried the exit
SDVFX008 and u didnot get the solution.
This exit is for the structure sd-fi only and i have created 2 projects with this for somw enhancement and its populating with vf01.
Pls try to craete a project on this exit and write code in the functionm exit of that definitely u will get the solution.
Rajendra -
How can I populate a date field when document is signed?
I have 4 digital signature fields in a PDF form. Next to each signature field is a date field (m/d/yyyy format). I would like it so when the user signs the signature box that the date field next to it populates with todays date, then changes to read only (so it cannot be altered).
In Adobe Acrobat Pro 9 I have this form and it has the following fields
Signature1
Signature2
Signature3
Signature4
DateField1
DateField2
DateField3
DateField4
The Signature fields trigger a Topaz.GemSignPlus driver where the end user will be signing on an electronic signature pad.
How can I use Javascript to detect when one of those Signature fields is populated and then fill in the date to the approrpiate date field? I tried creating boolean variables initialized as false for each sig field. Then when the signature is done I try to change it to true, but for whatever reason my javascript detecting the value doesn't do anything.
I've searched the net endlessly for this solution. I can't believe I'm having such a hard time finding an answer. I mean how many places do you go where they ask you to "Sign and date here". Every signature based document I've ever seen also requires a date.
Anyway here's what I have. In Document JavaScript functions I have a script name called populate date:
function populatedate()
var bSignature1 = new Boolean();
var bSignature2 = new Boolean();
var bSignature3 = new Boolean();
var bSignature4 = new Boolean();
if (bSignature1) {
DateField1.value = util.printd ("m/d/yyyy", new Date());
if (bSignature2) {
DateField2.value = util.printd ("m/d/yyyy", new Date());
if (bSignature3) {
DateField3.value = util.printd ("m/d/yyyy", new Date());
if (bSignature4) {
DateField4.value = util.printd ("m/d/yyyy", new Date());
In each signature field I have under the Signed tab "This script executes when field is signed:
var bSignature1 = new Boolean(true);
I'm trying to change it to true see. My thinking is if its true than DateField1.value should print the m/d/yyyy in it from the built in Date() function.
But maybe I am not getting this context correct. I am new to Javascript in Adobe.It's quite a round-about script... Why not simply use the signature signing script to set the value of the date field? The correct syntax for that is:
this.getField("DateField1").value = util.printd ("m/d/yyyy", new Date()); -
How to make the 'Finish Date' field Editable in Project server 2013
Hi All,
In Project server 2013 on premises deployment, When I try to create a new enterprise project [Also in case of new custom project type], Only the 'Start Date' field is available. The 'Finish Date' field is by default taking the value of the 'start Date' itself.
I am unable to make this 'Finish Date' field editable.
Any pointers on this would be very helpful,
Thanks
ShankyShanky --
When you create a new project in either Microsoft Project Professional or Project Online, the system does not allow you to enter both a Start date and a Finish date for the project. Here is how the software works:
You enter the Start date of the project.
You completely plan the project with tasks, task dependencies, task Durations, and assigning resources to tasks.
Based on the Start date you provide, plus all of the task information, the software calculates the Finish date of the project for you. So, you cannot provide both the Start date and the Finish date, nor is they any way to force the system to allow
you to do this. Hope this helps.
Dale A. Howard [MVP] -
How to get a noneditable date field...
Hi,
The date item in HTMLDB provides a calendar alright, but the actual column is still open to the users to change the date chosen from the calendar, how do u make it a disabled field so that users cannot change the format of date chosen from the calendar just like a popup lov,displays description returns key value type....
or do we have to set some attibute to make this field disabled...
Thanks in advance
Regards
NaveenHi Naveen,
I'm not sure that you can lock or disable the date field, after all you want your user to enter one. But I think that you can use a validation on the item - Item specified is a valid date. Your users will get an error message each time they will try to enter invalid date, including wrong date format.
Hope it helps,
Arie. -
How to compare table's date field with dropdown year field
Hi All,
I have one requirement to display the selected rows from a database table based on the selection of drop down.
Here, I have one dropdown of year(like 2009,2010,....) and I have one database table which contains one field with "DATE".
Now, I want to compare table's DATE field with my dropdown field.
Problem is that table's DATE field is of type "DATS" and dropdown is of type INTEGER(or) STRING ...
How to compare this fields?
Can any one please give me solution for this...!
Thanks in Advance!Hi sreelakshmi.B,
try the following:
DATA lt_dats TYPE TABLE OF dats.
DATA l_dat_i TYPE i.
DATA l_dat_c_4(4) TYPE c.
DATA l_dat_c_12(12) TYPE c.
DATA l_dats_from TYPE dats.
DATA l_dats_to TYPE dats.
*Move Date from Integer to Char
l_dat_c_4 = l_dat_i = 2005.
*Create Date From use in WHERE-Clause
CONCATENATE '01.01.' l_dat_c_4 INTO l_dat_c_12.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_dat_c_12
IMPORTING
date_internal = l_dats_from
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*Create Date To use in WHERE-Clause
CONCATENATE '31.12.' l_dat_c_4 INTO l_dat_c_12.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_dat_c_12
IMPORTING
date_internal = l_dats_to
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
* Select records in range
SELECT *
FROM [DBTAB]
INTO TABLE [ITAB]
WHERE [DATE] BETWEEN l_dats_from
AND l_dats_to.
Regards
REA -
Hi,
I have one table with a date field.
For display all rows in a table component i'm using a dateTimeConverter object with format 'dd/MM/aaaa' and work fine.
Bat when i update a data provider with follow code:
public String update_action() {
// TODO: Process the button click action. Return value is a navigation
// case name where null will return to the same page.
try {
myDataProvider.commitChanges();
myDataProvider.refresh();
} catch(Exception e) {
error("One error: " + e.getMessage());
return null;
return from brawser the follow message:
Number of conflicts while synchronizing: 1 SyncResolver.UPDATE_ROW_CONFLICT row 2 Data Exception -- No Applicable Cast Operator. from SQL type BINARY to SQL type DATE
Anyone help me!
Thanks.If you are getting the date from a calendar you have to convert it before storing it, for example, in the following code, the date got from the calendar is converted to a java.sql.Date
java.sql.Date date1 = new java.sql.Date(calendar1.getSelectedDate().getTime());
I hope this helps =) -
How do i insert a date field?
I download a date field widget but i can't seem to make it work. Any suggestions?
How exactly have you downloaded the file ? You can import the library file and then use on pages or if you have downloaded the widget from CC addon then first sync with CC in assets section and then use in Muse.
Thanks,
Sanjit
Maybe you are looking for
-
Airport Extreme in a Mirror Drive door G4
Is the Extreme card/base station compatible with a MDD G4 1.25? I'd like to go wireless, but it seems like using the older airport would be somewhat pointless. I need reception from one end of a single story house to the other. Any tips would be appr
-
XI onfiguration in EBP and SUS systems
Hi! I am configuring XI in EBP and SUS systems to be able to send POs from EBP to SUS and to get PO responses from SUS to EBP. Also we would like to have ASN creation in SUS funtionality to create inbound deliveries in ERP system, because we are runn
-
I receive the error message 'Constant send error' when using Outlook. Messages do not appear in 'sent' or 'outbox' folders.
-
ITunes Store can't load its content on my Mac
Hi, recently i just realized that my iTunes store doesn't work as in it won't load its content but from the bandwidth or network status it's actually downloading something, i have tried several troubleshoots from apple support and even reinstalled by
-
IMEI 01**********481 lock or unlock
IMEI 01*********481 lock or unlock <Edited By Host>