Currency Translation based on Last Day of the Acquistion month
Dear all,
Request to help me in understanding how we can calculate the currency translation rate as per the last day if the acquistion month..
For Example if the Acquistion date : 01/01/2008 (mm/dd/yyyy) the currency translation should happend based on the rate maintained as on 31/01/2008.
Thanks
Pavan Kumar Prakhya
First, you will need to convert the actual acquisition date to the end date of the Fiscal Period. This can be done by using two separate Function Modules. First, get the actual Fiscal Period by entering the date and Fiscal Year Variant into the DATE_TO_PERIOD_CONVERT Function Module. Use the Fiscal Year and Fiscal Period from this and determine the end date of the Fiscal Period by using Function Module LAST_DAY_IN_PERIOD_GET with Fiscal Year, Fiscal Period and Fiscal Year Variant as your inputs.
For the conversion, use the Function Module CONVERT_TO_LOCAL_CURRENCY. The inputs for this would be the last date of the Fiscal Period, the amount to be converted, the from currency code, the to currency code, blank in rate, AS01 in type of rate and X in read TCURR. This assumes, however, that month-end rates (rate type = AS01) have been loaded into your source system and these rates have been transferred to your BW environment.
Similar Messages
-
How to get the last day of the previous month
Hello Team,
If my input date is today , then i need to find out the last day of the previous month for the same.
Can someone help me to find out .. how can this be done.
Regards,
RaviHi,
Try the below code.
// get a calendar object
GregorianCalendar calendar = new GregorianCalendar();
// convert the year and month to integers
int yearInt = Integer.parseInt(year);
int monthInt = Integer.parseInt(month);
int dayInt = Integer.parseInt(day);
// adjust the month for a zero based index
monthInt = monthInt - 1;
// set the date of the calendar to the date provided
calendar.set(yearInt, monthInt, dayInt);
int day = calendar.getActualMaximum(GregorianCalendar.DAY_OF_MONTH);
return Integer.toString(day);
Regards
Venkat -
Formula to calculate the last day of the subsequent month
Hi - I am trying to create a formula in CR9 that will take a date field and translate it to the last day of the subsequent month. For example, I have a date of today, 2/3/2009. I need it to print on the report 3/31/2009. I have made some progress to get me the 1st day of the subsequent month, but I need it to be the last day of the subsequent month.
The formula I am have currently is:
DateSerial(Year({Name.JOIN_DATE}), Month({Name.JOIN_DATE}) + 1, 0)+1
this will give me 3/1/2009, but I need 3/31/2009.
Any help appreciated.
Thanks!Hi Joe,
You can use the following logic which also takes into account the extra day in a leap year. You will need 5 formulas for this:
First create a formula that calculates current month, call it @Current Month MM
Month(Name.JOIN_DATE)+1
Next create another formula called @Current Month Start Date which will give you the beginning of the month.
totext(Date (year(currentdate),tonumber({@Current Month MM}) ,1 ))
Next create another formula called @Current Year yyyy
Year(Name.JOIN_DATE)
Next, create a formula called @DaysofMonth with the following logic:
if tonumber({@Current Year yyyy}) mod 4 = 0 then
choose(month(date({@Current Month Start Date})),31,29,31,30,31,30,31,31,30,31,30,31) else
choose(month(date({@Current Month Start Date})),31,28,31,30,31,30,31,31,30,31,30,31)
Lastly create a formula called @Ending Date of Month
totext(Date (year(currentdate),tonumber({@Current Month MM}) ,{@DaysOfMonth} ))
I hope this information proves useful.
Regards,
Zack H.
Edited by: Zack H on Feb 3, 2009 5:34 PM
Edited by: Zack H on Feb 3, 2009 5:38 PM -
How to get the last day of the next month?
Hi all.
I need to get the last day of the next month. E.g. if the date is 20.03.2008 I need to get 30.04.2008.
Is there any FM for it?
TIA, Nikolai.hi Nikolai,
pls. have a look athe following piece of code:
PARAMETERS : p_date TYPE sy-datum.
DATA : gv_res TYPE sy-datum.
CALL FUNCTION 'CALCULATE_DATE'
EXPORTING
* DAYS = '0'
months = '2'
start_date = p_date
IMPORTING
result_date = gv_res.
==> Now you have (gv_res) 2 months later as today
gv_res+6(2) = '01'. ==> gv_res is first day of next-next month
gv_res = gv_res - 1. ==> gv_res is last day of next month
hope this helps
ec -
Need to find the last day of the previous month
hi folks,
the code goes like this...
data: xt247 type t247,
monthn(30) type c,
monthnumber type i,
bforwardmonth type i.
call function 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = s_date
IMPORTING
last_day_of_month = e_date.
write: 'The last day of the month', e_date.
select single * from t247 into xt247
where spras = sy-langu
and mnr = e_date+4(2).
monthnumber = xt247-mnr.
write:' The month number', monthnumber.
determine the previous month.
bforwardmonth = monthnumber - 1.
From here I need to determine the last day of the previous month How can I do?
Thanks for your help.
SanthoshHi all,
here's the shortest solution:
REPORT z123.
PARAMETERS p_datum LIKE sy-datum DEFAULT sy-datum.
DATA ultimo LIKE sy-datum.
<b>ultimo = p_datum - p_datum+6(2).</b>
WRITE: / p_datum, 20 ultimo COLOR 2.
it's not my solution :
it's from <a href="http://www.abapforum.com/forum/viewtopic.php?t=1434&highlight=ultimo">Andrew_</a>
regards Andreas -
How can I find the last day of the current month
Is it possible to get the last day of the month in reports. Suppose I enter JUL in one of the text field. Now in reports I want to show that JUL contains 31 days. How can I retrieve the last day of the month.
Any ideas?The first (and fast) solution I think is this:
There is a function MONTH(CURRENT_DATE) that returns the number of the month of the current date.
Now, you could use CASE WHEN expressions to determine the number of days returned since you now how many days does every month have.
For instance, you could do:
CASE
WHEN MONTH(CURRENT_DATE)=1 THEN 31
WHEN MONTH(CURRENT_DATE)=2 THEN 28
WHEN MONTH(CURRENT_DATE)=3 THEN 31
WHEN MONTH(CURRENT_DATE)=4 THEN 30
END
PD. This is faster that use OR expressions like 1 or 3 or 5 because you dont have to try every option.
Hope it helps...but maybe there is another way more automatic.
Edited by: linkln on 03/09/2010 08:21 AM -
Function to get the last day of the current month
Hi friends
Now I need to know a function to get the last day of a month. I had between my notes that function but I do not find it and I think you can give the answer faster.
Thanks
Joel Pérez
DBA OracleI know emoticons are a bit naff but in the absence of a UBB markup to indicate humourous intent they do serve to indicate a joke. This is useful in a purely verbal domain like these forums, especially given that many participants don't have English as their first lanaguage and so often miss the wordplay.
Cheers, APC -
How to get Last Day of a Previous Month
Hi all,
I need to get Last Day of the Previous Month. I am able to get Current Month Last Day using Calendar.getActualMaximum(Calendar.DATE)
But I need previous Month's Last Day.
Thanks
Vamshi.Thanks all....
I have been trying the same and could get it.....
here is the code for that....
SimpleDateFormat simpleDate = new SimpleDateFormat("MM/dd/yyyy");
Calendar calendar = Calendar.getInstance();
month = calendar.get(Calendar.MONTH);
//year = calendar.get(Calendar.YEAR);
calendar.set(Calendar.MONTH, month-1);
calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));
//lastDayOfMonth = calendar.getActualMaximum(Calendar.DATE);
System.out.Println("Previous Month End Date is :: " + simpleDate.format(calendar.getTime()));
this works....
thanks for ur replys.... -
Generating the last day of the week
HI All,
I have the Year value (for eg 2002, 2006) and the week number value in the year ( for eg : 32, 52) . Based on this information, how can I get the last day of the particular week.
for eg What is the last day of the week - 2002,32
Any pointer would be great.
Thanks and Regards
VenkatOr try this:
SQL> WITH t AS
(SELECT 2006 YEAR, 1 week
FROM DUAL
UNION ALL
SELECT 2002 YEAR, 32 week
FROM DUAL
UNION ALL
SELECT 2005 YEAR, 52 week
FROM DUAL
UNION ALL
SELECT 2006 YEAR, 52 week
FROM DUAL)
SELECT YEAR,
week,
CASE
WHEN TO_CHAR (TRUNC (TO_DATE (YEAR, 'RR'), 'RR'), 'IW') != 1
THEN TRUNC (TRUNC (TO_DATE (YEAR, 'RR'), 'RR') + 7, 'IW')
ELSE TRUNC (TRUNC (TO_DATE (YEAR, 'RR'), 'RR'), 'IW')
END
+ 6 + (week - 1) * 7 LAST_DAY
FROM t
YEAR WEEK LAST_DAY
2006 1 08-JAN-06
2002 32 11-AUG-02
2005 52 01-JAN-06
2006 52 31-DEZ-06
4 rows selected. -
Display a metric differently only on last day of the month.
Have a Daily transaction fact where unit cost of product is stored at a day/part num /business unit level.
When we drag and drop date column and unit cost in the report like below we will have
Date cost
Sep29 $10
sep30 $12
Oct1 $12
Oct2 $14
..........ans so on
The source sustem program runs on last day of the month around 8pm for setting up cost to reflect on 1st of every month
But the nighly OBI load ( Runs at 2am every day) when incrementally updating Sep30 data picks up $12 from the erp and populates in OBI.
But actually speaking, on Sep30 the cost was $10.
There is no way of running the ERP program to run afer OBI load. Hence we need an expression in the RPD (not answers) saying
when last day of the month (any month) the standard cost must be a previous day value.All other days the same value should be returned.
Is this possible without impacting report performance ?
So, when we drag and drop date and cost value the above report should change as
Date Cost
sep29 $10
sep30 $10
Oct1 $12
Oct2 $14
Oct30 $12.5
Oct31 $12.5
Nov1 $13.5You can achieve the above requirement for current month alone with below steps:
The solution requires to have a union report
First part of the report will have Date and Cost fields with a report level date filter, Date NOT IN (TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_MONTH , 1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))))
Second part of the report will have Date and Cost fields with a report level date filter Date IN (TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_MONTH , 1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))))In the second part of the report,
Change the column formula for Date to display only Current_Date
Change the column formula for Cost field with FILTER(Cost USING Date = Current_Date-1)
Pls mark if correct/helpful. -
How to get the last day of the payroll period
Hi all,
I need to get the last day of the payroll period e.g. last day of Jan 2007 is 31 Jan 2007. Can anyone suggest as to how to get it?
Thanks,
MadhuT549S contains the payroll periods with pay date. T549Q contains the begin and end dates of the payroll period.
You can select from the appropriate table (or from both depending on your given data) to get the end date of the period.
Hope that helps.
Mary -
BIP eBusiness Suite Dates - How to include the last day of the month?
How can I get my report to include the last day of the month 'without' forcing my users to enter the non-intuitive first of the next month as a parm?
I have a report that will generally be run for a month but can be run for any pair of dates representing the first and last date to be included in the report.
When we pass the dates from Oracle Apps to the report it is truncating the date to midnight. This results in the last date entered 'NOT' being included in the report as the second date is marked as "midnight". When I attempt to simply add "=1" to the end date it fails due to formatting issues in apps (only). I have gotten this to work on our Enterprise edition server that we use for testing (only) but it fails in our apps environment.
In APPs we input the date in the format "01-AUG-2007", and this is how it shows in the parm line before the report is submitted as well as in the "View Details" after the report is executed: http://home.swbell.net/grog1//work/req_details_5607586.jpg
However it is odd in that we in the "View Log" entry it shows the date formatted as "2007/08/01 00:00:00": http://home.swbell.net/grog1/work/view_log_5607586.jpg
Even odder is that under diagnostics, "View XML" the date is formatted third way as: "2007/08/01 00:00:00.0" (note it now includes tenths of a second): http://home.swbell.net/grog1/work/view_xml_5607586.jpg
This of course makes it difficult to perform conversions and calculations on the date in the SQL.
Is APPs doing some sort of 'timestamp' conversion?
How can I get my report to include the last day of the month 'without' forcing my users to enter the non-intuitive first of the next month as a parm?
Any feedback is appreciated,
ScottNo. The problem/error occurs long before the data is formatted into xml for presentation to the format template.
The error occurs in the SQL in the 'data' template when I attempt to add a day to the date. It either does not like the implicit conversion with the "+1" and then the use of the "between" with another date or if I attempt to manually convert it has problems with the format mask.
Scott -
ICal 3.0: Last day of the month repeating event
I am migrating back to iCal after a few years using Entourage. I am trying to set up calendar events and reminders for the last day of every month, but I can't figure out how to do it. In Entourage this was easy. Any advice? Thank you.
I would like this to be an easy feature included in iCal as I get paid on the 16 and second to last day of the month. I want iCal to show the event in the calendar, not for me to set the event and have an alarm for 24 hours before. I tried the trick found at http://www.macworld.com/article/47872/2005/11/trickical.html but that does not work with iCal 3.0.
Any help would be appreciated or maybe Apple adding this in the repeating section of the ical event seeing it is apart of the icalendar specification.
tim -
Need the first day of the year and last day of the year.
hi all,
i need a function module which can get me the first day of current year and last day of the current year??
please help.Similar date questions are being asked ALL THE TIME. Please search.
-
hi ,
is there an existing date funtion to get last day of the month ?
pls advise
else
i'll try to add_month + 1 to current month and format to the first day and minus 1 day from that new month
tks & rdgslast_day function
<br>
jeneesh
Maybe you are looking for
-
Total option in REUSE_ALV_LIST_DISPLAY
Hi, If we CHECK total option in REUSE_ALV_LIST_DISPLAY we get a total of numeric value with yellow color at the bottom. Requirement: Let say I have 3 line item records in the display, with 20 fields and one amount field. So I get the total of the amo
-
My servlet cuts off the rest of my jsp page on Tomcat !
I'm using the Oracle Jdevloper 9i to create a web application. I will then deploy the application to a Tomcat server. Now here is the problem. When developing and running on the Oracle OC4J server the application works fine but after deploying to the
-
I just installed Snow Leopard, upgrading from Leopard. Everything seems to be working fine, except that my computer will not go into sleep mode. Please help.
-
Text in History sidebar looks compressed (Firefox 4.0b2)
I just upgraded to Firefox 4.0b2 from 2.6.8, and when ever I open up the history sidebar by using Ctrl+H, the text looks compressed and pixelated. It's not really a big problem, but I just want4ed to let you guys know about this problem. Oh yeah, thi
-
What is error 213.19 and how to correct it. I have reinstalled Illustrator and rebooted my Windows 7 Home Premium computer twice and still cannot access the program WFT