Number  of days (current date-goods receipt date)

Hi All,
I have a requirement like this :
need to display no of days in Query which is CKF=current date-GR date.  GR date is coming from r/3.We do not have current date field. and moreover no of days is in the selection screen.So we should have no of days calculated already in the cube.am i rght? calculation shold be done before data comes into the cube i.e in transfer rules or update rules...thats what i thought.Am i rght? can anybody come up with some code to calculte no of days in transfer rules or update rules?
pl correct me if i am wrong.
regards
Message was edited by: cmd

When your write code in transfer rules it will be global.
if u write code in update rules it will local to on data target.
Transfer rules----
InfoSource
Update reules----
data target.
here infosource is re-usable to other datatargets, so it will effect to all.
but update rules is only one data target.
i think u clar about this.
pls assgain poinst, if u satify.
by
ANR

Similar Messages

  • Function module which convert number to days to date

    Hi,
    Any one knows any function module which convert total number of days into date.
    thnaks,
    shilpa k

    Hi,
        FIMA_DAYS_AND_MONTHS_AND_YEARS
    FI_PSO_DAYS_MONTHS_YEARS_GET
    RSSM_CONVERT_DAYSEC2TIMESTAMP
    RSSM_CONVERT_TIMESTAMP2DAYSEC
    Function Modules related to Date and Time Calculations
    DATE_COMPUTE_DAY : Returns weekday for a date
    DATE_GET_WEEK : Returns week for a date
    DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
    MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
    END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
    HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
    FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
    MONTH_NAMES_GET : Get the names of the month
    WEEK_GET_FIRST_DAY : Get the first day of the week
    HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
    SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
    HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
    LAST_DAY_OF_MONTHS : Returns the last day of the month
    Regards

  • Is it possible to add number of days to date?

    I am working on a form where I need to add number of days to a date and come up with a date.
    Header 1
    Header 2
    example date:  March 1, 2013
    + 30
    = march 31 2013                
    1. is this possible? Header1/cell 1 is a date field. Header 2/cell 1 is a dropdown field (30, 60, 90,120, custom),.
    Header2 cell2 not sure what field to use date or text?
    thank you

    Never mind I figured it out. Thanks

  • Number of Days in Date and 7pm anomaly

    I have found a bizarre behavior with find the number of days for a date( since Jan. 1, 1970 ). I needed a way to calculate the number of days between two dates. I did this by using the getTime() method on the dates, then dividing them by one day in milliseconds (86400000). I then cast them to an int to trucate the decimals. This gave the number of days since Jan 1, 1970. I then subtracted the two 'number of days' values to get the number of days between the 2 dates.
    This was working fine until we ran into a problem of it returning one day to many in a seemingly random pattern. The problem ended up being that after 7pm dividing a date in milliseconds form by a day in milliseconds would return one more day, than if the date was before 7pm.
    example:
    November 1, 2004 00:00:00 = 1099288800000ms = 12723.25 days = 12723 truncated
    November 1, 2004 19:00:00 = 1099357200000ms = 12724.04 days = 12724 truncated
    Why is this? Why is 12am Nov 1 not an even number of days? Supposedly the Date class starts from Jan 1, 1970 00:00:00. If everyday is 86400000ms then this behavior shouldn't happen. Does anyone know why this anomaly happens?

    You need to take into account time zone. If you are at GMT+0 there is no problem (unless you switch to daylight sayings :)
    For example you can take a System.currentTimeMillis() and send it anywhere in the world and it would display locally with the right time.
    I guess you are at -5 hours from GMT. (Eastern time of the US/Canada timezone). The Date object makes corrections for timezone.
    So in England, the time would have been 0 at Jan 1 1970, 00:00:00
    Another thing you may need to worry about is daylight savings changes, which again are handled by the Date object.
    The simplest thing to do is use the Date object. If this is a performance issue you can do some tricks to reduce the impact. e.g. store the default Timezone and Local locale as constants and use these to build the Date object.

  • Adding Number of days to date in XI

    Hi
    I have a scenario where in i have add the number days to date.
    ex: if the date is 02092009 and if the days is 30. then the result of adding days to the date should be 02102009.
    Do we have any readily available UDFs in XI if not it would be appreciated if i can get some procedure to implement this.

    Hi ,
    you can use this code in user defined function
    Calendar cal = Calendar.getInstance();
    /* here u can parse the individual values for year month and day, other calendar function are also available .*/
    cal.set(1999,11,28); 
    /* here instead of value 30 u can pass the specific node integer value to add the no of days.*/
    cal.add(Calendar.DATE, 30);
    return cal.getTime().toString();
    Regards,
    Syed

  • Confused - How to Calculate Number of Days Between Dates but Exclude Weekend Dates If There Hasn't Been a Weekend Update

    Hello -
    I've been tearing my hair out over this problem i'm trying to solve, probably just been staring at it too long which is making it worse -
    I have a series of open support tickets which are supposed to be updated on a daily basis, the problem is that they aren't always being updated daily.  So, the business wants to know the number of days from when a ticket was last updated and today's
    date.  I have this basic calculation and it's working fine, however now the business wants to exclude weekends from the calculation.  The other problem is that some reps DO go in on weekends and update their tickets, so sometimes there will be updates
    made on weekend dates.
    To give an example -
    Today's date is 2014-02-10 (Monday).  A ticket was last updated last Thursday, 2014-01-30.  The difference between the two dates is 11, so it's been 11 days since the ticket was last updated.  Now, if I exclude Saturdays and Sundays, then
    it's actually been 7 days since the ticket was last updated.  I'm not sure how to do this in T-SQL.
    Now, to further complicate the problem, sometimes a ticket IS updated on a Saturday or Sunday.  So, if a ticket was updated on 2014-02-02 (Sunday), then it should be counted.  Again i'm not sure how to do this. 
    What gets me is that this is probably fairly simple and i've just been staring at it too long.  In the meantime, can someone offer some guidance?
    Thanks!!

    I've adapted this from a function on my blog. you will need to add set the YourTicketTable to where ever your tickets are stored.
    CREATE
    FUNCTION [dbo].[CalcWorkDaysBetween](@StartDate
    As DateTime,@EndDate
    AS DateTime)
    RETURNS
    INT AS
    BEGIN
    SET @EndDate
    =DATEADD(DAY,1,@EndDate)
    DECLARE @Count
    AS Int= 0
    DECLARE @Date
    As Date=@StartDate
    WHILE @Date
    < @EndDate
    BEGIN
    IF (DATEPART(WEEKDAY,@Date)IN(1,7)
    OR (SELECT
    Count(*)
    FROM YourTicketTable WHERE TicketDate=@Date)=1)
    BEGIN
    SELECT @Count = @Count
    + 1
    END
    SELECT @Date=DATEADD(Day,
    1,@Date)
    END
    RETURN
    DATEDIFF(DAY,@StartDate,@EndDate)- @Count
    END
    Regards,

  • Serial Number changes not allowed at Goods receipt level

    Hi Gurus,
    I have created serial number at the time production order creation. But at the time of goods receipt my user change the serial number manually and save the document. My requirement is system should not allow changing the serial number in goods receipt level. 
    Example:
    Prod. Order:  10001
    Qty: 1
    Serial No: 20100001.
    At the time of goods receipt user change the serial number as 20100003.
    Is it possible to restrict the serial number changes at goods receipt level?
    Thanks in Advance,
    Regards,
    S.Babusingh

    Hi,
    Not in front of the system, but if i remember correctly one of these enhancements has a check on serial numbers,
    1. User exit -> MBCF0002
    2. BADi -> WORKORDER_GOODSMVT or MB_DOCUMENT_BADI
    Check & revert if it meets your need.
    Regards,
    Vivek

  • Unable to upload serial number from desktop while doing goods receipt MB01

    Hi,
    We have upgraded our system from 4.7EE to ECC6.0. While doing goods receipt for purchase order (MB01) in ECC 6 for serial number profile material, I can't find the option for uploading serial number from desktop where as the same option was there in 4.7.
    Please help me .....
    Thanks
    Nrusingha Dash

    Hi Experts.,
    Thanks for all of you for responding my questions.
    I found my question resloved.
    Actually, in previous version, the standard program has been modified by taking access key. When the upgradation happened, it got overwrited to the previous one. So, in recent version it is not appearing.

  • Substracting number of days from date

    Hi all, I need to create a user exit to get a date value based on another variable. Basically, 100 days minus the first variable.
    var2 = var1 - 100
    How can I write this?
    Thanks.

    Ok, I figured it out. I had to declare variables of type d and then assign it.
    IF i_step = 2.
        data:zday type d,
              zday1 type d.
    *****Loops for Variable.*****************************************
        LOOP AT I_T_var_range
             INTO loc_var_range WHERE
                      VNAM = 'ZENDT' or
                      VNAM = 'ZENDATE'.
        zday = loc_var_range-low.
        zday1 = zday - 275.
    *      l_S_range-low = loc_var_range-low - 275.
          l_S_range-low = zday1.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO E_T_range.
        ENDLOOP.
        EXIT.
      ENDIF.

  • Adding an "x" number of Days to Date Object

    Hi guys,
    What I would like to is lets say you have a date object, looking for method/way of adding or subtracting X amount of days from that object.
    This is because I have a list of dates that I would like to follow up on eachother like :
    1/7/06-5/7/06(Date EndDate)
    (Date EndDate + 1) i.e 2/7/06 - 31/7/06
    Thanks in advance

    For anyone that has the same problem this is how I got it working.
    Thanks for the help in the post.
         static Date addDaysToDate(Date startMonth, int days)
              Calendar c = Calendar.getInstance();
              c.setTime(startMonth);
              c.add(Calendar.DATE, days);
              startMonth = c.getTime();
              return startMonth;
         }

  • Creating more than one serial number for a material upon Goods Receipt

    I am trying to configure the system to create more than one serial number automatically for a material and have the equipment record created at the same time with the same number as the serial number.  For example using MB1C, receiving a material for a quantity of 2, the Maintain Serial number pop up box appears, selecting the 'Create serial number automatically' , I receive an error message ' Number of numbers to be assigned must be 1   
        Message no. NR030        
    Can someone help me with this issue.

    I have tried MIGO and get the same error.  The  Plant data/stor 2. tab of the  material master for this particular material is set as follows
                                                                                    Serial no. profile   NS01 SerLevel   1  Keep equipment number and serial number synchronous.
    Would there be configuration missing?

  • Calculate number of days between two festival dates in payroll schema

    Hi Experts,
    According to my company policy:
    If an empl termination happens before Eid festival of the current year, then the pro-rated Eid bonus (yearly) is based on:
    (The duration between Eid Festival date of previous year - Eid festival date of current year.)/350 days
    Time Evaluation is not implemented in the system. Only payroll is implemented.
    My question: How can I capture the number of days between (Eid Festival date of previous year - Eid festival date of current year) in the payroll schema ?
    Regards,
    Somdeb.

    Hi,
    You can try using date specification. If you update last year eed holiday date for the employee then you can use the operand F along with NUM to get days between last eed holiday and current payroll period last day.
    i.e NUM=FaaT 0
    F is operand to query date specification.
    aa is the date specification.
    T is for unit and it gives number of days
    next space is for current payroll period last day and 0 will reset alternate date to zero if no date specification is mentioned.
    Basically this will give number of days from date mentioned in date type aa to current period last day. For more info you can go through documentation on operand F for NUM.
    Let us know if this helps.
    Regards,
    Poorvi.

  • Convert number of dayes per year to data

    Please i need help in Convert number of dayes to date
    I have ID's like id
    FT*09025*0000000001 date=20090125
    FT*01171*0000000002 date=20100620
    so should convert first five number after FT to date
    example *09025*
    09 map to 2009
    025 number of dayes per year map to 25 jan
    example *01171*
    01 map to 2010
    171 number of dayes per year map to 20 jun
    (jan+feb+mar+apr+may)=(31+28+31+30+31)=151
    171-151=20 for the next month
    Please need help so will added filter to informatica map with date
    Edited by: user8929623 on Jul 4, 2010 7:04 PM

    Well, I do not follow why when 09 maps into 2009, 01 maps into 2010, not into 2001. Assuming it should be 2001, use YYDDD format:
    SQL> with t as (
      2             select 'FT*09025*0000000001' id from dual union all
      3             select 'FT*01171*0000000002' from dual
      4            )
      5  select  to_date(substr(id,4,5),'yyddd') dt
      6    from  t
      7  /
    DT
    20090125
    20010620
    SQL> SY.

  • Cancelling Goods Receipt and Using of Batch Number

    Hello,
    i did a wrong goods receipt with the MIGO and canceled after two days the material document with movement typ 102.The Material uses a Batch number.
    Now i want to use the old Batch number to do the right goods receipt, but the System says that the Batch number already exists.
    I thought when i cancel the material document i can use the old Batch number.
    I would be happy about every message.

    SAP does not stop you from re-using an existing batch number. The message that you get is in a SAP standard delivery just a warning, as it is from a business process unusual that the same batch can be received multiple times.
    If it is an error in your case, then somebody in your organization has changed the message attributes. so you should talk to them (see the change log in your DEV system) to know why this was done and  what the solution for your case could be

  • Consecutive Numbering and Current Date

    I am trying to create an invoice (that I will save as a template) and I want the invoice number to change, each time I open the invoice template, to the next consecutive number. I also want the date to stay current each time I open the document. Can anyone help? Thanks in advance.

    MATOS-3802 wrote:
    Thanks for the reply. I am neither familiar with computer lingo nor am I very computer savvy, so a lot of that is really confusing to me. Is there a plain English "numbers for dummies" way of going about it? Thanks again.
    Hi MATOS,
    Fortunately you don't need to understand most of it in order to use it.
    As a user, you need only understand:
    Open the Script Editor.
    Copy Yvan's script from his post, then Paste it into the Script editor.
    Then read this part (assuming your English is stronger than your French). The numbers labeling the sections are used in my notes below:
    Section 1A:
    +++++++
    Save this script as Script : invoiceWithDateAndnumber.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Note 1
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Section 1B
    menu Scripts > Numbers > invoiceWithDateAndnumber
    will create a new document from the defined user template
    and insert a new number and the current date as a fixed value.
    Section 2
    --=====
    The Finder's Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the "Show Script Menu in menu bar" checkbox.
    Section 3
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2010/06/05
    Section 4
    --=====
    property theApp : "Numbers"
    Adapter ces six “properties” à vos besoins
    Adjust these six properties to fit your needs
    property myTemplate : "my_invoice.nmbtemplate"
    property fichierNum : "the_number.txt"
    property mySheet : "1"
    property myTable : "1"
    property cell4number : "A1"
    property cell4date : "A2"
    --=====
    Section 4 is the beginning of the actual script. You will need to edit the properties list to fit your own situation.
    The first property "theApp" names the application (Numbers) that the script affects. Do not change this.
    Below the line "Adjust these...":
    myTemplate:
    Change "my_invoice.nmbtemplate" to match the name of your Invoice template, and add the ".nmbtemplate" extension to the name.
    fichierNum:
    This is the name of the file that keeps the most recent invoice number. The script will create the file the first time the script is run, and will update it each tome after that. No change is needed in this line.
    mySheet:
    myTable:
    These are currently set to use the first (ie. top of the list) Table on the first sheet of your invoice template. If the template contains only one table (and only one sheet) no change is needed. If your template contains more than one table, you may need adjust the number(s).
    cell4number:
    This is the cell in which the Invoice Number will be placed. Change "A1" to the actual location of the Invoice Number on your template. Remember to enclose the location in double quotes.
    cell4date:
    This is the cell in which the current date will be placed. Change "A2" to the actual location of the Invoice Date on your template. Remember to enclose the location in double quotes.
    In Section 1, Note 1 tells you you will need a specific set of folders in which to place the script.
    In the Finder, open a new window and click on yourAccount (the house icon with your username below it), then on Library, then on Scripts, then on Applications, then on Numbers.
    Each time you click, it opens the folder and shows (in the next column, if your Finder window is in Column view) the items in that folder. If any of the names on this path are missing, you will need to go to the File menu, choose New Folder, and give the new folder the name shown above. (If you have not yet added any scripts, you will likely need to create at least the Applications and Numbers folders.)
    Section 1A tells what to do with the script after you have edited it: Save it in the Numbers folder you created above. You can save it to the Desktop, then move it to the correct folder, or you could save it directly to the correct folder. Yvan's name is chosen to tell exactly what the script does.
    Section 1B tells how to call the script (ie. how to get it to do what it's written to do):
    go to the Scripts Menu, choose Numbers, then choose "invoiceWithDateAndnumber",
    then describes what the script does.
    The Scripts menu is likely not yet in your Menu bar, so Section 2 tells how to get it there. If you, like me, have a crowded Menu bar already, you may also have to remove something else to make room for the Scripts menu.
    Section 3 tells who wrote the script (Yvan) and when he did so.
    Once you've completed those steps (editing properties and saving the script to the correct location), creating a new dated and numbered invoice is a simple matter of choosing this script in the Scripts menu.
    Regards,
    Barry

Maybe you are looking for