Calculate the working days having the start and end dates only
Hi,
Can BIP be able to calculate the working days having the start and end dates only? It is like the NETWORKDAYS function in Excel. (i.e. excluding weekends and holidays).
Thanks.
Not out of the box.
But You could extend your BIP functions
Look at here:
http://blogs.oracle.com/xmlpublisher/2009/05/bip_by_extension.html
Based on that what you need is similar to the following Java code:
http://objectlabkit.sourceforge.net/
regards
Jorge A.
Similar Messages
-
Reduce Working Days by Emp Start and End Dates
I'm banging my head trying to get this working. The set-up:
DimResources table with various employee information including a Start and End Date.
A Calendar table with FullDate, Year, Quarter....WorkingDays (1 for working and 0 for non-working) and WorkingDayNumber (working days increased by 1, weekends are not).
Page View report with page view filters for Business, Role, Month, Week, Year.
In the calculation the denominator is total working days for the period * 8. Works great. Further reduced by any submitted time off. Again, so far so good. The part I'm having trouble with is trying to further reduce total working days by
the number of days the person wasn't available in a month, defined by the person's start or end date.
The calculated field works great when only 1 person is selected. As soon as more than 1 person is selected or the slicer is cleared, an error is thrown.
Any ideas on what is wrong or better ways to accomplish what's needed?
TotalWorkingDays2CF=CALCULATE
SUM(Calendar[WorkingDays]),
FILTER(Calendar,Calendar[WorkingDays]=1),
Calendar, DATESBETWEEN(Calendar[FullDate],SUM(DimResources[Start Date]),SUM(DimResources[End Date]))
Error:
<detail>
<ErrorCode>rsErrorExecutingCommand</ErrorCode>
<Message>Query couldn't run for dataset 'Tablix41DataSet'.</Message>
<ProductName>Power View</ProductName>
<ProductVersion>11.0.2150.3</ProductVersion>
<MoreInfo>MdxScript(Model) (10, 27) Calculation error in measure 'Calendar'[TotalWorkingDays2CF]: An invalid numeric representation of a date value was encountered.</MoreInfo>
</detail>
Dennis DeRobertisok, but this is not a running total but just a sub-total/grand-total
so what you can do is the following:
create two measures - first calculate the workdays per ressourcen and second use SUMX() to get the sub-/grand-total if multiple employees are selected (e.g. subgroups, groups,division, etc)
WorkdaysRessource:=CALCULATE(
COUNTROWS('Date'),
FILTER('Date',
'Date'[Date] >= CALCULATE(MIN('DimResources'[Start Date]))
&& 'Date'[Date] <= CALCULATE(MIN('DimResources'[End Date])))
Workdays:=CALCULATE:=SUMX(
'DimResources',
[WorkdaysRessource]
hth,
gerhard
Gerhard Brueckl
blogging @ http://blog.gbrueckl.at
working @ http://www.pmOne.com -
SNP Planned order start and end dates are not calculated correctly
Hello SNP Guru's
The SNP planned orders generated after the Heuristics run, have a start and end date based on the Activity Duration (Fixed), while the resource consumption is based on the Bucket Consumption (Variable), which is correct.
The Activity Duration (Fixed) is based on the BOM Base Quantity. So if the Activity Duration = 1 day, and if the order quantity is more than a day, the start and end dates, still shows as 1 day. So no matter what is the order quantity, the start and end dates is always = 1 day.
Does anyone have any experience in implementing any code to change the start and end dates on SNP Planned Order?
Seems like it should work as standard.
Am i missing something?
Thanks,
MangeshDear Mangesh,
SNP is a infinite planning tool. If you have defined fixed duration to be 1 DAY in the activity, no matter how many quantity you input for your planned order, the order will last for one day. If the resourced is overloaded, you then run capacity levelling to
banlance the capacity. What your expected beahavior happens in PPDS planning.
Claire -
Getting the start and end dates of the week
Hi,
I was stuck with a problem in getting the start date and end date of the week,i know the month ,week and year also,with these three values how can i get the start and end dates of a week.please help me
ThanksThere is no simple way. It has to be a math calculation.
There are several ways you can get the dates. First you have to know what day is January 1st and what day is december 31st for a particular year. Second you have to check whether the given year is a leap year or not. Based on the abvove information you should be able to find out what day is a particular date.
Hope this helps to get you started.
- Venkat Dhurjati. -
FM to find week start and end date on the basis of a given date
Hi Everyone,
I have a requirement in which I require the week start and end date of any given date.
For eg: The given date is Wednesday 24.03.2010, I need a function module to calculate the week start date ie. Monday 22.03.2010 and week end date ie. Sunday 28.03.2010 on the basis of that date.
Any input to this query would be helpful.
Thanks,
Nimisha Agarwal
Edited by: Nimisha Agarwal on Jul 7, 2010 7:47 AMHI nimisha,
many posts r there for this .
Kindly check before posting
anyways this FM will serve u r purpose.
GET_WEEK_INFO_BASED_ON_DATE -
Define the start and end dates of an assigned academic period in fee calc.
Define the start and end dates of an assigned academic period
Message no. HRPIQ00ACCOUNTING132
Diagnosis
The academic calendar assigned to the top organizational unit does not contain a start or end date for the academic period (academic year and session) assigned to fee calculation period Z000.
System Response
The system will skip fee calculation period Z000 and continue processing with the next fee calculation period.
Procedure
1. Check which academic calendar is assigned to the top organizational unit.
2. Check which academic period is assigned to fee calculation period Z000. You check this setting in Customizing for Campus Management in the IMG activity Assign Academic Years and Sessions to Fee Calculation Periods.
3. In this academic calendar, create the start and end dates of the relevant academic period using standard time limit 0100 (standard duration of academic period) or a corresponding user-defined time limit.
For more information, see
Define Top Organizational Unit
Define Mandatory Time Limits for Academic Calendar
please give me the needful information to solve this problem.
Regards
Arun RaiArun,
Have you looked in the Student Accounting Cookbook
http://www.sdn.sap.com/irj/scn/advancedsearch?query=studentaccountingcookbook on page 13?
Page 1-18 will help you setup the Oranizational unit, the academic calendar and the modules.
Bev beck -
Adding a summary column in a table which contains the start and end dates in the week
Hi,
I've got a DIMENSION DATE table and want to add in another column which shows the start and end date of the week.
See below, the new column is WEEKOFYEARTEXT.
Does anybody know how i may generate this column using SQL and using the existing columns?
Umar JavedSee: http://www.sqlusa.com/bestpractices/datetimeconversion/
DECLARE @Year INT = '2015';
WITH cteDays AS (SELECT DayOfYear=Dateadd(dd, number,
CONVERT(DATE, CONVERT(char(4),@Year)+'0101'))
FROM master.dbo.spt_values WHERE type='P'),
CTE AS (SELECT DayOfYear, WeekOfYear=DATEPART(week,DayOfYear)
FROM cteDays WHERE YEAR(DayOfYear)= @YEAR)
SELECT WeekOfYear, StartOfWeek=MIN(DayOfYear), EndOfWeek=MAX(DayOfYear)
FROM CTE GROUP BY WeekOfYear ORDER BY WeekOfYear;
WeekOfYear StartOfWeek EndOfWeek
1 2015-01-01 2015-01-03
2 2015-01-04 2015-01-10
3 2015-01-11 2015-01-17
4 2015-01-18 2015-01-24
5 2015-01-25 2015-01-31
6 2015-02-01 2015-02-07
7 2015-02-08 2015-02-14
8 2015-02-15 2015-02-21
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014 -
How to find the start and ending dates of a quarter of a particular fiscal
Hi Experts,
I need a function mudule which returns starting and ending date s of a particular quarter of a particular fiscal year .
For Example: if pass 1 quarter and 2002 or 2 quarter 2002 it has to give me the star and end dates of that particular quarter na d fiscal year.
Please help me which is urgent for me.Hi Kishan thanks for reply.
But given function module the 2nd one is full but it is giving me the calender year dates but i need fiscal yea dates.
fro example: if i pass 1 st quarte and 2006 it is to give me the 1st-april to 30-jun2006.
And need this quater starting date and ending date for as per USA fiscal year calender.
If u get any idea plz let me know.
thanks.
Dashmantha. -
Calculate Start and End date in Connect By -- When Hirerchy Changes
/* Formatted on 5/20/2013 9:53:00 AM (QP5 v5.115.810.9015) */
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Hello , Can some one Please help me or Guide me in calculating Start and End dates for the below logic
I want to calculate the Manager Hirerchy for the given Agent.
Then Below Query is working fine and its giving me the desired results
But when there is a change in the Manager Hirerchy or Manager gets Promoted
Then i need to calculate the start date and end date.
CREATE TABLE PERSON_DTL
SID VARCHAR2(10 BYTE),
EMP_MGRS_ID VARCHAR2(10 BYTE),
START_EFFECTIVE_DT DATE,
END_EFFECTIVE_DT DATE
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M100', 'M107', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M101', 'M102', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('A100', 'M100', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M100', 'M101', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M107', 'M102', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M102', 'M103', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M103', 'M104', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('A101', 'M105', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
Insert into PERSON_DTL
(SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
Values
('M105', 'M106', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
COMMIT;
SELECT CONNECT_BY_ROOT (b.sid) agent_sid,
TRIM (
LEADING ',' FROM SYS_CONNECT_BY_PATH (b.sid, ',')
|| ','
|| b.emp_mgrs_id
PATH,
START_EFFECTIVE_DT Start_dt,
END_EFFECTIVE_DT End_dt
FROM PERSON_DTL b
WHERE CONNECT_BY_ISLEAF = 1
START WITH sid IN ('A101', 'A100')
CONNECT BY PRIOR b.emp_mgrs_id = b.sid
This is the results that i am getting now.
AGENT_SID PATH START_DT END_DT
A100 A100,M100,M101,M102,M103,M104 1/1/2010 12/31/9999
A100 A100,M100,M107,M102,M103,M104 1/1/2010 12/31/9999
A101 A101,M105,M106 1/1/2010 12/31/9999
Results Required
A100 A100,M100,M101,M102,M103,M104 1/1/2010 5/18/2013
A100 A100,M100,M107,M102,M103,M104 5/20/2013 12/31/9999
A101 A101,M105,M106 1/1/2010 12/31/9999May be this..
SQL> select agent_sid,max(path) path,max(start_dt) start_dt,
2 min(end_dt) end_dt
3 from
4 (
5 select agent_sid,path,start_dt,end_dt,
6 sum(flg) over(order by rn) sm
7 from
8 (
9 select agent_sid,
10 path,
11 start_dt,
12 end_dt,rn,
13 case when path like lag(path) over(order by rn)||'%' then 0 else 1 end flg
14 from
15 (
16 SELECT CONNECT_BY_ROOT (b.sid) agent_sid,
17 TRIM (
18 LEADING ',' FROM SYS_CONNECT_BY_PATH (b.sid, ',')
19 || ','
20 || b.emp_mgrs_id
21 )
22 PATH,
23 START_EFFECTIVE_DT Start_dt,
24 END_EFFECTIVE_DT End_dt,rownum rn
25 FROM PERSON_DTL b
26 START WITH sid IN ('A101', 'A100')
27 CONNECT BY PRIOR b.emp_mgrs_id = b.sid
28 )
29 )
30 )
31 group by agent_sid,sm
32 order by agent_sid;
AGENT_SID PATH START_DT END_DT
A100 A100,M100,M101,M102,M103,M104 01-JAN-10 18-MAY-13
A100 A100,M100,M107,M102,M103,M104 20-MAY-13 31-DEC-99
A101 A101,M105,M106 01-JAN-10 31-DEC-99Edited by: jeneesh on May 20, 2013 7:54 PM
Not thoroughly tested.And not sure whether an easy way exists.. -
Schedule type LineChart with clients and unavailable start and end dates
I have been working on trying to get something in flex which will display a list of clients and their unavailability start and end dates. I have attempted the line chart and the HLOC chart but have not seen success. I do have the H or V grids working fine. But getting the data to display in a line graph based upon start date and end date has been my challenge. any suggestions
Current Code:
<s:Label x="0" y="5" text="Min Date" height="24" fontFamily="Times New Roman" verticalAlign="middle"/>
<mx:DateField id="minDateField"
x="50" y="5"
formatString="MM-DD-YYYY"
selectedDate="{minDate}"
change="minDatefield_changeHandler(event)"/>
<s:Label x="150" y="5" text="Max Date" height="24" fontFamily="Times New Roman" verticalAlign="middle"/>
<mx:DateField id="maxDateField"
x="200" y="5"
formatString="MM-DD-YYYY"
selectedDate="{maxDate}"
change="maxDatefield_changeHandler(event)"/>
<mx:LineChart id="nonAvailsLC" x="0" y="40"
showDataTips="true"
dataProvider="{getNonAvailsResult.lastResult}"
creationComplete="nonAvailsLC_creationCompleteHandler(event)"
width="890" height="550">
<mx:backgroundElements>
<mx:GridLines gridDirection="both"/>
</mx:backgroundElements>
<mx:horizontalAxis>
<mx:DateTimeAxis dataUnits="days" minimum="{minDate}" maximum="{maxDate}"
labelUnits="days"/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:CategoryAxis categoryField="user" labelFunction="getName"/>
</mx:verticalAxis>
<mx:series>
<mx:LineSeries xField="startDate" yField="user"
form="horizontal"/>
</mx:series>
</mx:LineChart>I guess I still have lots to learn about Flex and Renderers. I downloaded a Gantt chart with Code and they used the AdvancedDataGrid with renderers and such. I modified the code to work for me. but if I had to create it myself right now, I would be in trouble. Lots more to learn.
-
Hyperion Planning dynamic forms based on start and end date across years
Hi All,
I have a requirement where i need to be able to view a form showing periods across years that are dynamically built depending on the start and end dates. If i have a start date of 01/11/2009 and an end date of 31/7/2013 i want to be able to view a form that shows all of the periods (Jan,Feb etc) in a form that is driven by these dates, in addition it will need to show the actual scenario up to the current month and the forecast from the current month to the end date. So basically if a user inputs the start and end dates the form will display the relevant periods driven by these dates.
Any tips very much appreciated!Hello,
This is difficult to realize, but you can get quite far with a workaround. The first question is, where do you want to input your selection of time periods? Assuming you have a webform with the complete timeline in months and years and you type in the start period and end period.
Webforms have the option to suppress rows and columns.
This can be extended with option of empty cells or not empty cells.
You will need to apply your creativity on this.
Put every month-year combination in a column and add the suppression.
Calculate the timeline between start period and end period with a dummy member, so data exists for these and columns will show.
Maybe you will need to copy the required timeline into a separate version for this, to avoid having periods which were outside the selection and still have data.
I hope these hints help a bit in this challenge.
Regards,
Philip Hulsebosch
www.trexco.nl -
How to change both start and end dates for an business event (or any object
Hi all.
We are in the case to change the validity dates for several business events in training management.
The special point is that both, start and end date, have to be changed.
In example, business event 00000001 is valid from 2010.01.01 to 2010.01.31 and shoud be "moved" from 2010.05.01 to 2010.05.31.
So if i run RHBEGDA0 report to change start date first, it doesn't work propperly because new start date is bigger than old enddate.
Next thing we thought is to change end date first, using RHGRENZ1, and then change the start date, with the report RHBEGDA0. Problem with this solution is that a business event duration shoud be calculated taking care of free days (weekends and day ofs).
Is there any better solution for this?
Thanks in advance for your help.
Best regards.Hi,
I gueass the best solution is to use PV1A t-code.
You can write an LSMW for this t-code if the number of business events to be maintained is huge.
Regards,
Dilek -
Product View - Start and End dates
Hi,
I have a material that is externally procured from a vendor to a location. In product view, I have few purchase requisitions. When i double click on it, it takes me to the details of PR. I am trying to understand what start and end dates of the PR are.
For some PRs, the start and end dates are same but for some there are is some times a day or two and even 3 in some cases.
I am wondering what makes the end date differ from start date.
There is a safety day's supply of 2.5 days
We have a transportation lane with transportation duration 23hrs.
Any of these play any role in the end date delay?Hi,
Thanks for the reply. The vendor and the receiving location have a transportation lane defined.
What do you mean by the time duration that shows up in the T Lane corresponding to the inforecord?
Here are the times I see in transportation Lane;
Product Specific Transportation lane:
GR processing times (checked) : (No value defined) days
Planning Horizon: 0 days
Partner Horizon: 0 days
Horizon for Expctd receipts: 0 days
Horiz. Fut. Aval. Whse Stck: 0 days
Planned Delivery time: (No value Defined)
Means of Transport
Tsp. duration: 23 hrs
Bucket offset: 0.5
Period factor: 0.5
and no other times defined.
Are any of these effect the delay?
My ECC is EST and the timestream is EST. Should I change the product view (also my own data) to EST or UTC??
I have a product that has no delay between the start and end dates. The difference I see between the one that I am having problem (the start and end dates are apart ( I'm calling it bad one) by atleast a day) with and the one that has no delay(I'm calling this good one) between the start and end dates is the "Planned Delivery time.
The good one has 1 day and the bad one has nothing defined.
Does this make any difference?
Thanks.
Edited by: Raj G on Jul 17, 2008 3:36 PM -
Contract Start and End Dates in Sales Order
Hi
I have a situation where a service item is bundled with a deliverable item. The order is as follows
Line Item Mat Qty Higher Level Item
10 Item No.1 (Physical Item) 1
20 Item No.2 (Service Item) 1 10
For the deliverable item 10 , Revenue is recognized immediately. For the Service item no.20 , revenue needs to be recognized over a period of 1 Year (It is a 1 year service contract).
The whole order is created via BAPI from an external 3rd party order capture system.
In order to do revenue recognition properly for service items , SAP I believe has 2 options
1. Based on Billing plan dates
2. Based on contract start dates
Since order with both the line items need to produce 1 invoice, I cannot use billing plan . The only other option is to use contract start and end dates. I have enabled contract data at the sales order level. So when I enter the contract start and end dates manually at the line item level and set the item category to recognize revenue based on contract start and end dates based on time-based revenue recognition it is working fine.
But I need a way to automate the population of contract start and end dates at the line item level. My ABAP guy is not able to find a user exit that can change the XVEDA or any VEDA structure in any of the user exits.
I guess the SAP SD gurus out there would have definitely dealt with a situation of product bundling (Service and non-service items in the same sales order with one billing document , but seperate revenue recognition for service and non-service items)
Please help.
Thnx
SivaHi Siva,
Kindly let me know what criteria you want to give for automatic population of start date of contract...
Standard SAP comes with a few baseline dates for contract start date and we can control this from customization itself.
01 Today's date
02 Contract start date
04 Acceptance date
05 Installation date
06 Date contract signed
07 Billing date/Invoice date
08 CntrctStDate+contract duration
09 Contract end date
If you have some criteria which is not covered here, then let me know and i will try to provide some help then.
Thanks
Kapil Sharma -
Report execution start and end date/time
Hi All,
How can one find execution start and end date/times for all reports? Basically I am looking to see what reports were run on a day, when and how long it took for each to complete.
Thank you.
DenisHi,
The "eul5_batch_reports" holds the data about the scheduled report and if you don't have any so you will not have any data.
Take a look at "EUL5_QPP_STATS"
for example:
select
qpp.qs_doc_name,
qpp.qs_doc_details,
fu.user_name Ran_by,
qpp.qs_created_date Start_run,
qpp.qs_doc_owner Doc_owner,
qpp.qs_num_rows rows_fetch,
qpp.qs_est_elap_time estimated_time,
qpp.qs_act_elap_time Run_time,
qpp.qs_act_cpu_time Cpu_time
from eul_us.EUL5_QPP_STATS qpp,
fnd_user fu
where substr(qpp.qs_created_by,2,10)=fu.user_id
order by qs_created_date
Maybe you are looking for
-
Reg:table declaration in a top include
Hi gurus, I have declared few tables in the top include of a function module,but while activating the FM it's throwing error that "the table has already been declared".Where as I have not declared those tables anywhere else. Please give me a solution
-
Where can I get Interactive training for Illustrator?
Where can I get Interactive training for Illustrator? Thanks for your help!
-
Dreaded License Agreement question
I know this has probably been asked millions of times, all over the place but I just want to make 100% sure. I downloaded Eclipse v3.3.2 which has the Crystal Reports for Eclipse version 1.0.6.v1371 plug-in. I wish to find out about the license agree
-
Dreamviewer cs4 code colouring not working
Hi.. All code colour in the source code looks as"black colour". i tried to fix it by changing the edit>preference>code colouring. but not working. can anybody help me thanks
-
Oracle BI Administration Tool - OCI problems
Hi I've experienced the following problems with the Admin tool, when importing metadata and data through an OCI connection pool : Oracle BI Admin tool crashes when I try to "View Data" on a table containing a SPACE in one of the columns of a row. Str