How to get "Number of days" in a report on 0PM_DS02
Dear BI Gurus,
I need to build a query on the PM DSO - 0PM_DS02 (MTTR/MTBR).
The query has 0Equipment in the rows
The fields Available Time | Breakdown TIme | Utilised Time in the columns for the time granularity selected.
The field Breakdown Time is the calcaulted key figure Actual Outage Time from the DSO.
The field Utilised Time is a formula = Available Time - Breakdown Time.
The issue I am facing is regarding the field Available Time.
In the report the user needs time granularity in Month and Year.
Basically the logic for the field Available Time = Number of days in the time period selected * 24
where 24 = number of hours in a day.
Now my issue is when the time granularity is month , the field should have the number of days in the month the user selects from the selection screen and when the time granularity is year, the field should have number of days in that year.
Also during the query execution period, when the user changes the time granularity the report should also change the calculation for this field.
(I can bring an extra field to the DSO, which will bring the available number of days in a month for each record)
Can you please guide me how to map this scenario.
Many Thanks in Advance,
With Warm Regards,
Vineeth
Hi All,
Waiting for your suggestion on this?
With Warm Regards,
Vineeth
Similar Messages
-
How do i get number of days between 2 dates?
How do i get number of days between 2 dates?
and the result must be in int.
for example
Ex. startdate: 2006-06-01 enddate: 2006-06-30 and the result is: 30
how to do so? thxmel
Iv'e used this method. It assumes startdate,enddate and days have been defined before but you could pass them as args.
void days()
try
Date d1 = DateFormat.getDateInstance().parse(startdate);
Date d2 = DateFormat.getDateInstance().parse(enddate);
long days = (d2.getTime()-d1.getTime())/1000/60/60/24;
days = ""+days;
catch (ParseException e)
System.out.println("Invalid date format");
}It actually gets the duration in ms and divides down to days.
Regards
Chris -
How can I get number of days between 2 dates ?
How can I get number of days between 2 dates ?
Give me answer as soon as possible.....Mukesh_Prajapat wrote:
How can I get number of days between 2 dates ?
Give me answer as soon as possible.....Is google broken again?
[How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html] -
How can i get number of days between two dates represented by two dates?
how can i get number of days between two dates represented by two date objects. One is java.sql.Date, the other is java.util.Date?
tej_222 wrote:
But how do I do that conversion. from java.sql.date and java.util.date to calender?
-thanks for the quick response.You may find the following utility code samples useful:
[http://balusc.blogspot.com/2007/09/calendarutil.html]
[http://balusc.blogspot.com/2007/09/dateutil.html]
ganeshmb wrote:
(date1.getTime() - date2.getTime())/(1000*60*60*24) should do.
getTime returns millsecond value of date object and the difference divided by no of milliseconds in a day should fetch you the difference in terms of days.This doesn't respect the DST. Use java.util.Calendar. -
How to get the last day of the week?
Hii
i can get the calender week number for any given date using
SELECT to_char(to_date('04/04/2011','MM/DD/YYYY'),'WW') FROM dual
can any body tell me, how to get the last day of that week ?
and the answer should be 04/08/2011(8th april )
thanks
San
Edited by: sandeep9 on Apr 4, 2011 3:50 AMHi, San,
Here's one way:
WITH sample_data AS
SELECT DATE '2011-04-04' AS dt
FROM dual
SELECT dt
, TO_CHAR (dt, 'WW') AS week_num
, NEXT_DAY ( dt - 1
, TO_CHAR ( TRUNC (dt, 'YEAR') - 1
, 'Day'
) AS end_o_week
FROM sample_data;Another way is to use date arrithmetic:
WITH sample_data AS
SELECT DATE '2011-04-09' AS dt
FROM dual
SELECT dt
, TO_CHAR (dt, 'WW') AS week_num
, TRUNC (dt, 'YEAR')
+ (7 * CEIL ( (dt - (TRUNC (dt, 'YEAR') - 1))
/ 7
- 1 AS using_date_arithmetic
FROM sample_data; -
How to get the last day according to fiscal period input in selection scree
Hello expert
how to get the last day of fiscal period input.
the fiscal period inculdes 1-16
when fiscal period is greater than 12, only calculate the last day of 12nd month
your solution will be apprecaited, FM existing?
thank you
KevinHi,
when you give a particular date in any month
the following fm will give you the last date of that month
here you can give
R_FDATE-HIGH as 01 and month as the period you wnat and year for current year
concatenates '01' month year into r_fdate-high separated by '.'.
then it will give g_ltdt for that month and year which wil be the last date of that month
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = R_FDATE-HIGH
IMPORTING
LAST_DAY_OF_MONTH = G_LTDT
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks & regards,
Venkatesh -
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 a month?
HI,
I want to know how to get the last day of a month.
In my JClient form, I tried to get it by using oracle.sql.Date method, that is:
lastday=oracle.sql.Date anydate.lastDayOfMonth();
But it does not work. The result is lastday=anydate.
Why?
StephenYou can use the Calender class...
Calendar c = Calendar.getInstance();
and then something like...
c.add(c.MONTH, 1);
int dayOfMonth = c.get(Calender.MONTH);
c.add(c.DAY_OF_MONTH, - (dayOfMonth-1) );
other usefull functions are:
System.out.println(" YEAR : " + c.get(Calendar.YEAR));
System.out.println(" MONTH : " + c.get(Calendar.MONTH));
System.out.println(" DAY_OF_MONTH : " + c.get(Calendar.DAY_OF_MONTH));
System.out.println(" DAY_OF_WEEK : " + c.get(Calendar.DAY_OF_WEEK));
System.out.println(" DAY_OF_YEAR : " + c.get(Calendar.DAY_OF_YEAR));
System.out.println(" WEEK_OF_YEAR : " + c.get(Calendar.WEEK_OF_YEAR));
System.out.println(" WEEK_OF_MONTH : " + c.get(Calendar.WEEK_OF_MONTH));
System.out.println(" DAY_OF_WEEK_IN_MONTH : " + c.get(Calendar.DAY_OF_WEEK_IN_MONTH));
System.out.println(" HOUR : " + c.get(Calendar.HOUR));
System.out.println(" AM_PM : " + c.get(Calendar.AM_PM));
System.out.println(" HOUR_OF_DAY (24-hour): " + c.get(Calendar.HOUR_OF_DAY));
System.out.println(" MINUTE : " + c.get(Calendar.MINUTE));
System.out.println(" SECOND : " + c.get(Calendar.SECOND));
System.out.println();*/ -
How to get number of rows return in SELECT query
i'm very new in java, i have a question:
- How to get number of rows return in SELECT query?
(i use SQL Server 2000 Driver for JDBC and everything are done, i only want to know problems above)
Thanks.make the result set scroll insensitve, do rs.last(), get the row num, and call rs.beforeFirst(), then you can process the result set like you currently do.
String sql = "select * from testing";
PreparedStatement ps =
con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery();
rs.last();
System.out.println("Row count = " + rs.getRow());
rs.beforeFirst();~Tim
NOTE: Ugly, but does the trick. -
How to get number of digits in given amount
Hi Experts,
How to get number of digits in given amount.
Regards
MohitCheck this :
data: v_data1 type p decimals 3 value '12.860',
v_char1 type char20,
v_char2 type char20,
v_char3 type char20,
len type i.
write v_data1 to v_char1.
split v_char1 at '.' into v_char2 v_char3.
len = strlen( v_char3 ).
write:/ v_char2,
/ v_char3, " this holds the digit value
/ len. " number digits -
How to get the first day in the month from a domain date ?
Hi,
I like to know how to get the first day in the month from a domain date?
Thanks
StephenHi Gokul...
Instead of using the funtion module you can just write the 3 statements of code to get the first day of the week.
Its similar to the above one but instead of writing case statement you can achive the following.
data : w_res type i,
w_data type d,
w_res = w_date mod 7.
w_date = w_date - w_res.
write w_date.
This works.
Regards,
Siddarth -
How to get the FIRST DAY OF THE CURRENT MONTH
how to get the FIRST DAY OF THE CURRENT MONTH in oracle 9i.
plzzzzz send immedaily.advance thanksTEST@test SQL> select trunc(sysdate,'MON') from dual;
TRUNC(SYS
01-OCT-06
TEST@test SQL> -
How to get the exact day date with the another date field?
Hi,
Please help me how to get the specific day of the week's date with the help of another date field.
Actually , one field(week_day) has 1,2,3,4,5,6,7 here 1--MON,2-- TUE like that.
another field has the date. based on that date, we have to go to that particular week and need to pick up the date by the above week_day. It should be in that week itself.
Thanks in advance!!
Regards,
Vissu...
Edited by: vissu on Oct 29, 2010 3:07 AMHi,
Something like this
SELECT TRUNC(<DATE_COLUMN>,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the particular week of the date
SELECT TRUNC(SYSDATE,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the current week
cheers
VT -
How i get number of record in repet frame?
Hi,
How i get number of record in repet frame?
Regards
JomarJomar,
you can use Summary Columns in the Data Modell. Create them on group higher that your wished group (so on the pane for an first group of a query), use as Source the primary column and as reset at the group, where the summary column is located.
If you hide some instances via format triggers, that you could use a counter inside the format triggers to count the rows.
Regards
Rainer -
How to get the actual data in ALV report
I am doing some upgradation work in that i am using Submit & And return and also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
With the use of set table for 1st display i got the ALV report but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get the actual data in ALV report, With the use of Any Function Module or with Coding,
with regards,Hi Saravana
I am sure you must be getting the values in tables of table parameters from every FM.
consolidate the values from tables of all FMs in one table and built ALV for that table only.
I hope this way you can show the actual data in ALV.
thanks
Lalit
Maybe you are looking for
-
How do I get a high data rate throughput from FPGA module to my PC running Labview app
Hi, I am using a 7811R (Ni FPGA board) and a MXI-4 card in a PXI-1031DC chassis. I am trying to measure the maximum rate I can send data from the MXI-4 card to my PC and up into a labview windows application. The PC also has a MXI-4 card which is on
-
Hi I am running iTunes 10.6 on a PC with a Windows 7 OS. Until this weekend my iPod Classic (160G) contianing about 22,000 songs worked perfectly. Having added just two album's worth of songs to iTunes my iPod will no longer sync, with the message "V
-
Hi guys, first time posting here. BC Support recommended I come to the forums to get some help! I'm working on an existing site and turning it into a responsive site. I've done a majority of the pages, except for the photo gallery page. The BC photo
-
BIP: lexical params - not parsed correctly
Hello, I am using the following query in BIP. + select wdd.currency_code currency_code, wdd.inventory_item_id line_item, wdd.date_requested, nvl(wdd.source_line_set_id,wdd.source_line_id) source_line_set_id, decode( :p_sort_by, 'CUSTOMER', substrb(pa
-
Subcontract challans after 180 days
Hi All, Can some one tell me the process, what we need to do if the Subcontractor does not return our components within 180 days? Please give the details step by step. Regards, Sattuj