Current Date in Transfer Rules Formula Editor

Hi!
Anyone aware how to get todays' date in the Transfer Rules Formula Editor?
Aim is to calculate ones actual age based on a given birthday-month-year using the dateDifference function.
Cheers

Hi,
The summary of both posts:
Use a formula
DATE_DIFF( SYST-DATUM, BDAY)
As you understand, the difference will be in days.
Best regards,
Eugene

Similar Messages

  • How to assign current date/time to a formula variable in Query Designer

    How do I assign the current date to a formula variable in Query Designer? I need to use current data in a calculation and just need the date the report was run.
    Thanks

    Hi Philip,
    There is an SAP formula variable to supply the current date in a formula. I think it is 0F_ADAY...install it from business content if you cannot see it in the query designer (formula box, under formula variables) and try using it.
    Hope this helps...

  • ACCESS CURRENT DATE in IP - FOX formula

    Dear Experts,
                    I need to pass current date as the parameter in the ATRT function but I do not have access to any infoobject of type date. If I try to access the value of a variable defined by SAP like 0dat I couldn't save the formula. Please help.
    DATA ZPM_TODAY TYPE  D.
    ZPM_TODAY  = VARV( 0DAT ).
    The CHECK function results ok but SAVE fails and there is dump in st22 on CX_RSR_COB_PRO_NOT_FOUND . Please suggest.

    I defined a function module in ABAP to return the current date when invoked then. You may try "varv" and define a variable with replacement path pointing to any pre-defined variable that gives you the current-date. Hope it helps
    Suresh Reddy

  • Filter data in transfer rules using start routine

    Hi all!
    I am an absolute newbie here, but I have a question regarding start routines and I noticed many questions get solved around here. My situation is the following: I have to create a start routine where the data to be transferred is filtered on an attribute "DESTINAT" in info object "0BILL_TYPE". DESTINAT can be 'M' or 'D' and depending on that letter, data must flow to a separate ODS.
    Well,I came up with the following:
    somewhere in my start routing I guess I'll have to put:
    loop at data_pak.
    DELETE DATAPAK Where DESTINAT = 'D'
    endloop.
    When I place this in my start routine of my transfer rules leading to the ODS where data must be of DESTINAT type 'M', will this do the trick?
    I want to put the following code in the transfer rules leading to my other ODS, where data must be of type DESTINAT = 'D':
    loop at data_pak.
    DELETE DATAPAK Where DESTINAT = 'M'
    endloop.
    I'm sorry that this is a very basic question, but like I said: I'm a newbie in SAP...

    hi Joris,
    have a lok at the foll  help docs.:
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/content.htm
    cheers
    shameem

  • Copy transfer structure transfer rules from one client to other client

    Hi
    Our R3 client 100 is mapped to BW client 100.
    R3 client 100 is source system in BW.
    As the master data is created by users in R3 client 200 we want to get the data from client 200 to BW. We dont want to replicate each datasource and do all stuff form scratch for client 200.
    Now the question is as we need to create transfer rules, transfer structure for all master data objects for client 200 in BW.
    1. Going to create R3 200 client in BW.--this is possible.
    2.Like create a transport connection in BW for client 200 for all master data infoobjects transfer rules transfer structure,process chain, infopackages..etc
    3.Do the source system mapping for new client 200.
    4.and then execute the process chain..
    What are the best ways to achieve this.
    creating all transfer structure and transfer rules only for those we are loading daily ..rather than all active ones.. How can I get the list of that master data that is loading daily.. and how easily can I create transfer structure..etc dependent objects in one go than manually.
    Any help or thoughts are appreciated..
    can anyone throw some light please....

    Hi,
    BW is not client dependent!!! When you sign on to BW, you have the client required. However, this field does not appear in any table (master data, ODS, cubes, whatever).
    This means that a same BW server with a single client can have multiple R/3 connections (for multiple R/3 clients).
    The database do not care about the client in BW. The data will be consolidated.
    So, you do not need any new client in BW, just two R/3 connections for your two clients.
    Regards,

  • Fixed report period based on current date

    I want to create a report containing records over a fixed period without using a date parameter. As a example I would like the report to continually draw on data that is no more than say ten years from the current date.
    E.g. Current date (xx/xx/2008) to (Current date - 10 years) or xx/xx/1998 then next year the formula would automatically adjust to current date (xx/xx/2009) to (Current date - 10 years) or xx/xx/1999.
    I am only a novice when it comes to designing reports so please bear that in mind.

    Hi,
    Create a RecordSelectionFormula and subtract 10 years from the current date with the DateAdd formula.
    E.g.
    //DateAdd (intervalType, nIntervals, startDateTime)
    {Table.Date} > DateAdd ("yyyy", -10, CurrentDate)
    The DateAdd function has more interval types, so you can subtract months, days, hours as well. Check the CR help file and search for DateAdd for details.
    Cheers,
    Fritz

  • Date and Time formats change in transfer rules

    Hello Experts,
    Could someone please help me to fix the following issue with DATE AND TIME format.
    I have two info objects zdate with data type DATS (length 8) and ztime with data types TIMS (length 6).
    The data in the data source (alalertdb table) is in the format of date dd.mm.yyyy and time in hh:mm:ss.
    Now when i am trying to extract the data, the load is failing because the system is taking dd.mm.yyyy length as 10 and hh:mm:ss length as 8. My infoobject
    only alows 8 for date and 6 for time.
    Do I need to write any routines in the transfer rules? If yes please share the code.
    All the inputs are much appreciated.
    Thanks in advance.
    Regards,
    Harish

    Hello ALL,
    Thanks for your inputs.
    Adios, I will try your routine if I am not tru with the formula. Thank you very much for your reply.
    Bjorn, Your formula sounds quite simple. can you please eloberate the information.
    When I used the formula for the date field its giving me an error with message FORMULA ELEMENT IS NOT ALLOWED HERE.
    Formula I used is:
    LEFT( 2, < /BIC/ZOOH_DATE> ) & SUBSTRING( < /BIC/ZOOH_DATE>, 3, 2 ) & RIGHT( 4, < /BIC/ZOOH_DATE> )
    can you also please let me know what results the formula brings.
    Thanks and Regards,
    Harish Mulaka

  • Date Manipulation in the PLD Formula Editor

    Hello Everyone
    We are busy trying to use the formula editor in PLD 2007 to display the difference ( in days) between the current date and the past posting date. Has anyone examples of how to achieve this?
    For Instance
    System Date is 2008/07/26
    Posting Date is 2008/07/01
    Difference is 25 days
    regards

    Hi Richard,
    There is no function in PLD to do this. You have to create lots of fields and use formulas. Example:
    Assume F_201 has date 1 = 2008/07/26
    Assume F_202 has date 2 = 2008/07/01
    F_220 = Year(F_202) - Year(F_201)
    F_221 = Month(F_202) - Month(F_201)
    F_222 = Day(F_202) - Day(F_201)
    F_301 = X * F_220  , were X is the number of days in a year;
    F_302 = Y * F_221 , were Y is the number of days in a month
    F_401 = F_301 + F_302 + F_222
    This doesn't give you an accurate day difference. For that, you need lots more fields, indicating the number of days in each month, calculate the exact difference of day from one month to the other, etc.
    Or you can catch the PrintPreview and Print events and update a value in the PDL report.
    Use the ReportLayoutItem Object (read more about this in the SDK help file)
    Best Regards,
    Vítor Vieira

  • I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

    I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

    I have Elements 11. Sometimes, if I edit a photo in Elements Editor, the date gets changed to the current date. Why does that happen? It doesn't happen all the time, so I can't isolate the cause. Any ideas?

  • Unable to find Transfer Rules and Data Source for 0PERSON Info Source

    Hi,
    I'am working on SALES ANALYSIS Configuration with the help of SAP Best Practices.
    I'am trying to load Master Data Attributes/Texts/Hierarchies.
    I'am able to load for allmost all the InfoPackages which i created for particular DataSource.
    Now i need to load master data for 0PERSON InfoObject under that Person (Attributes) and Person (texts) are there,for this 2 Transfer Rules and the DataSource has to be defined by default as it is defined for other Attributes/Texts/Hierarchies.But i'am unable to find a DataSource and Transfer Rules to create a infopackage for PERSON Attributes and Texts.
    Please gudie me with a solution in order to get these Transfer Rules and DataSource for this Attributes and Texts.
    With regards,
    Pradeep.B

    Hi,
    Install the corresponding master data objects from Business content. Go to data source find out the needed datasource, replicate it. If you want you can migrate it also.
    If still you are not getting 0person masterdata object datasource & transformation structure, then you have to create the transformation, Infopackage.
    Hope if you will install the business content again, it will solve your problem.

  • How can I activate the transfer rules for the ODS updating a data target.

    We are on BW 3.5 and I'm loading data into the 0FIGL_O10 ODS  and then uploading the data into the cube 0FIGL_C10. The data loads just fine to the ODS but when I try to <u><b>'update the data target'</b></u> I get a date & time stamp' error on the info-package transfer rules.
    I then Replicate the datasource 80FIGL_O01.
    I must then <u><b>'activate' the transfer rules</b></u>.
    However I cannot get the transfer rules for 80FIGL_O10 in CHANGE MODE to activate them.
    How can I activate the transfer rules for the ODS updating a data target.
    The error text is as follows:
    DataSource 80FIGL_O10 has to be replicated (time stamp, see long text)
    Message no. R3016
    Diagnosis
    DataSource 80FIGL_O10 does not have the same status as the source system in the Business Information Warehouse.
    The time stamp in the source system is 02/15/2007 10:42:33.
    The time stamp in the BW system is 11/07/2006 13:11:54.
    System response
    The load process has been terminated.
    <b>Procedure
    Copy the DataSource again and then activate the transfer rules that belong to it. You have to activate the transfer rules in every case, even if they are still active after the DataSource has been copied.</b>
    Thanks for your assistance.
    Denny

    Hi Dennis,
           Try, using Business Content to activate your data source
           hope this will help you
    How activate business content?
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a66d5e07211d2acb80000e829fbfe/frameset.htm

  • Conversion of DATS to DEC in transfer rule

    Dear all,
    I have a requirement to Activate mapping field in Infosource - transfer rule.
    I have to map ZDATE (datatype - DEC) with ZOLDDATE (Datatype - DATS).
    I know it can be directly mapped so DATS field will be automatically converted to DEC like below.
    12.07.2010 will be converted to 20.100.712.xxx.xxx
    But after mapping it, the dataload time has been increased  from 1 hr to 5 hrs.
    Do anyone has faced this issue ? how to bringdown the dataload time.
    I also wrote a simple routine....but again the dataload timin is affected.
    data : l_date type sy-datum,
             tmp TYPE AD_TSTAMP.
    l_date  = TRAN_STRUCTURE-ABRDT.
    CALL FUNCTION 'ADDR_CONVERT_DATE_TO_TIMESTAMP'
      EXPORTING
        IV_DATE            = l_date
      IV_HIGH            = ' '
    IMPORTING
       EV_TIMESTAMP       = tmp.
    RESULT = tmp.
    Pls give a solution for this problem.
    Regards..
    Bala

    thanks..

  • How to debug a transfer rule during data load?

    I am conducting a flat file (excel sheet saved as a CSV file) data load.  The flat file contains a date field and the value is '12/18/1988'.  In transfer rule for this field, I use a function call to transfer this value to '19881218' which corresponds to BW DATS format, but the monitor of the InfoPackage shows red error:
    "Value '1981218' of characteristic 0DATE is not a number with 000008 spaces".
    Somehow, the last digit or character of the year 1988 was cut and the year grabbed is 198 other than 1988.  The function code is (see below in between two * lines):
    FUNCTION ZDM_CONVERT_DATE.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(CHARDATE) TYPE  STRING
    *"  EXPORTING
    *"     REFERENCE(DATE) TYPE  D
    DATA:
    c_date(2) TYPE c,
    c_month(2) TYPE c,
    c_year(4) TYPE c,
    c_date_combined(8) TYPE c.
    data: text(10).
    text = chardate.
    search text for '/'.
    if sy-fdpos = 1.
      concatenate '0' text into text.
    endif.
    c_month = text(2).
    c_date = text+3(2).
    c_year = text+6(4).
    CONCATENATE c_year c_month c_date INTO c_date_combined.
    date = c_date_combined.
    ENDFUNCTION.
    Could experts here tell me what's wrong and also tell me on how to debug a transfer rule during data load?
    Thanks

    hey Bhanu/AHP,
    I find the reason.  Originally, I set the character length for the date InfoObject ZCHARDAT1 to 9, then I find the date field value (12/18/1988)length is 10.  Then I modified the InfoObject ZCHARDAT1 length from 9 to 10 and activated it already.  But when defining the transfer rule for this field, before the code screen, click the radio button "Selected Fields" and pick the filed /BIC/ZCHARDAT1, then continue to go to the transfer rule code screen, but find the declaration lines for the infoObject /BIC/ZCHARDAT1 is as following:
      InfoObject ZCHARDAT1: CHAR - 000009
        /BIC/ZCHARDAT1(000009) TYPE C,
    That means even if I've modified the length to 10 for the InfoObject and activated it, but somehow the transfer rule code screen always takes the old length 9.  Any idea to have it fixed to take the length 10 in the transfer rule code screen defination?
    Thanks

  • The sme variable in data selection of inpopackage and value in transfer rul

    Hello
    I would like to use the same variable in data selection of infopackage (1) and as a value in transfer rules (2).
    Example :
    If I pass 1 I want to see value1 in data selection of infopackage (1) and as a value in transfer rules (2).
    If I pass 2 I want to see value2 in data selection of infopackage (1) and as a value in transfer rules (2).
    How is possible?

    Hi Aleks,
    In the transfer routine your code would be something similar to this:
    zvar is a variable
    select LOW from RSLDPSEL into zvar where LOGDPID = '<Technical name of Infopackage>' and IOBJNM = '<The Info-object whose value you want to use>'.
    *Now assign the value
    RESULT = zvar.
    Hope this helps.
    Bye
    Dinesh

  • Date rule for current date

    Hi.
    I have a date type for which I would like to fill DATE FROM field with current date, but the field DATE TO should stay empty for manual entry.
    I defined the following rule which I assigned to my date type but the problem with this rule is that it fills both fields (date from and date to) with current date.
    <?xml version="1.0"?>
    <TimeRule>
       <TimeRuleSource>
          <ruleline>
             <AssignTimeExp displaytype="AssignTime">
                <VarTimeExp displayType="VarTime"
                            name="RESULT"
                            position="F">
                </VarTimeExp>
                <ConstLocTimeExp displaytype="ConstLocTime"
                              date="now"
                              time="000000"
                              timeunit="DAY">
                   <VarObjectExp displaytype="VarObject" name="SYSTEM"/>
                </ConstLocTimeExp>
             </AssignTimeExp>
          </ruleline>
       </TimeRuleSource>
    </TimeRule>

    solved by other way

Maybe you are looking for