Automatically populate current date in udf on BOM

Hello Everyone,
I have created a user defined field on the line item of the BOM that I would like to be populated with the current date when a child item is changed, or there is a new child item added.  We're going to use this field as the "valid from" date.  I'm planning to use a search function that identifies a query which tells the system to populate this "valid from" field with the current date when a child item is added, or an existing child item is changed.  I do not know what table/field combination to use to get the current date.  Would anyone be able to help me with the query that would be needed to populate this field.  I will award points.  Thanks in advance for the help.
Jordan

Hello Jordan.
To get the current date, you need very simple SQL query:  Select getdate()
However this may only be done through manual trigger to update by Shift+F2.  If you make auto refresh by any fields, all the saved date will be override when you edit your BOM.
I will award points should be omitted because that is your obligation.
Thanks,
Gordon

Similar Messages

  • Populate current date into date field?

    I've been working on trying to get a date field to populate the current date if the user enters ' / ' into the field.  So far I have been able to replace ' / ' with a value but I am not able to populate the current date.  I have tried several suggests that on who to populate current date but have not been able to get my code functioning. 
    I have place the below code on the exit even of the date field which runs correctly but when I try to add in the date it breaks.  Any one have a suggestion?
    if  (this.rawValue == "/")
    this.rawValue = 1
    Thanks

    I have to agree with Radzmar that the workflow is quite odd. That character is a bit unique; however there are 2 ways you can get this to work. One is just to use the code snippet (below) on the Exit event of the text field where the "/" is located or you could use the Action Builder. The Action Builder is a bit easier to understand if your coding knowledge is a bit lacking like myself. Just go to the toolbar at the top, select tools then Action Builder. Each action has a condition and a result. In the condition section select the field which is going to contain the "/", make sure it is set to "is" and then in the box put /. From the result box, select "set the value of a field", select the date field that you wish to have today's date and then it make sure it says "to today's date". Then whenever someone puts "/" into the text field, the date field will populate today's date automatically.
    if (this.resolveNode("$").rawValue == "/") {
      this.resolveNode("DateTimeField1").rawValue = util.printd("yyyy-mm-dd", new Date());

  • How system will automatically populate clearing date field for invoices paid similar to when payments are made to the vendors

    Hi SAP Gurus,
    Could you help me on this, How system will automatically populate clearing date field for invoices paid similar to when payments are made to the vendors.
    Regards
    Mohan

    Hi Ramakrishnappa,
    If you clear the invoice against payment, then the invoice clearing date would be payment document posting date.
    Regards,
    Mukthar

  • How to create a Date or time field that automatically saves current date or time?

    hello,
    i want to know that how to create a Date/Time field that automatically shows current Date/Time when .pdf form is opened.
    also want to how to stop user to give input in Date/Time field
    currently im putting a Date field but it is accepting user input.
    hoping for quick response
    Thanks in advance!

    You can place the below code in the initialize event of the field to display the current date and time.
    Set the language to FormCalc.
    You can play around the formats to get the desired format of date and time.
    if($.rawValue eq null or $.rawValue eq "") then
    $.rawValue = Concat(Num2Date(Date(), "MM/DD/YYYY")," ", Num2Time(Time(), "h:MM:SS A"));
    endif
    You can not restrict the input area in Date time field instead you can validate the input while existing the field.
    (OR) set the field to either readOnly or protected mode.
    Thanks
    Srini

  • Formula automatically populate the date when inventory goes to "zero"

    Hello- I am trying to create a formula that will automatically populate the date when inventory goes to "zero".
    Date: Row 3 Columns P-AB
    Inventory: Rows 5-400 Columns P-AB
    Column J rows 5-400 is where I want the inventory run-out date to auto-pop
    with so many rows of data, where stock goes to "O" will clearly vary per row. I want this formula, to look between Col. P-AB and tell me in Col. J when my inventory goes to "zero"
    Thank you!

    Thank you for your reply...using your formula, I'm still not coming up with inventory run-off date from row 3.
    I need Column J to give me the date when my inventory is "0".

  • How to populate Current Date and Time in OAF page through CO

    Hi all,
    How can we generate the current system date(without using "select sysdate from dual"), in OAF controller page (processRequest) to an OAMessageDateFieldBean?
    When i use the following code, the month is always displayed as January only.
    In OAF page its displayed as : 26-Jan-2009 15:46:30
    Using System.out.println : 2009-05-26 15:46:30.0
    Kindkly help me in this regard.
    Code*
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    SimpleDateFormat f = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
    String dateString = am.getOADBTransaction().getCurrentDBDate().toString();
    java.sql.Date sqlDate= new Date(f.parse(dateString).getTime());
    OAMessageDateFieldBean dateField =
    (OAMessageDateFieldBean)webBean.findIndexedChildRecursive("currentDate");
    dateField.setValue(pageContext,sqlDate);
    System.out.println(am.getOADBTransaction().getCurrentDBDate().toString());
    Regards,
    Joe

    Hi Joe,
    Change the line of code....
    from
    SimpleDateFormat f = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
    to
    SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
    It will work....
    Thanks
    Anoop

  • Automatically add current date to contact sheet?

    Is there some code/script that can be added to the footer text area that will cause a date to be automatically added to the footer like there is in Microsoft products?
    For instance in Word you can put &date, &time to have the date and time added automatically in the footer.
    I use the contact sheet feature to print out screen shots of items that may change on a regular basis and having a date will let me know which is the most recent. I can type it in maually, but thought there might be  a way to have the application do this instead.
    Thanks for any help!

    You could try looking in the Bridge Scripting forum at  http://forums.adobe.com/community/bridge/bridge_scripting

  • How to default current date in MIGO while creating a return delivery

    HI,
    While creating the return delivery using 122 mov type, system is defaulting the document date of the original doc which is being referred as the document date of the return delivery document.
    How we can make the system to populate current date as document date automatically, even though we are referring a material doc to create the return delivery. Pl suggest.
    Regards,
    Robin

    HI,
    My question is,
    How we can make the system to populate current date as document date automatically, even though we are referring a material doc to create the return delivery. Pl suggest.
    Regards,
    Robin

  • How to display the username and current date in OAF  page Footer region

    Hi,
    I need to display the username and Current-Date in footer region.If anybody knows the procedure then please share with me.
    Thanks
    Divya Agarwal

    Hi,
    Read this Thread:--
    You have to capture the UserName and Date in the Process Request Method of page Controller and invoke a method which will subsequently get and set the value in some attribute.
    String userName = pageContext.getUserName();
    How to populate Current Date and Time in OAF page through CO
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • What is the formula for automatically entering todays date into Numbers.  In Quattro, it was '@today', but I cannot find it in numbers.  Thx

    What is the formula to automatically enter 'current date' into spreadsheet?  In Quattro, it was '@today', but I cannot find it in the Numbers spreadsheet.  Thx

    201,
    Do you want it to update or always show the date when entered?
    For updates, use the TODAY() function.
    For a static date, use Insert > Date and Time.
    Regards,
    Jerry

  • Can I make a checkbox populate the current date?

    I've been asked to make a form that has quite a few checkboxes.  These checkboxes also need to be marked with a date when checked off.
    Rather than have the person filling out the form type the date every time they check the box, they request that when the user clicks the checkbox that a current date show next to the checkbox.
    I don't know if this can be done with a current date stamp or with having a text box that populates with the current date, etc.
    The forms are also going to be used throughout multiple days, so I can't just call on a "current date" and show/hide that text box like I had originally thought to do.
    I'm also really green to scripting so any help or guidance in the right direction would be much appreciated.
    Thank you.

    The following Mouse Up script for a check box will set the associated text field to the current data when it's selected, and blank the field when not:
    // Mouse Up script for check box
    (function () {
        // Get a reference to the text field
        var f = getField("text1");
        // Set the value of the text field
        if (event.target.value !== "Off") {
            f.value = util.printd("mm/dd/yyyy", new Date());
        } else {
            f.value = "";
    Replace "text1" with the name of the associated text field.

  • Automatically add a current date at the end of the comments

    Hi,
    I have a form on a table with 5 fields... on one the field I am asking my users to enter comments...
    I am looking for a functionality to automatically add a current date at the end of the comments, only when they are updated or newly filled in...
    Please advice how can I do it... I am anticipating some sort of a trigger on column (when the data is modified)...
    Thanks

    automatically add a current date at the end of the comments, only when they are updated or newly filled inDo you want to add the date to the page item itself and hence show it to the end user as and when its changed, thn
    Assuming comments item is named '*P1_COMMENTS* , add the following to the "execute on load"
    $('P1_COMMENTS').change( function(){
      var d = new Date();
      $s('P1_COMMENTS', $v('P1_COMMENTS')+ d.toUTCString() );
    });If its to be done only when updating ie in the PLSQL block
    UPDATE <table name>
    SET <comments _column> = (  SELECT DECODE(  NVL(<comments _column>,'')
                                                                          ,NVL(:P1_COMMENTS,'')
                                                                          ,<comments _column>
                                                                          ,:P1_COMMENTS||TOCHAR(SYSDATE,'DD-MON-YYY')
                                                  FROM DUAL
    WHERE <condition>

  • How to auto populate a column/SharePoint list with Current Date?

    I have a SharePoint list and I created a column called ‘CurrDate’. 
    I need this column to;
     Display the current      date,
    Auto populate all rows with the current date in the      SharePoint list
    Dynamically update with the current date
    I first tried creating the column using the default SharePoint interface Date Time but it’s not doing any of the steps listed above:
    I even tried entering =[Today] in the Calculated Value field. 
    Still nothing…
    So, I’m sure you will toss out a code snippet to make this work, which is great. 
    However, I’m a total noob with SPD, where the heck do I insert this snippet?
    Always in need of help.

    Hi ,
    I understand that you want to add a column  to a list to hold current date. Here is a workaround:
    Add a single line of text column to the list. Name the list as Today.
    Add a calculated column to the list. Use the [Today] as the formula. Set the calculated column to be Date and Time type.
    Delete the Today column from the list.
    Thanks,
    Entan Ming
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please [email protected]
    Entan Ming
    TechNet Community Support

  • Pre-populate data and current date only when it routes to that person

    Hi,
    Can  any one please advise how to pre-populate the manager's name when it routes to the manager but not when the user fills the form.
    Example: user fills the form and submit it to the manager, the process has the query to look up for the manager to route it to him for approve/deny. How can I have the manager's name to pre-populate so he/she does not have to type their name and current date to approve/deny the form.
    Thanks in advance,
    Han Dao

    Paul,
    If I have the codes to execute the WS at the initialize event then it does populate the manager info when the user fills the form but when I try to move the code to the pre-submit event which try to execute WS when it route to the manager. I know I did not do it right but have no idea how to make it work.
    Is there a way to execute the WS when it routes to the next person rather than when the user fills the form?
    Thanks,
    Han

  • Showing "current date - 8 hours" automatically

    Hi,
    For a report, I want to create two dashboard prompts. The second one should show the current date, and the first one should be "current date - 8 hours" automatically. For example;
    1. 5/11/2007 3:52:04 AM
    2. 5/11/2007 11:52:04 AM
    I can create the second one following these steps;
    “default to > variable expression” --> “@{system.currentTime}[dd/MM/yyyy hh:mm:ss]”
    What about the other? How can I create the first one?
    Thanks for your help, br,

    as SQL:
    select TimestampAdd (SQL_TSI_HOUR, -8, Current_Timestamp(0) ) from SubjectAreaName where TableName.ColumnName = 'some-existing-value'
    Note that -- from SubjectAreaName where TableName.ColumnName = 'some-existing-value' -- needs to evaluate to true.

Maybe you are looking for