How to subtract a day from the presentation variable @{system.currentTime}

Hello,
How can subtract a day from the presentation variable - @{system.currentTime}
I use the above as a title in the report. However I want to subtract a day from the above variable. How can I accomplish it?
Thanks.

Hi,
Did you try the steps which I mentioned above. You can use TIMESTAMPADD function in many places in your report but I think not in title section of the title view.
Also you can try using Narrative view instead of title view to achieve this. Follow below steos:
* Pull another column in the report and change its fx to TIMESTAMPADD(SQL_TSI_DAY, -1, @{system.currentTime})
* Now go to the Narrative view and add the below text in Narrative section of the view.
Active Person Report as of @1
Here @1 assuming the new column created is placed before all the columns in the request.
* Also set the 'Rows to Display' as 1.
* Delete Title view from the report and this narrative view on top of your report.
Hope this helps.
Thanks

Similar Messages

  • Need to subtract one day from the date appearing

    Hi, I am modifying a script in such a way that for an output type there is an invoice date appearing.  This invoice date should be back dated to 1 date less to the actually date that is appearing currently.
    For ex the date is 2007.08.30 it should appear as 2007.08.29.
    While debugging I found that it is picking up the data for the date from the structure vbdkr and the field is fkdat. From the following code in the script.
    /:   DEFINE &SALES_ORDER& := &VBDKR-VBELN_VAUF&
    /:   INVOICE DATE,, : &VBDKR-FKDAT&
    What changes do I need to make the changes in the script or in the driver program?
    Can you please suggest?
    Thanks.

    Hi..
    You can get this Functionality by Calling a FORM (subroutine) from the Script Layout itself  There is no need to change the Print program.
    Eg:
    In the layout set -> window -> text elements. Write this before displaying invoice date
    /: PERFORM F_DATE_SUB IN PROGRAM ZPRG01
    /: CHANGING &VBDKR-FKDAT&
    /: ENDPERFORM
    INVOICE DATE,, : &VBDKR-FKDAT&
    Create the report program ZPRG01: In the program ZPRG01
    FORM F_DATE_SUB TABLES INTAB STRUCTURE ITCSY
                                                  OUTTAB STRUCTURE ITCSY.
    DATA: L_DATE TYPE D.
    READ TABLE OUTTAB INDEX 1.
    L_DATE = OUTTAB-VALUE. "you need to convert here
    SUBTRACT  1 FROM L_DATE.
    OUTTAB-VALUE = L_DATE.
    MODIFY OUTTAB INDEX 1.
    ENDFORM.
    reward if Helpful.

  • Reg : subtracting weekoff day from the time difference

    Hi ,
    I have query where I am getting time difference first of all in terms of hours as:
    DECLARE @L_TIME_DIFF   INT
    SET @L_TIME_DIFF= (DATEDIFF(hh, '05/09/2014', '05/12/2014'))
    i.e. subtracting 12th may - 9th may and getting diff in hours ..in this case it will be 3*24 = 72 hours
    All fine till here. Now next step I need to subtract from this 72 hours if falling any week off day. It can be Friday, it can be Saturday, or Sunday, or Half day Saturday, or Half Day Sunday, or Full 2 days Saturday/Sunday  .
    The above scenario is decided based on one table [CALENDER_WORKINGDAYS] which looks like below :
    CAL_WORKING_DAY 
    CAL_AM
    CAL_PM
    CAL_SEQ_NO
    Monday
    1
    1
    1
    Tuesday
    1
    1
    2
    Wednesday
    1
    1
    3
    Thursday
    1
    1
    4
    Friday
    0
    0
    5
    Saturday
    1
    1
    6
    Sunday
    1
    1
    7
    So in this case, if you look at friday (CAL_AM=0 and CAL_PM=0) this measn friday full day holiday for some country.
    Hence I need to : 72 - 24 = 48 Hours should be my output.
    In another scenario, let s say some country work half day Saturday and Sunday full day off.
    So my output should be : 72 - 36 (because 24 hours for sunday off, and 12 hours for saturday half day off) =
    36 should be my output
    and so on..
    Can you help to build such query based on the above table given ?
    Thanks

    Hi Jose Diz,
    I am trying the below logic. Seems it should be working:
    DECLARE
    @L_START_TIME    DATETIME,          
    @L_END_TIME    DATETIME,
    @L_TIME_DIFF   INT, -- Time Difference considering week offs          
    @W_TIME_DIFF   INT ,-- Whole Time Difference,
    @PUBLICHOLS   INT,
    @WEEK_OFF INT
    set @L_START_TIME    = '5/9/2014';
    set @L_END_TIME    = '5/12/2014';
    /* TO GET THE TIMDIFFERENCE */          
      SET @L_TIME_DIFF=(DATEDIFF(hh,@L_START_TIME,@L_END_TIME))          
      SET @W_TIME_DIFF = @L_TIME_DIFF          
    -- Subtracting day off in the week(i.e. sat/sun or in some case friday) if it is in between start and end
      set @WEEK_OFF= 0;
        SELECT @WEEK_OFF= @WEEK_OFF + 12 * (abs(CAL_AM -1) + abs(CAL_PM -1))
        from CALENDER_WORKINGDAYS
     IF DATENAME(WK,@L_END_TIME) > DATENAME(WK,@L_START_TIME)           
     BEGIN          
      SET @L_TIME_DIFF= @L_TIME_DIFF - @WEEK_OFF          
     END          
    Thanks to confirm

  • Subtract business days from date - calculated column

    Hello,
    I had a calculated column on a library that took two dates and found the difference between them in business days, but I am not sure how to subtract business days from a date...for instance I get a start date from a form and I need to
    subtract 10 business days from that date.
    Can anyone help?

    I've always resorted to Javascript/JQuery for that kind of function. I found an old fashioned loop worked the best for me - it supports going forward or backwards. I key it off of a change in a starting date, or sometimes a status change. My actual production
    code takes into account another list where we remove holidays and non-work days.
    newDate = getNextDate(newDate, -3);
    $("input[title='Date Due']").val((newDate.getMonth() + 1) + "/" + newDate.getDate() + "/" + newDate.getFullYear());
    function getNextDate(currentDate, offset) {
    // offset is business days
    var wkend = 0;
    var index = Math.abs(offset); // need positive number for looping
    var neg = true;
    if(offset >= 0) { neg = false; }
    var curDOW = currentDate.getDay();
    var nextDate = new Date(currentDate);
    for(var i=1; i <= index; i++) {
    nextDate.setDate(nextDate.getDate() + (neg ? -1: 1));
    var nextDOW = nextDate.getDay();
    if(nextDOW == 0) {nextDate.setDate(nextDate.getDate() + (neg ? -2: 1));} // Sunday
    if(nextDOW == 6) {nextDate.setDate(nextDate.getDate() + (neg ? -1: 2)); } // Sat
    // alert("offset is " + offset + "start: " + currentDate + ", next date is " + nextDate);
    return nextDate;
    Robin

  • Get days from the java.util.date class

    Does anyone know how to get the days from the java.util.date
    class. I'm trying to subtract two dates to get the total days between
    the two dates. Any help would be appriciated
    Rob

    If you use the getTime() method, you get the date as a number of milliseconds since a predefined time. You can do arithmetic on that number, such as subtracting two of them to get the number of milliseconds between two Dates, and so on.

  • How to export some data from the tables of an owner with integrity?

    Hi to all,
    How to export some data from the tables of an owner with integrity?
    I want to bring some data from all tables in a single owner of the production database for development environment.
    My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
    These three fields are present in the main system table (the table of contracts). Then I thought about ...
    - create a temporary table from the query results table to contract;
    - and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
    I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
    select r.constraint_name "FK name",
    r.table_name "FK table",
    r.column_name "FK column",
    up.constraint_name "Referencing name",
    up.table_name "Referencing table",
    up.column_name "Referencing column"
    from all_cons_columns up
    join all_cons_columns r
    using (owner, position), (select r.owner,
    r.constraint_name fk,
    r.table_name table_fk,
    r.r_constraint_name r,
    up.table_name table_r
    from all_constraints up, all_constraints r
    where r.r_owner = up.owner
    and r.r_constraint_name = up.constraint_name
    and up.constraint_type in ('P', 'U')
    and r.constraint_type = 'R'
    and r.owner = 'OWNERNAME') aux
    where r.constraint_name = aux.fk
    and r.table_name = aux.table_fk
    and up.constraint_name = aux.r
    and up.table_name = aux.table_r;
    -- + Dynamic SQL
    If anyone has any suggestions and / or reuse code to me thank you very much!
    After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
    Thinking...
    Let's Share!
    My thanks in advance,
    Philips

    Thanks, Peter.
    Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
    With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
    1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
    2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
    Once again, thank you,
    Philips
    Reading Oracle Docs...

  • How can I purchase products from the app store while travelling outside my country of residence?

    How can I purchase products from the app store while travelling outside my country of residence? We are from Canada, travelling in the USA and wish to buy a TV series but get a message to buy it from the Canadian store. When we tried to do this we got the same message.

    According to the terms of sale, you have to be in your country of residence in order to make a purchase. I've heard of people able to make purchases outside their country and also of people being unable to do so. It appears that Apple's enforcement is not 100%.
    In order to buy from the U.S. iTunes Store, you would need to have a valid billing address in the U.S., a credit card billed to that address or an iTunes Gift card purchased in the U.S. and be physically present in the U.S. at the time of purchase.
    International copyright law is currently very inconvenient for the consumer.
    Best of luck.

  • How to make use of the presentation variable in SQL result query

    I have 2 prompts in my dashboard.
    Prompt1 decides the values of Prompt2.
    I have set a presentation Variable (selected_comp) in prompt1 which holds the value selected.
    To populate the values for Prompt2, I need to execute a query using the presenation variable set by Prompt1.
    SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=@{selected_comp}
    the query is resulting into
    SQL Issued: SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=0
    but the value in selected_comp is "ABC".
    Can anybody help in how to make use of the presentation variable in query to get the correct value
    thanks
    Shubha

    Just use constrain check box to filter your 2nd prompt values based on the 1st prompt.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How can i receive the user name of the present operating system

    HI,all.
    how can i receive the user name of the present operating system from SAP.Have any funciton to use?Thankyou!

    use sy-uname system field.
    report ztest.
    write:sy-uname.
    thanks.
    reward if solved.

  • Reading file from the presentation server in the background

    Hi,
    I am trying to read a .csv file from the presentation server into an internal table in the background. what should I do for it? In the foreground it works fine.
    I have declared a selection parameter 'p_file' that has the path of the file. It wokrs fine in the foreground and how to set it up in the background?
    Any thoughts would be helpful. Thanks in advance,
    VG

    hii
    did you achieved the required functionality , i,e, accessing presentation server file i nbackground .
    I too got the same requirement, can you explain the process.
    There is no way you can do it... The best method is to put the file on Appln server and then call it in the background mode.
    Regards,
    Vishwa.

  • How do I calculate days from two different dates?

    Hi all,
    How do I calculate days from two different dates?
    my requirement is to pass the number of days to target field from two dates.
    Current date :  14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out  udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • How do I calculate days from two different dates in XI/PI?

    Hi all,
    How do I calculate days from two different dates in XI/PI?
    my requirement is to pass the number of days to target field from two dates.
    Current date : 14/04/2010
    Standard date: 01/01/1957 is the standard = day 0
    Is it possible in graphical mapping with out udf?
    Plz help me on this I have donu2019t have much knowledge on JAVA.
    Thanks

    Hi Yadav,
    Probably this is not the correct forum for XI / PI .
    You can post the same to...
    Process Integration (PI) & SOA Middleware
    Hope this helps.
    Regards
    Raj

  • How to show all days of the year 1900

    how to show all days of the year 1900

    As you show days for any other year.
    Do you want to catch us on the fact year 1900 wasn't a leap year?
    Regards
    Etbin
    select to_date('1.1.' || :the_year,'DD.MM.YYYY') + level - 1
      from dual
    connect by level <= to_date('31.12.' || :the_year,'DD.MM.YYYY') - to_date('1.1.' || :the_year,'DD.MM.YYYY') + 1*** not tested ***
    Message was edited by: Etbin
    user596003

  • How can receive the user name of the present operating system

    HI,all.
        how can i receive the user name of the present operating system from SAP.Have any funciton to use?Thankyou!

    Hi hong,
    1. This FM BDL_SYSTEM_INFO
        will give operating system user of the database.
    regards,
    amit m.

  • How do you recoup software from the app store after a crash?

    How do you recoup software from the app store after a crash? It's not like the old days when you bought software on CDs.

    Mac App Store: Frequently Asked Questions (FAQ) - http://support.apple.com/kb/HT4461

Maybe you are looking for

  • Using eBS adapter with FDM

    Hi All I have successfully installed and configure FDM 11.1.1 and HFM 11.1.1. I also have access to Oracle E-Business Suite. Can someone please give me a detailed step by step process to extract data from EBS to FDM (EBS adapter is also installed and

  • New keypress bug in N95 after v12 update + other b...

    Update v12 has rendered the whole phone practically useless. It misses keypresses - that is what is well known in this firmware, BUT the major pain in the **bleep** is that the end-call button doubles as a 9 on keypad and vice versa. I cannot press n

  • RIP VAN DISPLAY

    ZZZZZZZZZ..... oh.... hi there......Question: I have a G4 Mirrored super drive and a 17in Apple Display. I purchased these new back in 2002. When I put this display in sleep mode... it won't wake up. It won't ever wake up! I've screamed at it, shook-

  • Premiere CS6 crash with "serious problem"..on Macbook Pro?

    Every minute or two it will crash. I just recently bought the whole adobe suite and am mainly using premiere but I can't get anywhere with it continually crashing. My Mac info: Version 10.8.3 Processor: 2.53 GHz Intel Core i5 Memory: 4GB 1067 MHz DDR

  • Transaction DB02 not refresh data

    Hello, we have installed ECC5.0 on OS400 with DB400. We have an issue with transaction DB02, it does not show new data, i mean no refresh. The last data had some months. We have checked the transaction DB4COCKPIT and works ok, it showme actually data