on 07-15-2012 6:13 AM
Hi There,
I am on BW 7.3 and I some help in writing a routine that would calculate/derive the total time in months (target DSO) from a date field (format YYYYMM e.g 2008.01) (source DSO), the derivation should be based of course of the sy-datum.
Any inputs in writing this routine in my transformation?
Thanks,
Blaiso
Resolved!!! I did not used a FM, I just defined 2 variables to hold source date and target date and I perform a simple calculation giving the difference between target date and source date.
Thanks,
Blaise
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check following thread of any help
http://scn.sap.com/thread/1974114
http://scn.sap.com/thread/2126460
Thanks and regards
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Better use Function Module - FIMA_DAYS_AND_MONTHS_AND_YEARS.
Input parameters - Date
Export Paramerts - Variable.
Pass this variable to RESULT.
Regards,
rvc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
What is your required format in target DSO? Do you just need a count of months?
Regards,
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman,
That is correct, In the target DSO, the Z_time field is type "num" and should be holding a total count/Sum in months derived from year and month from Z_date field in source DSO.
Example: Z_date = 01.03.2011
Based on sy-datum,
Z_time = count in months [(2011 to 2012 = 12 months) and (03 to 07 = 04 months)] = 16 months
Any input in writing the corresponding routine pl?
Thanks,
Blaiso
Hi ,
have a look on the below thread .
http://scn.sap.com/thread/709693
hope it may be helpful.
You can include function module 'FIMA_DAYS_AND_MONTHS_AND_YEARS' or "HR_MONTHS_BETWEEN_TWO_DATES" in your program to get the count of months.
Regards,
Ramitha
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.