Current day and no of days in current month
Hi all,
can anbody tell me which object is used for current day and no of days in current month.
Hi,
USe /OSP/GET_DAYS_IN_MONTH Function Module, just give Date you will get No. Of days in that Month.
Use SY-DATUM for current date.
Ex:
Data: dt type SY-DATUM.
dt = SY-DATUM.
so you get current date in dt.
Thanks
Reddy
Similar Messages
-
Report for current day and current month
Hi gurus,
i 've a report, where i 've to display the values for qty and cost of the material for the current day and current month
HOw can i do this in BEx Query designer..If any document plz share
thanks
rakeshhi Kolli
here i want to filter the data on system date,
i wnt the report to pick the date dynamically based on the system date.
but i think restricting on calmonth and calday is not going to solve my scenario..
rakesh -
I'm trying to calculate the number of days until your next birthday. Only using current month, day and birth month and day. I can get close but i'm way off. When i enter in the next day, the amount of days is supposed to be 364. This is where I am having problems. I know my code is way off. I just need some guidance please!
Attachments:
D5.7_1.vi 8 KBI just had a little fun with the Time Record...
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
D5.7_1_BD.png 19 KB -
Hi Experts,
I need to create a report which includes records of current month and last 7 days of previous month.
I will get records of current month by this formula :- month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate)
Please tell me how to add the records of last 7 days of previous Month for the same report.
Thanks in Advance.Hi Ajay,
If you have more than a year data in your database then your formula will return wrong results. ie. If your data consist of 2012,2013,2014 data then below formula will return all 8th month data irrespective of year. So, you need to check year also here
month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate) and
Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate)
Now add Abhilash second statement in OR so, your formula should look like :
(month({PROBSUMMARYM1.OPEN_TIME})=month(currentdate) and
Year({PROBSUMMARYM1.OPEN_TIME})=Year(currentdate))
OR
Date({PROBSUMMARYM1.OPEN_TIME}) IN [DateAdd('d',-7,Maximum(LastFullMonth)), Maximum(LastFullMonth)
-Sastry -
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. -
If Current Month then use last day, else use month
My cube is setup where the current month is at a daily level and the previous months just contain the last day of data.
I would like to for the last month to only return the last day and return the month level for all previous months. The reason being is our third party software gives us the capability of doing a drillthrough, but when doing it for the latest month, it is
returning every day in that month.
Here is my attempt, but it is only returning the last month, not the rest of the months.
select [Measures].[Current Balance]
on 0, non empty
[Date].[Month].children
on 1
from [MyCube]
where
IIF([Date].[Month].CurrentMember = ClosingPeriod([Date].[Month].[Month]),
TAIL (NonEmpty([Date].[Date].members,[Measures].[Count Of Accounts]),1),
[Date].[Month].CurrentMember)Hi Dodge,
I’m writing to follow up with you on this post. Was the problem resolved by the above query?
If the issue was solved, I’d like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings or concerns you may have.
Thanks,
Charlie Liao
TechNet Community Support -
Last day of previous month, first day of current month
Hi,
Whats the best way to calculate the last date of the previous month, and the first day of the current month.
Thank you for your help.
Sumit.Here are FMs
SG_PS_GET_LAST_DAY_OF_MONTH FM calculating the last day of a month
FVOZ
RE_LAST_DAY_OF_MONTH
HRHCP00_TIME_HANDLING
HR_HCP_GET_LAST_DAY_OF_MONTH
HRVE_REPORTING
HRVE_LAST_DAY_OF_MONTH
RPDD HR-D: Payroll Germany
RP_LAST_DAY_OF_MONTHS HR-D: Determine last day of month
SLS0 PAW - Miscelaneous (MISC)
SLS_MISC_GET_LAST_DAY_OF_MONTH FM calculating the last day of a month
VVSRCH
LAST_DAY_OF_MONTHS
BWSO_DATE_GET_FIRST_WEEKDAY
CKSO
CK_F_GET_FIRST_DAY_OF_DATE
HRBEN00SPENDA
HR_BEN_SPENDA_FIRST_LAST_DAY
HRPB
HRPP_CCODE_GET_FIRSTDAY_PERIOD
HRVE_PAYROLL
HRVE_GET_FIRST_LAST_MONDAY
JBT6
ISB_GET_FIRST_DAY
KED2
RKE_GET_FIRST_DAY_IN_PERIOD
MCP2
MC_PERIOTAB_BT_FIRST_LASTDAY
MC_PERIO_GET_FIRST_AND_LASTDAY
Thanks
SK -
First day of current month, one year ago
All,
Does anyone have a calculation or know how I can calculate the first day of the current month, one year ago? I am trying to setup a filter criteria to show all records created >= 1st day of current month for prior year and <= the last day of the prior month. I have the second half of the equation for last day prior month but need some help on the first half.
Thanks in advance for any pointers!
DYou can try:
SELECT TRUNC(ADD_MONTHS(sysdate, -12), 'MON') FROM dual;
Or
SELECT TRUNC(sysdate-NUMTOYMINTERVAL(1,'YEAR'), 'MON') FROM dual; -
Show data of last day of previous month against any day of current month
Hi,
I have fact table which contains data at date level (we have data for oct-2009 to april-2010). Our requirement is to show data of last day of previous month against any day of current month in obiee 11g. I am facing problem in Feb 2010 its picking data of 28-Jan-2010 instead of 31-jan-2010 and for April its picking data of 30-mar-2010 instead of 31-mar -2010.
Any suggestion ???You're asking to filter your data set to only include rows between:
1) last day of the previous month
2) any day of the current month
This can be achieved with prompting in OBIEE Answers.
last day of previous month = TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE)) . The problem is you need to make query work within Oracle's Answer syntax.
In the prompt, select the operator type for your date dimension as 'between' and default to 'SQL Results'.
For the 'last day of previous month' , use the query:
SELECT
case when 1=0 then Time."Fiscal Date" else TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))
end
FROM ENTER_YOUR_PRESENTATION_FACT_FOLDER_HERE
For the current date, use the query:
SELECT
case when 1=0 then Time."Fiscal Date" else CURRENT_DATE
end
FROM ENTER_YOUR_PRESENTATION_FACT_FOLDER_HERE
Another option is to create a last_date_pervious_month variable in the RPD and have that as the default value in your prompt. -
Hi,
I have a Time Reporting site where users log in their time twice a month.This site uses only Out Of Box functionality. There is no scope for coding in my site.
In the list i have created a view which shows the Time Report of the user logged in for the current month only.
There is a new requirement : Current month's Time Report should be visible to the users in the next month for 5 starting days of the month only so that users can edit this month's Time Report in the next month's 1st 5days incase they forget to edit it in
the current month.
e.g: If i am absent on the last day of the month , my time report for this month(March) should be visible for 5 days in April so that i can stiil edit March's time report. However after 5days the Time Report for March should not be visible. After 5days only
April's time report will be visible when submitted(April's time report).
Please can anybody help me out with this.
Regards ,
GuruHi Guru, you have a couple of options: 1) set a retention schedule through the list's settings> Information Management Policy Settings. Where the start date < start date + 35.
2) create a view and filter by the date like above.
These aren't perfect scenarios, but will get you close to what you want.
cameron rautmann -
28th day of the previous month to 27th of the current month
Hi,
I am designing a report wherein the data should range from 12:01am on the 28th day of the previous month to 11:59 pm on the 27th of the current month.. This should be a dynamic one as this would be scheduled.
Any help will be greatly appreciated!
Thanks & Regards
BMCHi
Thanks for your reply and I have been using the same formula given by you but unfortunately it stopped giving the result. This is how i have given the syntax:
Create a new field name say From (this will calculate all the data of preceding month starting from 28th)
if not(month(CurrentDate)=1) then
date(year(CurrentDate),month(CurrentDate)-1,28)
else
date(year(CurrentDate)-1,12,1)
Creat an another field say To (this will calculate all the data of current month as of 27th)
if (month(CurrentDate)=1) then
date(year(CurrentDate),month(CurrentDate),27)
else
date(year(CurrentDate)-1,12,1)
Now create one more field say Time that will include the above two syntaxes.
{CHG_Change.Considered Res Time}>DateTime({@From}) and {CHG_Change.Considered Res Time}<=DateTime({@To})
This did work but seems now its not working.. Can you see if am missing out something here..
Regards
Cauvery -
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 -
How to interpret the current day of the month
I am a rookie in java and am trying to play with the Calendar class.
The DATE static field of this class says it returns "Field number for get and set indicating the day of the month."
So, Calendar.DATE has to return the current day of the month.
Today is 7th of january. So, it should return 7. But, I am getting a value of 5.
I am very much confused. I fell that my interpretation os wrong.
Please help.............
Thanks in advance.You must NOT confuse the value of the constant Calendar.DATE (5) and how you can use that constant to retrieve the current day of the month.
Calendar cal = Calendar.getInstance(); // Gets the current date
int dayOfMonth = cal.get(Calendar.DATE); // Gets he current day of the month from the current date
// (Using the Calendar.DATE constant as method parameter).
System.out.println("Calendar.DATE = " + Calendar.DATE); // Prints the constant
System.out.println("dayOfMonth = " + dayOfMonth); // Prints the current day of month -
I need to return the first day of the current month. I have read I can use:
WITH MEMBER [Measures].[FirstDayOfMonth] AS
DateSerial(Year(Now()), Month(Now()), 1)
However, this returns an incorrect format. Can this date member be formatted to yyyy-MM-dd?
I have also read I can use OpeningPeriod but I could not get this to work.
My date Hierarchy is:
[Date].[Year Month Day].[Month]
And my month members are in the yyy-MM-dd format, for example:
[Date].[Year Month Day].[Month].&[2015-02-01]Thanks Richard,
I am not sure what the "aa" string is for?
Yes, I can get the current date using:
WITH
MEMBER [Measures].[Month Day] AS
FORMAT(Now(), "yyyy-MM-dd")
But I need to return the first date of the current month dynamically. For example, today this value would be:
[Date].[Year Month Day].[Month].&[2015-02-01]
So I cannot use Parent or FirstChild as the hierarchy will not recognise the
FORMAT(Now(), "yyyy-MM-dd") as a month member as it returns 2015-02-18.
I believe I need to extract the current month day value, subtract this value from the Now() and add 1 (start of month), for example:
StrToMember("[Date].[Year Month Day].[Month ].&[" + FORMAT(Now()-[Month Day]+1,
"yyyy-MM-dd") +"]")
Which will be 2015-02-18 - 18 + 1 = 2015-02-01
Or:
WITH
MEMBER [Measures].[Month Day] AS
FORMAT(Now()-[Month Day Value]+1, "yyyy-MM-dd")
SET [FirstOfMonth] AS
StrToMember("[Date].[Year Month Day].[Month].&[" + [Measures].[Month Day] +"]")
So I need a new member to return the month day value.
Does this make sense? Is there a better way to do this? -
Date for first day of current month
How can i get the date for first day of current month ?
select trunc(sysdate,'MM'),to_char(trunc(sysdate,'MM'),'DD'),to_char(trunc(sysdate,'MM'),'Day') from dual;
Maybe you are looking for
-
Problem with Call Transformation (ABAP to XML)
Hello I call the tranformation function to serialize. I want to convert a ABAP internal table into XML.One of the column type is of time(t). On transformation, the values are changed. Ex : If I have a value of 000009 (time format), on calling t
-
BPM + PROXY + Fault Message
Hello My scenario is JDBC -> BPM <-> Proxy I developed a BPM has a step-type <SENDER> that is synchronous. Information on the above step: . The message interface used an output, an input message and also a Fault Message. . I'm calling a proxy in th
-
Do I need to fully charge my ipod to restore settings on iTunes 7.1?
I just received my 3rd generation ipod nano and I get an error message when I hook it up that the ipod cannot be restored an unknown error occurred (1413. Is this because I have to fully charge it 5 hours like the rep at apple told me or is it becaus
-
F0273 - F110 - Printing program RFFOF__V - proposal run
Hello, After changing document numbers ranges for company code BP01 in our development environment (duplicating fiscal year 2099 to 2011 and 2012, updating status of 2011 document number range to match current status of 2099 fiscal year document rang
-
Custom Token For web services security
How can I implement a token based security for web services? I will return a custom token which contains a session-id among others after a JAAS authnetication. I want to pass this token for every web service invokation. I want the serverside EJB meth