Help in add days in Date

i m working with SAP B1 SP01 and i want to put delivery date in Purchase order with the help of formated search which will get date from docdate and add item lead time in this date. i have write a query for this it works well in sql server but gives error in formated search plz do help me
Select $[OPOR.docdate] + (select leadtime from oitm where itemcode='FL0001')
Regards
Rahil Hassan

Try this:
Select dateadd(d,(select leadtime from oitm where itemcode='FL0001'),$[OPOR.DocDate])

Similar Messages

  • Add-days-to-date  throwing error in formcalc

       I am receiving an error of Error: Accessor 'add' is unknow.
    Any help is much appreciated.
    Justin    

    form1.page2.invoiceTable.row1.boosterDate1.rawValue = add-days-to-date(form1.page2.page2Date,4)
    The form1.page2.page2Date is copying a cell that has:
    $.rawValue = num2date(Date(), "MM/DD/YYYY")
    I'm not sure where I'm going wrong here.  I've also tried using javascript and can't get that to work either.  I am trying to take a date and add days to it dynamically.  So user selects "weeks" from a dropdown and "years" from a dropdown and from that point I want to add that amount of days to today's date.  I can get the math to work but for the life of me I can't figure out how to make the Date() function work to add some days to it.
    Justin

  • UDF: add day to date

    Hi all,
    I'm currently working with IDoc INVOIC02, and while obtaining a date value (E1EDK03-DATUM) i have to sum one day, because for some reason they don't want that the idoc date creation is the same as other date that i map
    The only problem is not i'm not really familiar with Java functions
    - Could you help me by providing an UDF function that obtains a date (idoc format, YYYYMMDD) add 1 day to that date?
    Thanks!!

    Hi sudhir, many thanks for and your response!! (and the mail too!)
    but the problem with graphical mapping is that the map is too big! my map is more than less as your capture, but with context changes so i have to ask many times the same
    let me explain:
    1º if qualf = 002 (obtain date) and if qualf = 012 (obtain the corresponding date) are equal then map qualf012 - date+1 (i have the udf to do that in this post), if not map the date with qualf012
    2º but sometimes qualf = 002 could not come, so i have to check that first (if qualf = 012 is empty i dont need to check because the map is 1.1 so it would fail anyway)
    3º aditionally, after the big IF to check if they're equal, i have to map for if/else the qualf corresponding, but i have to check context AGAIN! because if not i'm getting the wrong qualf (the first one found)
    so i was wondering if i could just do a udf that compares the two dates, and after that sum accordingly!
    here's your example: http://img395.imageshack.us/my.php?image=getattachmentom5.jpg
    here's my map: http://img60.imageshack.us/my.php?image=mymaplz6.jpg
    if i don't do context change all the times i lost the real value!
    the problem is really solved already but i did wanted to simplify that, anyway if that's not possible i maybe left it like it's done now..

  • Need to add days to date on a "batch report in documents structure" report

    I am trying to create an expiration date based on  UDF "shelflife" formatted as number for the number of days a product has before it expries ie. 120 days. I have a UDF "expdate" formated as date. I am trying to create a date based on the receive date from purchasing. The basic math would be as follows:
    [receiving date]+[shelflife]=[expdate]. I need [expdate] to show up on the report. All UDF are on the Item master.
    Thanks for the help in advance. I am new to SAP. I am assuming formatted search. Is there a e-learning on this?

    I am believing you are talking about using this query as a Formatted search on the Expiration Field when you creating the Batches either in the Goods Receipt / Production Receipt / AP Invoice (whenever you bring this batched managed Item into inventory)
    The query I have given you is supposed to be link to the Expiration Date field on the Batches window where you enter the Batch number, quantity, etc.  The admission date is one of the columns which should be visible on the screen since my query uses this date for calculating the expiration date.
    The T0.ReOrderQty field in my query should be substituted by the user field you have on the Item Master for shelf life (I believe this is in days)
    Here is the link for formatted search PDF 
    https://websmp105.sap-ag.de/~sapidb/011000358700006374892006E/FMS.pdf
    Let me know
    Suda

  • Add Days To Date

    Hi Everyone,
    I have been reading about adding an onchange event to a field in a form. My dilemma is below;
    I have a form where there is a date field that shows the end date of something. I want to auto populate another field with that same end date plus a number of days. I can already using onchange=$x('P7_DEADLINE').value=P7_ENDDATE.value to populate the deadline field with the exact date entered in the enddate field, but I need to add thirty days to the ENDDATE to create the DEADLINE date.
    Any slick and easy ideas?
    Thanks from a newbie...
    Derek

    Hi,
    Add javascript to page HTML header
    <script type="text/javascript">
    function setDeadline(pStart,pAddDays,pSetItem){
      var d = new Date(pStart);
      d.setDate(d.getDate()+pAddDays);
      $x_Value(pSetItem, (d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());
    </script>And then item P7_ENDDATE HTML Form Element Attributes
    onchange="setDeadline(this.value,30,'P7_DEADLINE')"In this example date format need to be mm/dd/yyyy
    Br,Jari

  • Adding days of date

    Dear all
    Using form6i and run in c\s
    is it possible to add days of date.. example the format of date is 02-mar-07
    in text item i enter 3 then the date will become 05-mar-07. it depends what number will be entered in textitem and it will add to the days of date..
    |Another example is: date format is 29-mar-07.. i entered 4 in textitem the date will become 02-apr-07 ...
    Could anyone help me to do this or is there any ideas must simplest than this that can add a days of a date plz help me need in school requirements...

    Say, you have two items
    b_day.txt_refdate - the refernce date.
    b_day.txt_inc - the number which should b added.
    b_day.txt_result - to store the result.
    in WHEN-VALIDATE-ITEM of b_day.txt_inc, write
    begin
    b_day.txt_result := to_date(b_day.txt_refdate + b_day.txt_inc,'dd-mon-rrrr');
    end;

  • Require a function module to add days to a date?

    My purpose is to add days to a particular date and get the resulting date. I tried using this function module "RP_CALC_DATE_IN_INTERVAL", but the problem is this function module only accepts two digits for days. i.e. i am only able to add a maximum of 99 days to a particular date, but i do want to go further and add more so please tell me if there is any function module which shall help me add 3 digit days to a date.

    Hi Kiran,
    You can directly add days to the date.
    Eg:
    DATA date LIKE sy-datum.
    DATA days TYPE i.
    date = sy-datum.
    days = 100.
    date = date + days.
    WRITE date.
    Regards
    Wenceslaus

  • How to add a day to Date() ( i.e 2002Oct10 to 2002Oct11 )

    Hi anyone, How to add a day to Date().
    <%
    String R, fulldate;
    java.util.Date Rdate = new java.util.Date();
    R = Rdate.toString();
    String DD=Rdate_string.substring(8,10);
    String MM=Rdate_string.substring(4,7);
    String YY=Rdate_string.substring(24,28);
    fulldate = YY+MM+DD;
    //ie. fulldate = 2002Oct10 but I want it to be 2002Oct11
    %>
    pls. help and thanks a lot.

    Hi,
    Please replace the following line in your program,
    String DD=Rdate_string.substring(8,10));
    with
    String DD=String.valueOf(Integer.parseInt(Rdate_string.substring(8,10)) + 1);
    This will work fine. Basically what this code is doing is that, it will get the Integer from the String, increment it by 1 and then change the integer to the String again.
    Hope this helps,
    Rajat,
    OTN Team

  • How do you add a due date 2 days from today in a workflow

    So I'm creating a workflow that creates a task in a task list after I've added a new item to my clients list. So for example by adding a new client to the client list, a task will be set to 'Complete all contact details'. All I want to do is set a predetermined
    due date, so instead of picking the current date or a specific date I want the workflow to work out the due date 2 days from today. How can I do this? Please note that I want to be able to change the predetermined due date in the same work flow, so for another
    task I'd like it to be 4 days or a week from today.
    Thanks in advance! :)

    Hi Sarah,
    Thanks for posting your issue, 
    Go to your Tasks List and go into the List Settings. Click on the Due Dat column and tick the Calculated radio button. In the formula, put [Today]+2 and click OK. Go back to the list and select New and you'll see the Due Date is 2 days in the future.
    If you need to do this within the workflow, you'd use an Add Time to Date action, setting it up to add 2 days to the Current Item created by field. Then, you'd use an Update item action to update the Due Date field to the date variable the Add Time to Date
    action output.
    Also, browse below mentioned URL for more details.
    http://dlairman.wordpress.com/2010/10/14/limiting-sharepoint-workflow-due-dates-to-business-days/
    http://www.documentmanagementworkflowinfo.com/sample-sharepoint-workflows/4-ways-set-date-value-sharepoint-designer-workflow.htm
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Messed up again! Help to display current day and date ...

    Sorry guys and gals, I messed up again due to my noobidity, but you know the two most abundant things in the universe, are hydrogen ..... and noobidity!.
    I have this page http://www.poffertjes.ch/index.html that nicely states the current day and date and it also works on all subsequent pages.
    I needed a new page and figured I could just copy the code to the same position on this page: http://ppbm5.com/submission.html but behold, it just is not displayed at all.
    I have been going over the code many times, but I can't figure out why the current date is not displayed at all. Can someone please show me what I did wrong?

    Harm,
    I gain 5 pounds each time I look at your site. 
    Maybe this link will help you:
    http://www.mediacollege.com/internet/javascript/date-time/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How i can add days to a date using sql

    Hi.
    Sorry the question, it's a very simple question, but i'm not finding the answer to that.
    I need some function that act just like the function add_months, but instead adding months, it need to add days to a date.
    I've used the function add_days once, but now, my select returns an error code when i try to use that function.
    My Oracle version is Oracle8 8.0.5.0.0
    runnig under Linux.
    Thanks,
    Klaus Paul

    To add days just do date arthmetic. Ex
    SQL> select sysdate+10 from dual;
    SYSDATE+1
    05-MAR-00
    add_days is a not Oracle date function.
    null

  • How can I add days to a date?

    I need to find a way to add days to a date. For example, today is 10/3/03 and I want to add 180 days to that. How do I do that? Here is my code so far....
    import java.util.*;
    import java.text.*;
    public class Loan
         String date;
         String loanEndDate;
         public void setDate()
    GregorianCalendar gregNow = new GregorianCalendar();
    Date now = gregNow.getTime();
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.SHORT);
    date = shortDate.format(now);
    public String getDate()
    return date;
    public void printLoanBegDate()
              System.out.println("Loan Beg Date: " + date);
         public String setLoanEndDate()
              loanEndDate = (getDate() + 180);
              return loanEndDate;
         public void printLoanEndDate()
              System.out.println("Loan End Date: " + loanEndDate);
    The output is displayed by the following program:
    public class DemoLoan
         public static void main(String[] args) throws Exception
         Loan anLoan = new Loan();
         anLoan.setDate();
         anLoan.printLoanBegDate();
         anLoan.setLoanEndDate();
         anLoan.printLoanEndDate();
    The output is as follows:
    10/4/03
    10/4/03180 - - Why does this print the 180 afterwards? How can I get that to display the date 180 days into the future??
    Thanks

    Re: storing your dates as Dates, I mean don't have a field in your class called "date" which is a String. Have a field in your class called "date" which is a Date. If one aspect of your class is a moment in time, then use the java class that best represents a moment in time: java.util.Date. Don't make things more complicated than they have to be.
    Re: adding, it's in the docs:
    http://java.sun.com/j2se/1.4.1/docs/api/java/util/Calendar.html
    and
    http://java.sun.com/j2se/1.4.1/docs/api/java/util/GregorianCalendar.html
    But anyway it's like:
    Calendar c = new GregorianCalendar(); // now
    c.add(Calendar.DATE, 180); // 180 days from now
    Date nowPlus180 = c.getTime();
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.SHORT);
    System.out.println(shortDate.format(nowPlus180));

  • In my iPhone 4s, since I updated to the latest iOS 6.1.2 I have noticed that my battery drains very quickly, and that after 15 days after date, I lost the cell signal, I have 3g, but I can not call or receive calls or sms. HELP!

    In my iPhone 4s, since I updated to the latest iOS 6.1.2 I have noticed that my battery drains very quickly, and that after 15 days after date, I lost the cell signal, I have 3g, but I can not call or receive calls or sms. HELP!
    Sorry for my bad english :S
    Please, please help me

    Contact the carrier.

  • Add 30 days to Date?

    How do I add 30 days to Date date?
    java.util.Date date = new java.util.Date();
    DateFormat d = DateFormat.getDateInstance(DateFormat.SHORT);
    System.out.println(d.format(date));

    Maybe something like this:
    long ONE_DAY = 1000 * 60 * 60 * 24;
    Date d = new Date();
    d.setTime( d.getTime() + 30 * ONE_DAY );
    Problems can arise if your locale uses daylight
    savings time. No kidding. Use GregorianCalendar as other posters have suggested.
    Use the setTime() method to set the date within the calendar instance. Invoke add(GregorianCalendar.DATE, 30) to add 30 days to the calendar, and then call getTime() to get the new Date back.
    Also, ask yourself if you really want to add 30 DAYs or 1 MONTH. If you really want the latter, do that explicitly by calling add(GregorianCalendar.MONTH, 1).

  • Date chooser day and date not selectable

    Hello,
    Anyone knows how to make the day and date not selectable in
    the datefield or date chooser component???
    It is possible to make any one day not available, but what i
    need is only a single day not selectable..
    For example, i can make every tuesdays of a month not
    selectable But, i need to make for example the Tuesday 3rd only Not
    selectable
    Any help will be greatly appreciated.
    Cordially.
    Gerard.

    Welcome to Apple Discussions
    I believe the problem is that you have US formats for dates. Select the cells/columns that you want your date format to apply to then click the cell format inspector (the 42 in a box icon) & choose Custom… from the cell format drop-down. You will be presented with a box that allows you to make your own format. Click & hold on any of the little "lozenges" in the input bar & move them around. You may need to add a space to get the proper result.

Maybe you are looking for

  • How to find out which context attributes are mapped to view elements

    Hi All, We have a custom WD application ( on ECC 6.0 - SAP Basis 70 ) where we have a context node whose 70 attributes are displayed over 2 seperate views. When a user enters the view,  we want to inform him which data was changed.  I have written a

  • CUIC reporting in UCCE 9.0

                       Is there a way to identify all details of a unique call? Is there a specific report which would be good for this? ie. exact time of inbound call, call history of transfers

  • Documentation of services in the service registry

    Hi all, in the service registry i can publish a documentation url for enterprise services. How can i make a documenation for NON-Enterprise Services? Can i publish a URL for normal web services? How can i document a normal web service? regards

  • ADS with password encrytion for PDf docs

    Hello, I have just installed AS Java and set up ADS, it is working just perfectly, We have a requirement to encrypt the PDF (payslips) using password, we already have the required s/w codes integrated in SAP which encrypts and delivers the payslips t

  • Why use value objects?

    I am trying to delve a little deeper into Flex and have come across discussions about using value objects. My question is why would you use them? I have an application that stores records in a database using ColdFusion as a backend. Currently I use a