Query need (Today's date - schedule date) --- Important

Hi
I have BEx report. One of the fields in this query is a date field i.e. schedule date (characteristic). I want to add up one more field in my query which will show me (today's date - schedule date). I dont know how to implement it.
Pls let me know
Thanks...

What about "Query date" to be used as today's date. Or do it in user exit variable in ABAP via sy-datum variable.
Check out following:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a?quicklink=index&overridelayout=true
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d?quicklink=index&overridelayout=true

Similar Messages

  • I need today's date in 030213 Format. And today's Day.

    Hi,
    Is there a Date method that would yield ==> 030213 as
    a string for today? Also today's Day, as in
    Thursday.
    How would I use it ? String dat = Date.xxmethod() ?
    Any help will be appreciated. Thanks.
    -- gte99te

    Thank you, I tried the fix in the "import .... SimpleText..." and it works.
    I had to fix the "instantiation -- new " line too. The following codes
    compiled successfully and also works.
    1 Question: What method in Calendar class to use to get today's
    day,.... ex. "Friday" or "5" etc. as a return string ? Can some-one
    code that into the program. So, I can say System.out.println(day) ,
    which will yield ===> Friday ( or 5 ). Thanks for any help,... and
    I am learning quite a bit about Java. --- gte99te
    kdate.java <--- works so far, without Day return yet.
    ====================================================
    import java.io.*;
    import java.util.*;
    import java.util.Calendar ;
    import java.util.Date ;
    import java.text.SimpleDateFormat ;
    class kdate
    public static void main(String args[])
    Calendar today = Calendar.getInstance();
    SimpleDateFormat df = new SimpleDateFormat("yyMMdd");
    String date = df.format(today.getTime());
    System.out.println(date) ;
    ==================================================

  • Query needed to retreive data

    Hello,
    There is Selection Screen where it allows to enter KUNNR, LAND1 and VBELN.
    I want to display below fields from table specified.
    VBELN, FKART, FKDAT WAERK, KUNRG, KUNWE from VBRK Table, BSTNK, VBELN, AUART from VBAK Table, POSNR, MATNR, FKIMG, WAVWR from VBRP Table, KBETR from KOMV and MWSBP from KOMP.
    So i need to find out query to display above fields data as output as per input in selection screen. default values if nothing entered in Selection screen are all data.
    Please help me with Program or Query to retrieve above data.
    Thanks,

    Well... you seem to be new to ABAP.. hope this helps.....
    select VBELN, FKART, FKDAT WAERK, KUNRG, KUNWE
    from vbrk
    into table t_vbrk
    where vbeln = s_vbeln. " given in selection screen
    if sy-subrc = 0.
    endif.
    select BSTNK, VBELN, AUART
    from vbak
    into table t_vbak
    where vbeln = s_vbeln.
    if sy-subrc = 0.
    endif.
    Similarly write the other select queries as well.
    Its very useful if you pass the key fields while selecting from the database.  Helps in faster processing.
    Regards.

  • Query for todays Posting Date

    Currently my query is as follows, I want to create report that pulls produciton orders that are either planned or released where the post date is today...as my understanding getdate() does not work...may I get some assistance?
    SELECT T0.[DocNum], T0.[PostDate], T0.[DueDate], T0.[ItemCode], T0.[PlannedQty]
    FROM OWOR T0
    WHERE T0.[PostDate] = GetDate() AND
    T0.[Status] = 'p' OR
    T0.[Status] = 'r'
    Thank you
    Sarith

    Hi Sarith,
    Try:
    SELECT T0.DocNum, T0.PostDate, T0.DueDate, T0.ItemCode, T0.PlannedQty
    FROM OWOR T0
    WHERE DateDiff(dd,T0.PostDate,GetDate()) = 0 AND T0.Status in ('p','r')
    Thanks,
    Gordon

  • Query needed for Cumulative data

    HI Friends,
    I need output like this.
    Frequency     Percent (%) Cumulative
    Frequency     Cumulative Percent
    4468     0.91     4468     0.91
    21092     4.31     25560     5.23
    57818     11.82     83378     17.05
    6274     1.28     89652     18.33
    I am using Oracle 9i.
    My output data like this and I need to write the query for 3 columns (Percent ,Cumulative frequency and Cumulative percent)
    1:The formula for Percent column data is (Frequency/Sum of cumulative frequency)*100
    2:The formula for Cumulative Frequency column data is (Cumulative of Frequency column data)
    3:The formula for Cumulative Percent column data is (Cumulative of Percent column data)
    What should be the analytic function and how to write the query.
    Thanks,
    Lony

    Hi Friends,
    I need output like this.
    Frequency Percent (%) Cumulative Frequency Cumulative Percent
    4468 0.91 4468 0.91
    21092 4.31 25560 5.23
    57818 11.82 83378 17.05
    6274 1.28 89652 18.33
    I am using Oracle 9i.
    My output data like this and I need to write the query for 3 columns (Percent ,Cumulative frequency and Cumulative percent)
    1:The formula for Frequency column data is sum of (dd+cc+mc_cc_mc).
    1:The formula for Percent column data is (Frequency/Sum of cumulative frequency)*100
    2:The formula for Cumulative Frequency column data is (Cumulative of Frequency column data)
    3:The formula for Cumulative Percent column data is (Cumulative of Percent column data)
    What should be the analytic function and how to write the query.Please find the sample data and table script.
    CREATE TABLE all_lony (
    campno varchar2(20),
    dd INTEGER,
    cc INTEGER,
    mc INTEGER,
    cc_mc INTEGER
    insert into all_lony (campno,dd,cc,mc,cc_mc)
    values(36,156,1320,445,2547);
    insert into all_lony (campno,dd,cc,mc,cc_mc)
    values(40,233,19711,263,885);
    =============
    Please find my query below
    SELECT campno
    || ','
    || dm
    || ','
    || cc
    || ','
    || mc
    || ','
    || cc_mc
    || ','
    || frequency
    || ','
    || per
    ||','
    ||cumulative_fr
    ||','
    || SUM (per) OVER (ORDER BY per ROWS UNBOUNDED PRECEDING)
    FROM (SELECT q3.campno campno, q3.dm, q3.cc, q3.mc, q3.cc_mc,
    q3.frequency, q3.cumulative_fr,
    (q3.Frequency / SUM (q3.cumulative_fr)) * 100 per
    FROM (SELECT q2.campno campno, SUM (q2.dm) dm, SUM (q2.cc) cc,
    SUM (q2.mc) mc, SUM (q2.cc_mc) cc_mc,
    (SUM ( NVL (q2.dm, 0)
    + NVL (q2.cc, 0)
    + NVL (q2.mc, 0)
    + NVL (q2.cc_mc, 0)
    ) frequency,
    SUM (SUM ( NVL (q2.dm, 0)
    + NVL (q2.cc, 0)
    + NVL (q2.mc, 0)
    + NVL (q2.cc_mc, 0)
    ) OVER (ORDER BY SUM ( NVL (q2.dm, 0)
    + NVL (q2.cc, 0)
    + NVL (q2.mc, 0)
    + NVL (q2.cc_mc,0)
    ) ROWS UNBOUNDED PRECEDING)
    cumulative_fr
    from all_lony
    q1 )q2
    GROUP BY q3.campno) q3
    GROUP BY campno, dm, cc, mc,cc_mc, frequency,cumulative_fr)
    Can anybody just verify the query and let me know.

  • Query Needs to Update Date

    hi,
    In my table i hav userid,user associationdate,user expirydate
    now i want to extend(update not select) all the user's expirydate to another one year and this should be done in SINGLE QUERY. how can i do this ?
    SQL> desc t_user_license
    Name Null? Type
    USERID NOT NULL VARCHAR2(25)
    LICENSEID NOT NULL NUMBER(38)
    ASSOCIATIONDATE NOT NULL DATE
    EXPIRYDATE NOT NULL DATE
    select userid,add_months(expirydate,12) from t_user_license;
    this query extends expirydate to another one year.but not make changes permanent.
    but i want to update expiry date to another one year that too in single query and make the changes permanent. how can i do this .............
    can anyone plz help me
    With Regards
    Boo

    Hi,
    update t_user_license
      set EXPIRYDATE = add_months(EXPIRYDATE,12);Check the results via
    select * from t_user_license;and finally commit;Regards,
    Yoann.

  • Query need for transpose data output

    Dear All,
    I have a query regarding transpose output.
    for ex. I created one table employee in database
    create table emp(emp_no number,dept_id number(10));
    it is having data like....
    emp_no dept_id
    101 10
    102 20
    103 10
    104 10
    105 20
    so I want the output in transpose format like
    dept_id emp_no1 emp_no2 emp_no3
    10 101 103 104
    20 102 105
    can anybody suggest me any query for the above output.
    Thanks...
    Prashant....

    select dept_id
         , max (decode (emp_no, 101, emp_no))
         , max (decode (emp_no, 102, emp_no))
         , max (decode (emp_no, 103, emp_no))
         , max (decode (emp_no, 104, emp_no))
         , max (decode (emp_no, 105, emp_no))
      from test
    group by dept_idas in
    SQL> with test as
      2  (
      3  select 101 emp_no, 10 dept_id from dual union all
      4  select 102 emp_no, 20 dept_id from dual union all
      5  select 103 emp_no, 10 dept_id from dual union all
      6  select 104 emp_no, 10 dept_id from dual union all
      7  select 105 emp_no, 20 dept_id from dual
      8  )
      9  select dept_id
    10       , max (decode (emp_no, 101, emp_no)) emp1
    11       , max (decode (emp_no, 102, emp_no)) emp2
    12       , max (decode (emp_no, 103, emp_no)) emp3
    13       , max (decode (emp_no, 104, emp_no)) emp4
    14       , max (decode (emp_no, 105, emp_no)) emp5
    15    from test
    16   group by dept_id
    17  ;
       DEPT_ID       EMP1       EMP2       EMP3       EMP4       EMP5
            20                   102                              105
            10        101                   103        104

  • Extract data from Query to a Flat File - scheduling in the background

    Hi All,
    We need to extract data from a query to a flat file periodically, but each time 10 separate executions based on 10 profit centers, to get the separate files.
    So, we have PC1, PC2, ... PC10 Profit centeres.
    We have Query1, with profit center variable.
    We have created 10 variants for Query1 so that we can execute for 10 profit centers.
    Now, we have used RSCRM_BAPI to execute the Query1 and write to a flat file. Now we are having a problem in getting this feature used to execute the query automatically for 10 different varaints.
    Thanks in advance,
    _ Shashi

    Shashi,
       You can try using Information Broadcasting or Reporting Agent. You can schedule this in Information Broadcasting.
    check this link for Information Broadcasting... <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm</a>
    Nagesh Ganisetti.

  • How can I use today's date as default value in query string filter web part in SharePoint

    I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...

    Hi,
    Per my understanding, you might want to set a default value to the Query String Filter Web Part.
    It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
    By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
    of browser.
    If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
    URL into the address bar:
    http://sharepoint/SitePages/Page1.aspx?t=value1
    Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
    page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
    About how to redirect user to other page with an URL:
    http://www.tizag.com/javascriptT/javascriptredirect.php
    How to get today’s date using JavaScript:
    http://www.w3schools.com/js/js_dates.asp
    Best regards      
    Patrick Liang
    TechNet Community Support

  • HT1766 i update my phone today but i loss backup important data & there is no backup in icloud

    i update my phone today but i loss backup important data & there is no backup in icloud

    This feature is only availabe if you are currently running ios 5.
    Update as always.
    Turn on computer.
    Open itunes
    Connect iphone

  • Date query doesn't show results for today's date

    Hello everyone. I use Jdeveloper 11.1.1.3.0 with ADF and I have a view named query with just one field, Date. The operator it is using is equal to a value written in the field. The problem is that when I insert a row into the table (the date is automatically set to the current date on insertion) and I look for today's date it returns nothing. However if I leave the field empty it will find me the row. I tried doing this with the timestamp option but it's not very user friendly as the user would have to type in the time the row was inserted in order to find it, or use the between operator for two fields which is something I want to avoid if at all possible
    The requirement is one field query that lets the user choose a date from a calendar and shows all rows inserted on that date (even if the date is today and the row was inserted a few minutes before).
    Edited by: Dino2dy on Apr 6, 2011 2:50 AM

    Dino2dy,
    My guess is that the data being stored in the DB has a time component associated with it (as it would if you were using something like SYSDATE to populate it). When you are trying to look for data with today's date, you are checking just for the date - which in Oracle is the equivalent of midnight on the start of the date. The dates don't match because the time is different.
    Either store the date with no time component (use TRUNC to remove the time), use a BETWEEN comparison, or TRUNC the date when comparing.
    John

  • Display difference of a Date field and today's date in the query

    hi experts,
    I have a query which has a date field called 'Effective Date.'
    I just need to a add a column in the query that shows me the diffenrence between 'Effective Date' and the date the query is run (key date).
    Do i need a custom exit to accomplish this?
    The new column can either display the number days elapsed from 'Effective Date' to the key date or it can also display Number of Years/ Months / days.
    Any ideas?
    Thanks,

    Check this if it helps:
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html

  • Data transfer workbench, getting errors do a scheduled ODBC import

    i am trying to schedule and automated import using an ODBC connection, i have setup the connection on my PC and have run the transfer workbench manually using this connection and all is working ok.
    but i have saved this import to an .xml file so that i can schedule the import, but when running this i get the following 2 errors
    "Can not connect to ODBC data source" and "Can not get SQL handler"
    the data source is an oracle 11i database, and i say this works fine when running the import manually using the workbench.
    I have noticed that the .xml file does not have the oracle database password saved in it anywhere, i don't know if this is the problem or not
    any help would be appreciated.
    thanks
    dave

    I think u will get answered frm this link
    Re: DTW and ODBC Connections from Batch File
    also check this link
    DTW and ODBC Connections - Automated process
    Edited by: Jeyakanthan A on Aug 18, 2009 12:55 PM

  • BAPI_PROCORD_CHANGE need to change GLTRS (scheduled finish date)

    Hello -
    I am writing a program where I need to change the scheduled finish date (field GLTRS) in a process order (transaction COR2).  I would like to use the bapi BAPI_PROCORD_CHANGE but it does not contain that field in the input structure. 
    Does anyone have any ideas how I can change that field without writing a BDC?  I am also curious to know why it was excluded from the bapi in the first place.
    Thanks!

    Hi Ferry,
    Thank you for your quick reply!
    That is very close to what I need, but it only updates GSTRS (scheduled start) and I need to update GLTRS (scheduled finish). 
    Can you think of any other suggestions?  I have also looked at BAPI_ALM_ORDER_MAINTAIN, but it doesn't have GSTRS as an input either, and doesn't seem to work for the order type I need.
    Thanks again,
    Susanna

  • QUERY TO PRINT THE DATE OF NEXT FRIDAY THAT IS SIX MONTHS FROM TODAY

    CAN ANY PLZ LET ME KNOW THE QUERY TO PRINT THE DATE OF NEXT FRIDAY THAT IS SIX MONTHS FROM TODAY.THE OUTPUT DATE FORMAT SHOULD BE AS SHOWN IN THE EXAMPLE.
    (Eg) : TODAY: 24-FEB-09          
    NEXT_FRIDAY_AFTER_SIX_MONTHS: 28-AUG-2009 (FRIDAY)
    USING DUAL TABLE

    Laurent Schneider wrote:
    yes, but when I create a view, I cannot guarantee that every client accessing this view will be using English, can I?You're in an environment where you can't guarentee that, I agree. I'm in an environment where I very luckily can guarentee it. But in general, I take your point *{:-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Apps don't work after sync

    After syncing iPhone to iTunes (on Mac), I can not use any of my downloaded apps until I download a new one. I think this has to do with the fact that iTunes is linked to [email protected] while the iphone insists on using [email protected] If this i

  • Syncing "selected groups" of contacts via iTunes to iPad grayed out

    I'm trying to sync only selected groups of contacts and selected calendars to my iPad 2 (iOS 8.1.2) from my MacBook Pro (OSX 10.10.1 Yosemite). I am syncing over wifi, but NOT over iCloud. However, when I go into iTunes, go to "Info", and try to sele

  • Timer Task Mysteriously exiting.

    Hello I have a server up and running and it has some timer tasks which was started by the following command: timer = new Timer(false); timer.schedule(myTimerClass, 1200, 1200); This task has been running fine for years, but now sometimes appearingly

  • To solve this query

    i want solution for shape & append query as run in access for oracle RS.Open "SHAPE {select ID,MAX(Module_Name) AS MainMenu from USER_MODULE GROUP BY ID} APPEND ({select ID,NAME,USER_module.srno,iif(right(param_str,1)='P','ü','') as Allow,iif(left(pa

  • CS4 crash/unstable when doing mp3 preview

    Hi! I recently have this issue. When i put my like any mp3 file into source preview window and try to find the right spot to crop it or just preview it the file starts to play smoothly but... it doesnt wont to stop! Like premiere stops responding. So