Number of days in the calendar month
Hi All,
How can i get the number of days in the calendar month in Bex reporting.
Thanks,
Gana
Hello,
Please go through the following links.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f002c608-2533-2c10-25a1-d0e7f7b5b662
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10fc4382-afa6-2c10-1380-fa224fe4324f
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0fefc77-40e3-2c10-8da3-d4bfcb013387
Thanks.
With regards,
Anand Kumar
Similar Messages
-
Is there a way to repeat an activity in the calendar monthly on the same day, i.e., the 2nd Wednesday of each month? ( I can repeat on the date but not the day of the month.)
Not with the stock calendars app.
-
I want to get number of days in the month I've chosen from Timeline slicer.
I want to get number of days in the month
I've chosen from Timeline slicer,
does anyone know how to do?
The problem I want to solve is to divide
the number of customer visits as a salesman
made during a month by the number of
days in the month.Excel 2013 Pro Plus with PowerPivot.
Count working days per month
considering weekends and holidays.
With help from book:
"Building Data Models with PowerPivot"
by Alberto Ferrari and Marco Russo.
Easy. Not.
http://www.mediafire.com/view/rw78t1y3bg8vm0c/04_10_15.xlsx -
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 -
Do not show dots for 'free' events in the calendar month view
I wish I could.... not show dots for 'free' events in the calendar month view. For an overview of when I have hard-scheduled events in the calendar it's pretty tedious and slow to go day -by day, and other views... Instead the dot in the month view... - why does it show even "free" events? Any ideas, tips?
Thanks!Unfortunately there is no option to disable the dots.
<Edited by Host> -
Function to retrieve all days of the previous month.
Hi,
Yes, it's a monthly report i've been given the task to achieve.
So, all I need is all days of previous month (even if there is no data for this day)
I've been instructed to use the following code, but it does not return any value:
DECLARE
CURSOR CUR_LAST_DAY IS
SELECT TO_CHAR (LAST_DAY (ADD_MONTHS (SYSDATE, -1) ), 'DD')
FROM DUAL;
VVA_LAST_DAY VARCHAR2 (2);
VNU_JOUR NUMBER := 0;
BEGIN
OPEN CUR_LAST_DAY;
FETCH CUR_LAST_DAY
INTO VVA_LAST_DAY;
CLOSE CUR_LAST_DAY;
WHILE VNU_JOUR <= TO_NUMBER (VVA_LAST_DAY) - 1
LOOP
VNU_JOUR := VNU_JOUR + 1;
END LOOP;
END;
--CLOSE CUR_LAST_DAY
--DEALLOCATE CUR_LAST_DAY-----
On the other end, i've developped this code:
SELECT TO_CHAR(SYSDATE,'dd')
FROM DUAL
WHERE TO_CHAR(SYSDATE,'dd') >= to_char(to_date(to_char(ADD_MONTHS(SYSDATE, -1),'yyyy-mm')||'-01'),'yyyy-mm-dd')
AND TO_CHAR(SYSDATE,'dd') < to_char(LAST_DAY(to_date(to_date(to_char(ADD_MONTHS(SYSDATE, -1),'yyyy-mm')||'-01'),'yyyy-mm-dd')));Which is returning a null value. :(
RegardsHello,
You want to retrieve complete days of last month from one query...so here it is..
SELECT
TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY') COMP_DATE,
TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'DD') ONLY_DD,
TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'MM') ONLY_MM,
TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'YY') ONLY_YY
FROM DUAL
CONNECT BY LEVEL <= TO_NUMBER(TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-1)),'DD'))I am not at database machine so therefore not tested.
But one thing keep in mind that this forum only for reports there is separate forum for sql and pl/sql.
Function to retrieve all days of the previous month.
-Ammad
Edited by: Ammad Ahmed on Apr 22, 2010 10:53 PM
Spelling Mistake -
FM which gives the date if we add 'x' number of days to the current date.
Hi all,
can you plz tell me the FM which will give me the exact date if i add some ' X ' number of days to the present date.
in detail -->my inputs would be 1)DATE
2)no of days
i need--> the exact date which comes after those days get added to the given date.
PLZ HELP ASAP.
Rgds,
REDDY.Hi,
You can use FM RP_CALC_DATE_IN_INTERVAL.
data: wa_date like sy-datum.
*Add 21 days to current date.
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 21
months = 0
signum = '+'
years = 0
importing
calc_date = wa_date.
write: / wa_date.
Regards,
Ferry Lianto -
Count the number of days in the selected range using Customer exit
Hi Experts,
we have requirment where user is asking to add a column to report, which will have 'count of days for which key figure is having values' for each of the months and the Header would be 'Day Count'
Please let me know if its possible using Customer exit?Hi,
In our report we have two characteristics site no. and product and we have 6 key figures of type quantity and Input for the report is Fiscal year/period
So in the report Key figures are populated with values for respective site no. and product combination
Now the user wants new column in report which will have header u2018Day countu2019 and it should Simply count the number of days in the selected range that have a volume different than 0 for key figure
Please let me know if more details are required -
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 -
Number of days in given date/month
Hi,
Can you send query to find the number of days in given date/month
Regards,
Venkat.If you want No. of days between two date then you can just Subtract them. If you want the number of days in a month you can get the first and last day of the month and subtract them.
Solution for a month.
SQL> with t as (select to_date('&month','mmyyyy') as dt from dual)
2 select (last_day(dt) - trunc(dt, 'mm'))+1
3 from t
4 /
Enter value for month: 012009
old 1: with t as (select to_date('&month','mmyyyy') as dt from dual)
new 1: with t as (select to_date('012009','mmyyyy') as dt from dual)
(LAST_DAY(DT)-TRUNC(DT,'MM'))+1
31
SQL> /
Enter value for month: 022009
old 1: with t as (select to_date('&month','mmyyyy') as dt from dual)
new 1: with t as (select to_date('022009','mmyyyy') as dt from dual)
(LAST_DAY(DT)-TRUNC(DT,'MM'))+1
28
SQL> /
Enter value for month: 122009
old 1: with t as (select to_date('&month','mmyyyy') as dt from dual)
new 1: with t as (select to_date('122009','mmyyyy') as dt from dual)
(LAST_DAY(DT)-TRUNC(DT,'MM'))+1
31Edited by: Karthick_Arp on Feb 19, 2009 9:56 PM -
BI Content Variable on 0Calday for first day of the fiscal year and first day of the current month
Hi Friends,
In one of my BEx queries, I need to restrict a key figure for 0Calday based on the first day of the current fiscal year. And another key figure for the first day of the current month. Instead of using Customer exit, I hope there is some SAP delivered standard variable for these filters.
Please let me know if there is anything available for this. Your answers will be highly appreciated.
Thanks & Regards,
RanjanHi Ranjan,
Please find below standard variables.
Pls check below link for more.
Standard Variables in BEX related to Time Charcteristics
Characteristic
Variable
Description
0CALDAY
0CWD
Current Workday (SAP Exit)
0CALDAY
0CYTCD
Cumulated to Current Day (SAP Exit)
0CALDAY
0DAT
Current Calendar Day (SAP Exit)
0CALDAY
0DAY_***
Cumulation of all Values to Key Date (SAP-Exit)
0CALDAY
0LYTCLD
Cumulated to Current Day of Previous Year
0CALDAY
0LYTCLD
Previous Year Cumulated to Current Day (SAP Exit)
0CALDAY
0L_DATE
Last Calendar Date
0CALDAY
0P_LY_R
Comparative Period for Last Year
0CALDAY
0P_TY_R
Period for Current Year up to Yesterday
0CALDAY
0S_KDATE
Key Date Interval for Previous Year (SAP Exit)
0CALDAY
0S_KDAY
Key Date Interval Current Year (SAP Exit)
Best,
SATYA. -
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 PrakhyaFirst, 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. -
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 -
Father's Day in the calendar...
My iPad and iPhone does not show Father's Day in the calendar when I turn the US Holidays on... It shows Mother's Day along with all the other random holidays (Lincoln's bday, Palm Sunday, etc.) Anyone know why?
Father's Day apparently is not as important as Mother's Day.
I was bummed to find out. Not that I care about the date and look forward to it every year, but it is still a poor oversight on Apple part and Apple has yet make attempt to fix it. Actually, I was surprise this is an Apple over-sight because Apple is usually attentive to details. -
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
Maybe you are looking for
-
VMware Fusion Performance: Bootcamp Partition or Virtual Machine?
I'd like to run ArcGIS 9.3 in Windows XP using VMware Fusion. Can anyone comment on the virtues/drawbacks of using a bootcamp partition versus creating a VMware "Virtual Machine"? With bootcamp partition I can gradually increase the size of the parti
-
I am dissolving two of my video clips out to white, but my video clips are 16:9 widescreen and when it dips out to white the whole frame goes to white, even the black bars on the top and bottom. Is there a way to fad it to white just in the picture f
-
Embed fonts in Flash CS3 and load in Flex at runtime
Hi, I want to embed fonts in the library of Flash CS3, compile it into a SWF and load it in my flex up at runtime and register the embedded font. I'm able to get the linked class in Flex but the font doesn't show. The FLA has a font called Viner Hand
-
Lightroom quality on x-trans raw files.
I see a lot of complains on Lightroom's ability to decode fuji x-trans raw file. Is it now getting better?
-
Net value of Sales order Zero - delete line item
Hi, Sales Order is raised for 3 materials. Line item 10 --> 1 Qty --> Quantity delivered -->1 Line item 20 --> 1 Qty --> Quantity delivered -->1 Line item 30 --> 1 Qty --> Quantity delivered -->0 Line item 10 and 20 have some price but as a result of