Variable Date Field

Problem Background
I've created a form for mulitple users to fill out on a regular basis.
Some of the date fields are set to automatically tabulate the current date, while others are set to present the user with a dropdown menu.
The automatic date feature saves a lot of time for the vast majority of circumstances, but I've had several requests for the field to offer the additional option of displaying "TBD" or "See below for explanation".
Question
Is it possible to concurrently offer automatic date formatting and a custom field option in the same field?
Thank you for your thoughts!

Hi Gerben,
   I tried this and it yielded unacceptable(expected) results. Here is why i think this is the case.
=Time.expression(Time.nextTimeWindowOpening(Time.now('America/Regina'), 'System_Week_WorkDays'), 'add 7 days') suppose to only be open m-f
Time.now() should evaluate to today lets say 02/21/11
then Time.nextTimeWindowOpening should return the next open day, after but including today, it checks and finds today is open so = 02/21/11
and the time expression will add n= 7 days to that. 02/21/11 + 7 = 02/28/11 this is wrong.
According to this calendar it should be 03/01/11
Problem is that the add function is just adding n days indiscriminate of the calendar as the calendar is not part of the addition argument.
Edited by: Daniel Austin on Feb 21, 2011 9:31 PM

Similar Messages

  • To display variable date in the ALV field header

    HI all,
    I have an ALV list and one of the field headers is "Total received till 14.03.2008".
    Now the date field here is variable. it is being fetched from an internal table and displayed in thee field header of an ALV list.
    cud y'all pls tell me how to display this variable date.
    thanx,
    pk

    Hi,
    Just have a look on the following code,i hope this is enough to
    meet your requirement.
    type-pools: slis.
    data: x_fieldcat type slis_fieldcat_alv,
          it_fieldcat type slis_t_fieldcat_alv,
          l_layout type slis_layout_alv,
          x_events type slis_alv_event,
          it_events type slis_t_event.
    data: begin of itab occurs 0,
          vbeln like vbak-vbeln,
          posnr like vbap-posnr,
          male type i,
          female type i,
         end of itab.
    select vbeln
           posnr
           from vbap
           up to 20 rows
           into table itab.
    x_fieldcat-fieldname = 'VBELN'.
    x_fieldcat-seltext_l = 'VBELN'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 1.
    append x_fieldcat to it_fieldcat.
    clear x_fieldcat.
    x_fieldcat-fieldname = 'POSNR'.
    x_fieldcat-seltext_l = 'POSNR'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 2.
    append x_fieldcat to it_fieldcat.
    clear x_fieldcat.
    x_fieldcat-fieldname = 'MALE'.
    x_fieldcat-seltext_l = 'MALE'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    append x_fieldcat to it_fieldcat.
    clear x_fieldcat.
    x_fieldcat-fieldname = 'FEMALE'.
    x_fieldcat-seltext_l = 'FEMALE'.
    x_fieldcat-tabname = 'ITAB'.
    x_fieldcat-col_pos = 3.
    append x_fieldcat to it_fieldcat.
    clear x_fieldcat.
      x_events-name = slis_ev_top_of_page.
      x_events-form = 'TOP_OF_PAGE'.
      append x_events  to it_events.
      clear x_events .
      l_layout-no_colhead = 'X'.
    call function 'REUSE_ALV_LIST_DISPLAY'
      exporting
        i_callback_program       = sy-repid
        is_layout                = l_layout
        it_fieldcat              = it_fieldcat
        it_events                = it_events
      tables
        t_outtab                 = itab
      exceptions
        program_error            = 1
        others                   = 2.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    form top_of_page.
    *-To display the headers for main list
        format color col_heading.
            write: / sy-uline(103).
        write: /   sy-vline,
              (8) ' ' ,
                   sy-vline,
              (8)  ' ' ,
                   sy-vline,
              (27) '***'(015) centered,
                   sy-vline.
        write: /   sy-vline,
              (8) 'VBELN'(013) ,
                   sy-vline,
              (8) 'POSNR'(014) ,
                   sy-vline,
              (8) 'MALE'(016) ,
                   sy-vline,
               (5)  'FMALE'(017) ,
               (10) sy-datum,
                   sy-vline.
        format color off.
    endform.
    Reward points,if it is useful.
    Thanks,
    Chandu.

  • Assign date field to ddmmyy variables

    Hi Guys,
    I have some code which takes the current date and splits it into dd, mm and yy variables.
    var today = new Date();
    var dd = today.getDate();
    var mm = today.getMonth()+1;
    var yyyy = today.getFullYear();
    if(dd<10){dd='0'+dd}
    if(mm<10){mm='0'+mm}
    this.rawValue = "Text, " + dd+ "-" + mm + "-" + yyyy;
    I need to pass this a date from a date field instead of taking to days date but I cannot get it working.
    var today = this.parent..DateTimeField2.rawValue;
    var dd = today.getDate();
    var mm = today.getMonth()+1;
    var yyyy = today.getFullYear();
    if(dd<10){dd='0'+dd}
    if(mm<10){mm='0'+mm}
    this.rawValue = "TEXT, " + dd+ "-" + mm + "-" + yyyy;
    Any help would be appreciated.
    Thanks!

    Hi,
    you can use FormCalc and date patterns to do this easily.
    Here an example for the calculate event of DateField2.
    It grabs the formatted value of DateField1 (which is DD.MM.YYYY) and formats it to TEXT DD-MM-YYYY.
    $ = Num2Date(Date2Num(DateField1.formattedValue, "DD.MM.YYYY"), "'TEXT ' DD-MM-YYYY")

  • Incrementing Date field in Variable based on a specific calendar

    Hello All,
        I am currently setting up a schedule that includes Mass activities. I am running into a problem when i want a particular date field an activity to increment by one day based on a specific calendar i.e. Factory calendar (M-F open).
    EX)
    The due date field for on any given day the mass activity runs should be system date plus 2 business days.
    While the posting date field on the same transaction should increment by 2 day.
    Result would be:
    On System date = 02/17/11
    Due Date Field = 02/21/11
    Posting Date = 02/19/11
    I am currently using expression similiar to this: =Time.expression(Time.now('GMT'), 'add 2 days') but cannot find documentation how to include calendars in this as you would with =Time.isTimeWindowOpen(Time.now('GMT'), 'Factory Calendar').
    Can someone please point me in right direction?
    Thanks
    Dan

    Hi Gerben,
       I tried this and it yielded unacceptable(expected) results. Here is why i think this is the case.
    =Time.expression(Time.nextTimeWindowOpening(Time.now('America/Regina'), 'System_Week_WorkDays'), 'add 7 days') suppose to only be open m-f
    Time.now() should evaluate to today lets say 02/21/11
    then Time.nextTimeWindowOpening should return the next open day, after but including today, it checks and finds today is open so = 02/21/11
    and the time expression will add n= 7 days to that. 02/21/11 + 7 = 02/28/11 this is wrong.
    According to this calendar it should be 03/01/11
    Problem is that the add function is just adding n days indiscriminate of the calendar as the calendar is not part of the addition argument.
    Edited by: Daniel Austin on Feb 21, 2011 9:31 PM

  • Formula for compare two date fields

    Please help me,
    There are two date fields in DSO , I want to create a key figure by Query Designer, the condition as blow
    Count ( If field DateA > field DateB = 1 else 0 ).

    http://www.sd-solutions.com/SAP-HCM-BW-Replacement-Path-Variables.html
    create 2 formula varaibles like above and comapre it

  • Bank statement: problem to load variable length field

    we have many bank accounts with different banks, and we would like to use the bank reconciliation module to do bank reconciliation.
    we have problem in load the MT940 bank statement. All these banks are providing so called standard SWIFT940 format, which not able to give fixed length field.
    we have problem on line 61 which have a lot of variable length fields.
    line 61 comprise of 7 fields, which are:
    A) Value date - fixed 6 chars.
    B) Entry date - fixed 4 chars.
    C) Credit/debit - variable 1-2 chars.
    D) Fund Code - fixed 1 char
    E) Transaction amount - variable 15 chars
    F) Transaction code/type - fixed 4 chars
    G) MID, cheque#, BIS - variable 16 chars
    How can we write the SQL Loader script if there is no delimiter, and the start position of the fields are not fixed?
    we can load A and B easily, but C onwards we will have problems.
    please help.
    INTO TABLE ce_stmt_int_tmp
    WHEN rec_id_no = '61'
    TRAILING NULLCOLS
    (rec_no RECNUM,
    rec_id_no POSITION(1:2) CHAR,
    column1 POSITION(4:9) CHAR,
    column2 POSITION(10:13) CHAR,
    column3 ??
    column4 ??
    column5 ??
    column6 ??
    column7 ??
    ------

    Hi Linda,
    As said by gupta, please check, whether the bank statement has the statement 62F:
    If not, please get the statement again from bank and ensure that the end statement 62F exists in the statement..
    This will help you to overcome your problem..
    Regards,
    Praisty

  • Creating process for multiple Date fields for update or insert in APEX

    hello there,
    could someone please help me?
    i have a form on Apex based on view that is based on three tables and updating and inserting ok using trigger instead of.
    i have a problem now as in my form i have around 75 fileds (items) incuding 30 or more date fields which could be populated or left blank or update later.
    so for each date field i have two boxs; one for date, input as dd/mm/yyyy (text field) and second for time, input as 23:45. All dates will be insert or update manually by user. so as i mentioned not all date fields could be poulated at one stage.
    so i have created some process and validations and all of them work fine but i came accross if date left blank then (:) giving me problem so i have done following further process for each date field. In real table all the date fields have data type date.
    declare
    v_my_var date; -- for first date field
    str_dy VARCHAR2(10);
    dt_indx date;
    str_tm VARCHAR2(20);
    tm_indx date;
    begin
    str_dy := :p4_first_date
    str_tm := str_dy||' '||substr(:p8_first_date_hh,1,2)||':'||substr(:p8_first_date_HH,4,2);
    dt_indx := to_date(str_tm,'DD/MM/YYYY HH24:MI');
    IF str_dy is not null then
    v_my_var :=dt_indx;
    ELSE
    v_my_var := NULL;
    END IF;
    update table 1 set my_date = v_my_var where d_id= :p4_d_id;
    end;
    above code work fine but one date field of course therefore i have to do same code for each date field with changes and initialise variable again and again for each field.
    so i like to ask is there any easy way that is more professional. i was thinking about the procedure and using collection or similar but honestly not much experience on that so could some one please help me?
    I will be very thankful.
    KRgds

    Hi,
    You can do the needful by re-using the code if you can give the item names as P8_DATE1, P8_DATE_hh1, P8_DATE2, P8_DATEhh2 etc..So your item name just differs by a sequence.
    Now you write function which will return desired date value taking above items as input. Pass item names to this function, get session state using APEX_UTIL.GET_SESSION_STATE('item_name') API.
    Now modify you code as
    FOR i IN 1..30
    LOOP
    v_date_array[i] = f_get_date('P8_DATE'||i, 'P8_DATEhh'||i);
    END LOOP;
    ....Now you have all date valus in array. Just write one update as follows
    UPDATE  TABLE1
    SET date1 = my_date_array[1], date2 = my_date_array[2]..
    WHERE ....Hope it helps :)
    Cheers,
    Hari

  • F4 help for Date field and Validation

    Hi Friends,
    I am new to BSP programming .I knew getting F4 help in normal ABAP.But i don't know in BSP .
    I want simple steps to get F4 for a field on Page as well as date field .
    and How to valid those entered dates.
    Presently i am using length 10 character variable for DATE without F4 help and No validation.
    I think you guys will help me out.
    Thanks,
    Venkat.O

    Welcome to SDN.
    for F4 help with validation for dates you can use the following code.
    <htmlb:inputField id         = "wf_ad_date"
                                    type       = "date"
                                    showHelp   = "TRUE"
                                    value = "<%= sy-datum  %>"
                                    visible    = "true"
                                    disabled   = "false"
                                    required   = "true"
                                    maxlength  = "10"
                                    size       = "10"
                                    doValidate = "true"
                                    design     = "standard" />
    For other type of fields check out this weblog by Thomas Jung
    <a href="/people/thomas.jung3/blog/2005/08/22/bsp-value-input-help-popups-version-30 Value Input Help Popups Version 3.0</a>
    Regards
    Raja

  • Using a date field in a JDOQL query crashes

    Hello:
    I am trying to use a date field in a JDOQL filter. It appears from the
    log file that the date is not being substituted into the SQL.
    It is not clear from the JDOQL spec how to do date queries.... doing date
    queries in SQL involves several special operators, yet the
    JDOQL defines the ">" and "<" operators as working on dates....and there is
    no mention of date specific operators so I am hoping that I
    can do a filter where I compare a date to an input parameter date using the
    ">" and "<" operators...
    I have enclosed a copy of my driver code, followed by an except of my class
    that contains the date, followed by the kodo exception log
    I can't see where I am doing anything that violates the JDOQL spec and I
    don't see any other way of doing date comparisions.
    Brian
    Here is the driver code that I am attempting:
    public void getDateRange ()
    PersistenceManager pm = JDOFactory.getPersistenceManager ();
    String filter = "leafDates.contains (cdate) & cdate.statusName ==
    myStatus & cdate.datePhaseStarted > myDate";
    Date date = new Date ();
    Calendar calendar = new GregorianCalendar (TimeZone.getDefault ());
    calendar.set (2002, Calendar.DECEMBER, 26);
    date=calendar.getTime();
    Extent extent = pm.getExtent (LeafBase.class, false);
    Query query = pm.newQuery (LeafBase.class, filter);
    query.declareImports ("import aqueduct.*; import java.util.Date");
    query.declareVariables ("aqueduct.LeafDate cdate; Date myDate");
    query.declareParameters ("String myStatus");
    System.out.println ("dated used = " + date);
    Collection results = (Collection) query.execute ("closed", date);
    Iterator iter = results.iterator ();
    while (iter.hasNext () ) {
    LeafBase myLeaf = (LeafBase) iter.next ();
    System.out.println ("My leaf = " + myLeaf);
    pm.close ();
    Here is the class:
    public class LeafDate implements Serializable
    // *******The Attributes***************
    private Date datePhaseStarted = null;
    private boolean isEstimatedDate = false;
    //mark this as non-persistent in the JDO metadata
    private StatusType status = null;
    //put here to enable one-to-many mapping using a single table in JDO
    private LeafBase parent = null;
    Here is the error I am getting:
    C:\bcs\jdo\kodo-jdo-2.4.0\aqueduct>java aqueduct.DealMaint dated used = Thu
    Dec 26 08:47:33 CST 2002
    Exception in thread "main" javax.jdo.JDODataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPARENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM
    JDO_DATE t1, JDO_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND t1.DATESTARTED
    *variable*) AND t0.ID = t1.PARENTX) PRE=SELECT DISTINCT t0.ID,
    t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX, t0.DEALPARENTX, t0.PARENTX,
    t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM JDO_DATE t1, JDO_LEAF t0 WHERE
    ((t1.STATUSNAME = ? AND t1.DATESTARTED > *variable*) AND t0.ID =
    t1.PARENTX)
    ORA-00936: missing expression
    [code=936;state=42000]
    NestedThrowables:com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPA RENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM
    JDO_DATE t1, JD O_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND
    t1.DATESTARTED > *variable*) AND t0.ID = t1.PARENTX)] [PRE=SELECT DISTINCT
    t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX, t0.DEALPA RENTX,
    t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM JDO_DATE t1, JD
    O_LEAF t0 WHERE ((t1.STATUSNAME = ? AND t1.DATESTARTED > *variable*) AND
    t0.ID = t1.PARENTX)]
    ORA-00936: missing expression
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
    tions.java:23)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
    reManager.java:742)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
    :92)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
    at com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:623)
    at aqueduct.DealMaint.getDateRange(DealMaint.java:523)
    at
    aqueduct.DealMaint.main(DealMaint.java:35)NestedThrowablesStackTrace:java.sq
    l.SQLException:
    ORA-00936: missing expression
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1819)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2015)
    at
    oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(Oracle
    PreparedStatement.java:3021)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
    ment.java:416)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare

    Oh, thanks for pointing this out.... I got caught up in trying to figure out
    the date issues, I missed the obvious.
    Brian
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    Brian,
    The problem is that you're declaring myDate as a variable instead of a
    parameter. Yes, we should be doing better error checking. But that's the
    problem.
    So, change your declareVariables() and declareParameters() statements
    accordingly, and all should work out.
    -Patrick
    Brian Smith wrote:
    Here is the driver code that I am attempting:
    public void getDateRange ()
    PersistenceManager pm = JDOFactory.getPersistenceManager ();
    String filter = "leafDates.contains (cdate) & cdate.statusName ==
    myStatus & cdate.datePhaseStarted > myDate";
    Date date = new Date ();
    Calendar calendar = new GregorianCalendar (TimeZone.getDefault
    >>
    calendar.set (2002, Calendar.DECEMBER, 26);
    date=calendar.getTime();
    Extent extent = pm.getExtent (LeafBase.class, false);
    Query query = pm.newQuery (LeafBase.class, filter);
    query.declareImports ("import aqueduct.*; importjava.util.Date");
    >>
    query.declareVariables ("aqueduct.LeafDate cdate; Date myDate");
    query.declareParameters ("String myStatus");
    System.out.println ("dated used = " + date);
    Collection results = (Collection) query.execute ("closed", date);
    Iterator iter = results.iterator ();
    while (iter.hasNext () ) {
    LeafBase myLeaf = (LeafBase) iter.next ();
    System.out.println ("My leaf = " + myLeaf);
    pm.close ();
    >
    Here is the class:
    public class LeafDate implements Serializable
    // *******The Attributes***************
    private Date datePhaseStarted = null;
    private boolean isEstimatedDate = false;
    //mark this as non-persistent in the JDO metadata
    private StatusType status = null;
    //put here to enable one-to-many mapping using a single table in JDO
    private LeafBase parent = null;
    >
    Here is the error I am getting:
    C:\bcs\jdo\kodo-jdo-2.4.0\aqueduct>java aqueduct.DealMaint dated used
    = Thu
    Dec 26 08:47:33 CST 2002
    Exception in thread "main" javax.jdo.JDODataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPARENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAMEFROM> > JDO_DATE t1, JDO_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND> > t1.DATESTARTED> >> > >*variable*) AND t0.ID = t1.PARENTX) [PRE=SELECT DISTINCT t0.ID,
    >
    ORA-00936: missing expression
    [code=936;state=42000]
    NestedThrowables:com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=SELECT DISTINCT t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX,
    t0.DEALPA RENTX, t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAMEFROM
    JDO_DATE t1, JD O_LEAF t0 WHERE ((t1.STATUSNAME = 'closed' AND
    t1.DATESTARTED > variable) AND t0.ID = t1.PARENTX)] [PRE=SELECTDISTINCT
    t0.ID, t0.JDOCLASS, t0.IS_CONFLICT, t0.CURRENCYX, t0.DEALPA RENTX,
    t0.PARENTX, t0.PRODUCTKIND, t0.T_SIZE, t0.STATUSNAME FROM JDO_DATE t1,JD
    O_LEAF t0 WHERE ((t1.STATUSNAME = ? AND t1.DATESTARTED > variable) AND
    t0.ID = t1.PARENTX)]
    ORA-00936: missing expression
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
    tions.java:23)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
    reManager.java:742)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
    :92)
    atcom.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
    >>
    at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:668)
    >>
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:623)
    at aqueduct.DealMaint.getDateRange(DealMaint.java:523)
    at
    aqueduct.DealMaint.main(DealMaint.java:35)NestedThrowablesStackTrace:java.sq
    l.SQLException:
    ORA-00936: missing expression
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at
    oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    >>
    at
    oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1819)
    >>
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
    :2015)
    at
    oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(Oracle
    PreparedStatement.java:3021)
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
    ment.java:416)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Accessing the variable in field symbol of nested internal table

    Hi,
    I am unable to access the variable in field symbol.
    The data in field symbol has nested structure. We need to access a variable in nested structure.
    Please find the code below:
          LOOP AT <i_fincorp> into <fs_fincorp>.
            l_madefor = <FS_FINCORP>-data_UI-ZZ0010.
          ENDLOOP.
    datatype of <i_fincorp> is type any table and <fs_fincorp> is type any.
    there is a structure 'data_ui' in <i_fincorp> and we need value of field 'ZZ0010' in data_ui structure.
    But, we are getting syntax error for statement in loop stating "There is no component like 'data_ui' in <fs_fincorp>".
    Can anyone please help me solving this issue.
    Regards,
    Santosh

    So simply access it dynamically
    data: nested_field type c length 50.
    field-symbols <nested_field> type any.
    "build the nested field name dynamically
    concatenate
           'DATA_UI'    "first give structure name
           'ZZ0010'  "then give field name (all in uppercase!)
    into nested_field
    separated by '-'.  "now you have DATA_UI-ZZ0010
    "so assing this nested field
    LOOP AT <i_fincorp> into <fs_fincorp>.
       assign component (nested_field) of structure <fs_fincorp> into <nested_field>. 
    ENDLOOP.
    Regards
    Marcin

  • 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());

  • SQL*Loader and "Variable length field was truncated"

    Hi,
    I'm experiencing this problem using SQL*Loader: Release 8.1.7.0.0
    Here is my control file (it's actually split into separate control and data files, but the result is the same)
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    first_id,
    second_id,
    third_id,
    language_code,
    display_text VARCHAR(2000)
    begindata
    2,1,1,"eng","Type of Investment Account"
    The TEST table is defined as:
    Name Null? Type
    FIRST_ID NOT NULL NUMBER(4)
    SECOND_ID NOT NULL NUMBER(4)
    THIRD_ID NOT NULL NUMBER(4)
    LANGUAGE_CODE NOT NULL CHAR(3)
    DISPLAY_TEXT VARCHAR2(2000)
    QUESTION_BLOB BLOB
    The log file displays:
    Record 1: Warning on table "USER"."TEST", column DISPLAY_TEXT
    Variable length field was truncated.
    And the results of the insert are:
    FIRST_ID SECOND_ID THIRD_ID LANGUAGE_CODE DISPLAY_TEXT
    2 1 1 eng ype of Investment Account"
    The language_code field is imported correctly, but display_text keeps the closing delimiter, and loses the first character of the string. In other words, it is interpreting the enclosing double quote and/or the delimiter, and truncating the first two characters.
    I've also tried the following:
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY '|'
    first_id,
    second_id,
    third_id,
    language_code,
    display_text VARCHAR(2000)
    begindata
    2|1|1|eng|Type of Investment Account
    In this case, display_text is imported as:
    pe of Investment Account
    In the log file, I get this table which seems odd as well - why is the display_text column shown as having length 2002 when I explicitly set it to 2000?
    Column Name Position Len Term Encl Datatype
    FIRST_ID FIRST * | O(") CHARACTER
    SECOND_ID NEXT * | O(") CHARACTER
    THIRD_ID NEXT * | O(") CHARACTER
    LANGUAGE_CODE NEXT 3 | O(") CHARACTER
    DISPLAY_TEXT NEXT 2002 VARCHAR
    Am I missing something totally obvious in my control and data files? I've played with various combinations of delimiters (commas vs '|'), trailing nullcols, optional enclosed etc.
    Any help would be greatly appreciated!

    Use CHAR instead aof VARCHAR
    LOAD DATA
    INFILE *
    APPEND INTO TABLE test
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
      first_id,
      second_id,
      third_id,
      language_code,
      display_text    CHAR(2000)
    )From the docu:
    A VARCHAR field is a length-value datatype.
    It consists of a binary length subfield followed by a character string of the specified length.
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#20324

  • In BDC programming how can we maintain date field

    hello all
    In BDC programming how we will deal with date field?
    In my flat file my date field format is different from the sap date field format. how can we deal this?

    hi,
    just define a variable with length 10 in ur internal table.
    now pass the date format in flat file as dd.mm.yyyy.

  • Date field validation

    I have a date field on my form call order_date. I had used the application validation process against this item, and when the query button on this page is press, the will bw erroron the page against the item field. I had to delete the validation and write a javascript validation for the iitem thus:
    <scripttype="text/javascript">
    <!--
    function val_orderdate()
    var today=new Date();
    x = document.getElementById("P4_order_date")
    if (x.value > today)
    alert("Order date is later than today!");
    //-->
    </script)
    But it is not working at all upon inserting data into the the field later than today's date.
    Please how can this work. Help.
    Thank you.

    Greetings,
    First of all you got two errors in the script tags.
    <script type="text/javascript"> and not <scripttype="text/javascript">
    </script> and not </script)
    I recomend you using firebug to detect things like these.
    Because without proper sintaxe you may be lost for hours trying to repair what is already correct!
    Second recording a variable with a date isn't enough, you must cast it to date or else it won't know it is a date.
    you can do so like this:
    x = '2009/12/23';
    x = new Date(x);
    Now x contains a valid date in javascript so you can compare it.
    You should however use apropriate formats as the complete date string is probably not what you want,
    an example of a complete date:
    Thu May 07 2009 16:37:09 GMT+0100
    For more insights on date formats check this page:
    http://programming.top54u.com/post/Javascript-Convert-String-to-Date.aspx
    Here is working code for you with the complete date because i am unaware of what you need as a format!
         <script type="text/javascript">
         <!--
         function val_orderdate()
              var today=new Date();
              x = document.getElementById("P4_order_date").value;
              x = new Date(x);
              if (x > today)
              alert("Order date is later than today!");
         //-->
         </script>
    Don't forget to assign points to those who help you!
    My Homepage
    Best Regards

  • Date Field Formatting

    Hi All,
    I'm back already! Learning Flash is beginning to get to me
    again so I returned for yet more help!
    I've written the following AS code to get tomorrow's date . .
    // Calculates today's date and tomorrow's date
    var dToday:Date = new Date();
    dToday.getDate()
    trace("today: " + dToday) //today's date
    myD = dToday.getDate() + 100; // plus one day
    var dTomorrow:Date = new Date();
    dTomorrow.setDate(myD)
    trace("new: " + dTomorrow) //tomorrow's date
    var strDate:String = new String();
    var strDate = String(dTomorrow);
    trace("String: " + strDate);
    The strDate string returns the following value . . . "Tue Jul
    11 16:19:57 GMT+0100 2006".
    That is all well and good but I want to convert it into the
    following format for comparison with another field . . .
    "200607111619" which is basically the same value in the following
    format . . . "yyyymmddhhmm".
    Does the only way of doing this involve using parsing logic
    to break down the original string and then reconstruct it in the
    required format using variables from the broken down original
    string?
    I have tried looking at the Date Field object notes in my
    book but it does not give me anything as regards this programming
    requirement. The only thing I can find that might suit this purpose
    is string parsing logic. Am I right or is there an easier way to
    set a date field format?
    Any help would as always be much appreciated!
    Thanks,
    Kevin.

    I'm working on an application which requires a valid Voucher
    Number to proceed. The Voucher number is based on a combination of
    'date/time/no of items' (e.g. 20060711095802 which is today at
    09:58 (on a 24 hr clock) for 2 (02) items).
    As this date this date/time Voucher Number logic is
    essentially sequential, in that each subsequent Voucher Number will
    be greater than the last good known Voucher Number entered into the
    application (which is already stored in a variable field for
    comparison). But it must also be less than tomorrow's date, for
    which the Voucher Number would always be tomorrow's date (e.g.
    20060712 at 00:00 hrs for 00 items, thus giving 20060712000000).
    This is the value that I'm trying to ascertain from the date field
    logic.
    It would thus be really handy for comparison if I could just
    format tomorrow's date and time in the format yyyymmddhhmm and just
    add '00' to the end of the string.
    I don't like the idea of using the milliseconds value as it
    will be necessary then to convert the Voucher Number entered to a
    date field for comparison.

Maybe you are looking for