Workday week dates minus the weekend
Hi,
I have a small issue which i hope you can help with.
I have created a annual leave form, but the problem is it says when i got to digitally sign the document " This document was successfully saved, but an error occured afer saving the document. Please close and re-open the document"
Please help as i have to issue this document and i dont want this pop up happening on all of them.
Please help
Thanks
Hi,
So, you want to do one thing if today is a Monday, and you want to do something else if today is not Monday.
That sounds like a job for CASE:
select c.client_code,
e.created_date,
c.client_name,
from event_client_field ecf, event e, client c
where e.event_id = ecf.event_id(+)
and e.client_id = c.client_id
-- Nothing above this line was changed; everything below was changed
and e.created_date >= TRUNC (SYSDATE) - CASE TO_CHAR ( SYSDATE
, 'DY'
, 'NLS_LANGUAGE=ENGLISH' -- If necessary
WHEN 'MON' THEN 3
WHEN 'SUN' THEN 2 -- If wanted
ELSE 1
END
AND e.created_date < TRUNC (SYSDATE)
;Whenever you have a condition, try to use the raw column from your table as one of the operands instead of expressions based on the column. That is, try to say
AND e,.created_date < ... rather than
AND TRUNC (e.created_date) < ... That way, the optimizer can use an index on e.created_date, and it could be much faster.
Similar Messages
-
How to display 16 weeks data in the output of the query
Hi experts,
I have to display 16 weeks data from current week(Thursday to wednesday).
(19/07/07 - 12/07/07) (11/07/07 - 6/07/07) like these 16 weeks
sales sales
product1 200 300
product2 400 500
I have to use text variable on createddate char but I do not know how to implement
the above scenerio.
Guru's please help me.
Thanks & Regards,
James.sure james ..
chk these links..
text var..
http://help.sap.com/saphelp_nw04s/helpdata/en/85/e0c73cccbdd45be10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/c1/759b3c4d4d8d15e10000000a114084/frameset.htm
chk thisthread too..
Re: Problem with the text variable
and for replacement paths..
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
hope it helps... -
How to update the Weekly data using BAPI for MD61
Hi All,
i have used two BAPI's in my Z program to upload data from flat file to sap-system (BAPI_REQUIREMENTS_GETDETAIL and BAPI_REQUIREMENTS_CHANGE) and i uploaded the Monthly Data from the flat file on sap system successfully.
but i have to also upload the Weekly Data on the sap system using BAPI.
is there any BAPI for the same or what can be the solution for the uploading weekly data on sap system ?
Please reply me.
Thanks in advance..
Edited by: Prajapati_Shyam on Dec 29, 2010 4:19 PMHi Jovito,
thanks for your reply,
i developed a Z program to upload monthly data as well as weekly data into tcode MD61 by selecting the radio button weekly or monthly but i am not able to upload the weekly data as i didnt' get any BAPI OR any other logic to upload weekly data Or not able to use the existing BAPI BAPI_Requirement_create , because the upload file is in monthly format.
MD61 tcode can be used for both data (Monthly or weekly data).
can you suggesst me any BAPI to upload the weekly data or any other logic for the same
thanks & regards
Prajapati -
Report for expiry date of the material
All SAP Gurus,
We have certain Materials which are expirable.
These Materials are batch managed, and each batch is having different expiry date.
Is there any standard report available which can give is the days remaining to reach the expiry date (for that material)?
Regards,Hi,
Try MB5M,
here
Field name Field value
Material Enter the material code to which the report is desired.
Plant Enter the plant in which the report is to be generated.
Storage Location Enter the storage location in which the report is to be generated. Optional entry. Leave it blank.
Batch Batch number to be displayed. Optional entry. Leave it blank.
Remaining shelf life Minimum amount of time for which the material must keep upon goods receipt for the goods receipt to be accepted by the system. Optional entry.
Remaining shelf life warehouse Indicates that the remaining shelf life of a batch in
Total remaining shelf life Indicates that the system displays the total remaining shelf life of a batch.
The total remaining shelf life is calculated from the shelf life
Expiration date minus the current date. Select this radio button.
Indicates that the system also displays materials with zero stock. Optional, leave it blank.
Display of remaining shelf life in days. Select this radio button to display the remaining shelf in days in the report.
Regards,
Pardeep Malik -
Disaggregate Periodic Data to Weekly Data (Modeling Time Dimension)
Hi,
We are using BPC MS Version 7.0. Our users plan at period level and I need to disaggregate periodic data to weekly data by looking up weeks from Time Dimension.
Suppose if 2009.Jan has 4 weeks I need the following result
Periodic Data
2009.Jan Acct1 1000$
Weekly Data
2009.Jan Wk1 Acct1 250$
2009.Jan Wk2 Acct1 250$
2009.Jan Wk3 Acct1 250$
2009.Jan Wk4 Acct1 250$
Can we model Time Dimension with two hiearchies to achieves this?
Which is best way to dissaggrate? (Stored Proc or SSIS Pacakge or Script Logic) ?
Thanks
RajAn easy way to achieve this feature is to have the time dimension be weekly and do the spread on the input schedules before sending.
There would be two EVDREs (one refresh only of monthly data and the other send only of weekly data). The data range of the monthly EVDRE would be input and where the user enters data. The data range of the weekly EVDRE would be formulas (pointing to the monthly data and doing the correct division based on number of weeks in a month). The user is inputting monthly data, but the schedule is sending the weekly values.
The allocation will work as well, but I would suggest to create a weekly input node under each month to capture the monthly value and then spread to the weekly members.
JAN
|---WK Input
|--- WK1
|--- WK2
|--- WK3
|--- WK4 -
0CALWEEK to be displayed in date format with start of week date
Hello everyone,
I have a requirement wherein I want to display 0CALWEEK info object in the cube in date format with start of week date in the Bex query report. For example if 0CALWEEK is 23.2005 then in Bex report it should display as 06.06.2005. Anyone got any ideas if we can achieve this without adding any additional info object in cube itself ?
many thanks,
NeerajHi Neeraj,
There are multiple ways to achieve this.
1. Virtual characteristics. This approach still requires having a placeholder of 0DATE type in the query, but you don't have to populate it in your load. This could slow down you query as well.
2. Depending of the frontend you using you can run Excel macro (BEx) or Table exit (Web).
Please let me now if you need more details.
Regards,
Gersh -
I am trying to rest todays date minus a date coming from mySQL data base:
// I get no.sentDate in the format YYYY - MM - DD
conWorkPartyID = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
String sWorkOrderID = "select co.orderPartyid, no.workOrderListPartyid, wl.workOrdListDesc, no.sentDate from contractorOrders as co "+
"left join newOrders as no on no.orderPartyid = co.orderPartyid "+
"left join workOrderList as wl on wl.workOrderListPartyID = no.workOrderListPartyid "+
"where co.flagSentToContractor = 0 and co.contractorPartyid =" + sCompany;
cWorkPartyID = conWorkPartyID.executeQuery(sWorkOrderID);
while(cWorkPartyID.next()){
//this is the date that i need, which comes from db
Calendar cal = Calendar.getInstance();
Date dateTest = cWorkPartyID.getDate("no.sentDate", cal);
//get today's date
Date Now = new Date();
//rest today's date minus the date coming from db
cal.setTime(new Date(Now.getTime() - dateTest.getTime()));
//difference = cal.getTime();
//stores the years difference, which probably won't be needed
int year = cal.get(Calendar.YEAR);
//the varible months stores the months which probably won't be needed
int month = cal.get(Calendar.MONTH);
//the varible day stores who many days difference are there
int day = cal.get(Calendar.DAY_OF_MONTH);
System.out.println("and the difference between the insertDate and the today is in days: "
+ String.valueOf(day));
and the error is a java.lang.NullPointerException, any suggestions to change the above will be very much appreciated.
Thank youThanks for the reply, I found the problem, i was returning no.sentDate in the form YYYY-MM-DD and method getTime doesn't like so it was returning null, so what I have done was cast(no.sentDate as datetime) and also store the difference of the dates as a long variable as I need the difference between the dates not the day of the month.
My code now looks like this:
conWorkPartyID = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
String sWorkOrderID = "select co.orderPartyid, no.workOrderListPartyid, wl.workOrdListDesc, cast(no.sentDate as datetime) as newDate from contractorOrders as co "+
"left join newOrders as no on no.orderPartyid = co.orderPartyid "+
"left join workOrderList as wl on wl.workOrderListPartyID = no.workOrderListPartyid "+
"where co.flagSentToContractor = 0 and co.contractorPartyid =" + sCompany;
cWorkPartyID = conWorkPartyID.executeQuery(sWorkOrderID);
while(cWorkPartyID.next()){
Object x = cWorkPartyID.getObject("co.orderPartyid");
Object y = cWorkPartyID.getObject("no.workOrderListPartyid");
Object z = cWorkPartyID.getObject("wl.workOrdListDesc");
Date dateTest = cWorkPartyID.getDate("newDate");
Date Now = new Date();
System.out.println("dateTest is: " + dateTest.getTime());
long dif = ((Now.getTime() - dateTest.getTime())/86400000);// milliseconds to days
System.out.println("Order PartyID that require your attention is : "+ x + " and workOrderPartyid: " + y +" and WorkOrderListDesc: "
+ z + " and the sent date is: "+ dateTest + "and the difference between the insertDate and the today is in days: "
+ dif);
cWorkPartyID.close();
Any other suggestions are welcome.
Thanks for answering so soon.
Good night! -
Best way to derive a "week ending" date using the Derived Column Transformations
Hi, I have an interesting challenge. I am working on creating a BI DB that contains timesheet data. The data contains a column representing the date "worked" ([Date]. Nearly all output reporting is based on a timesheeting week that end on
a Wednesday. My thinking has been to create a derived column "WE" (week ending) that represents the entries of the preceding 6 days.
(Originally I entertained deriving this value view SQL view - however we are talking about a DB that is is a substantial DB (excess of 100M timesheet bookings) and an index on the WE field is warranted) so decided a derived WE column was best approach.
The Date field is represented from a SAP format (German long dated format) - however I cannot use the convert option ;( in the TE.
The Date field is derived via: (DT_DATE)(SUBSTRING([Date ],7,4) + "-" + SUBSTRING([Date ],4,2) + "-" + SUBSTRING([Date ],1,2))
I would welcome some recommendation on how to best derive a WE column. (The DT_DATE format is not susceptible to a /7, mod7 operation).
Thanks in advance,
/LTry this solution :
http://stackoverflow.com/questions/1803987/how-do-i-exclude-weekend-days-in-a-sql-server-query -
Rolling 30 Day Calculation Based on the Weekend Date
Hi Guys,
I am trying to calculate a sum of rolling 30 day based on the weekend date. The table I am going to query has a date column that only has weekend date(Saturdays only). Based on that I have to calculate the formula for rolling 30 days. I am using the formula to RelativeDate formula to do this calculation.
ToDate(FormatDate(RelativeDate(CurrentDate();-DayNumberOfWeek(CurrentDate() - this formula is to get the last Sat of the week.(Previous Week)
=RelativeDate([Previous_Week];-30) This is to get the rolling 30 days based of the last Saturday of the week.
Here is where I face the problem and would need your suggestion -
when I do a sum using the previous date and rolling 30 day I am getting an error
=sum([Acc]) Where [Week Ending] Between([Previous_Week];[Rolling 30 Days])
Error- Missing or bad operand in Where expression.
Is there any other formula I could use?
Thanks for your help in advance,
JitanHi,
You are missing paranthesis () in your formula. Try using
=sum([Acc]) Where ( [Week Ending] Between([Previous_Week];[Rolling 30 Days]) ) -
Hi, Im not a frequent forum poster, as most of my questions can be found already answered on them!
This is a question Ive had for a long time and it amazes me that no-one else seems to ask it. I check at each OS upgrade but its never there...
Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
I was able to do this years ago in MS Outlook, and utilized it all the time when I needed to push things back, now I have to open the event and select an new date in the drop-down calendar for each & every event I want to move to a new month at the end of the month.
If its definitely not possible, how to you ask apple to consider including it - it doesnt seem like a particularly difficult task.
Thankyou
Andrew.Andrew,
Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
No, but you can use cut/paste. Cut (⌘X) the event, then click on the week where you want to move the event, and Paste (⌘V).
If you have a suggestion for Apple to change that method use: Apple - Mac OS X - Feedback. -
Cannot select a Date in the 2nd week of any month from "Month View"
Looking for some help with a strange problem that has started within the last day or 2. In Calendar, under the Month view, it will not allow me to select a date in the current week (or the second Week dates in ANY Month for that matter i.e. 6-8-08 thru 6-14-08, 8-3-08 thru 8-9-08, 4-6-08 thru 4-12-08). It skips from the 1st week of June (6-1-08 thru 6-7-08), to the 3rd and 4th weeks of June (6-15-08 thru the end of the month). It is like it is not recognizing where my finger is pointing. I can access the current week through the list view and day view, and it will allow me to post an event by choosing the current week in the add option, but will not let me pick that date to view it once it has been scheduled. The dot shows up, and it shows on list view, but cannot get to the date by selecting it in month view. That section of my phone screen will let me access other applications and recognize where I am touching, so I don't believe it is a sensor issue. I have tried rebooting, but it has not helped. Any ideas out there? Please let me know. Thank You! for any guidance.
Clearwater Randy,
If the screen is only not responding in that particular application, you may want to first do a reset. To reset, press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears.
If that does not resolve your issue, try restoring in iTunes. To restore, connect your iPhone into iTunes and click Restore on the Summary page. Note: All of your information will be erased from the iPhone, so make sure to have a backup of important information on your computer before restoring.
Hope this helps,
Jennifer B. -
How can I make a report of all records with the date in the last two weeks?
Hi!
I have records with a date field, I want to create a report that only includes records with a date which is within the last two weeks of the system date, is this possible? Surely this is a basic database function, I would have thought, but I can find no help about it and there's very little in Mac Help about doing anything other than simple stuff with reports.
I'm not a genius with databases, so help with any required formula or what have you would be great!Hi Jonathan,
Here's a formula you can use with the Match function. 'Date' is the name of the date field, which must be a "Date" type field.
'Date'>NOW()-14
Match will select (highlight) all records matching the query. You'll then need to use Organize > Hide Unselected to show only the matches.
Unfortunately, I haven't found a way to make the NOW() function work in a Find request, and neither Match requests nor Hide Unselected can be included in a recorded search, either of which would reduce repeating the report to a one-button operation.
Regards,
Barry -
I am trying to get "First day of the week" data from CLDR spec24 but cannot find where to look for it in the spec. I need this data to calculate numeric value of "LOCAL day of the week".
This data to implement "c" and "cc" day formats that equals numeric local day of the week.
e.g if "First day of the week" data for a locale is 2 (Monday) , it means numeric value for local day of the week will be 1 if it is Monday that day, 2 if it is Tuesday that day and likewise.Hi
If you want to week to be started with Sunday then use the following formula:
TimestampAdd(SQL_TSI_DAY, 1-DAYOFWEEK(Date'@{var_Date}'), Date'@{var_Date}') if it's retail week(starts from Monday) then the follow below:
TimestampAdd(SQL_TSI_DAY, 1-DAYOFWEEK(Date'@{var_Date}'), Date'@{var_Date}')
I'm assuming var_Date is the presentation variable for prompt...
Edited by: Kishore Guggilla on Jan 3, 2011 4:48 PM -
Up data for the next week or just let it go over?
Everyone on my plan except my poor son has unlimited data - he became old enough to have a phone too late. He is going out of town on a school trip on Thursday and is thisclose to bumping up against his data limit (which happens every month). Normally I wouldn't do anything, but I do want him to be able to use his phone/data on the trip. I can't find an easy way to up his data online. Not being on hold for 30 minutes for customer service is worth something to me as well. Should I up his data amount or just let him run over a GB? Are we talking either $10 (to up his data plan) or $15 (to go over his data)? I'll pay an extra $5 not to have to call them. And then have to call them back when our new billing cycle starts in a week - LOL.
My son has had a phone for 2+ years now, so he is well versed in using wifi when it is available. However, we live in a rural area and wifi options are not plentiful. His biggest drain, I think, is that he won't use his high school's wifi because he says it's crap. Not sure I believe that, but he understands the consequences (running out of data before the end of our billing cycle) and normally lives with them without complaining. In this one case, I want him to have data even though he's used his allotment up for the month. We are on a nationwide plan and our billing month ends on the 6th.
If what mrniceguy says is accurate, my choices are to call them and pay $20 and have to call them back to lower it again, or do nothing and pay $10. In that case, I choose to do nothing and spend less money. :-)
I have usage controls set for him, so I went in and bumped up his limit usage to close to 3 GB and will go back in May 7 or soon after and put it back to where it is normally.
Our family must be data hogs. I don't use a lot of data because we have home wifi and I also connect to my employer's wifi; my husband's job does not have wifi so he's a pretty big user; and my daughter, who is in college but lives off campus, routinely uses ~12 GB of data every month.
We will stay on this plan as long as possible, and know that if we want new phones, we will have to pay full price. We also have all the phones fully insured so that if something happens to one of our phones, we don't have to drop $500+ until we are ready to. I am going to look into moving my son to Straight Talk so that he can have unlimited data too, and if he doesn't see any negative changes, we will all switch. No reason to pay so much more every month for the same product.
Thanks for the replies! -
I have developed a fillable pdf in Adobe Acrobat Professional X but when I try to use the Airprint feature the form print minus the field data, have anyone been able to resolve this issue?
Hi,
I had a similar problem and found help for it. Go to the "Advanced" menu and select Extend features in Adobe Reader. That will enable rights which may resolve your problem. If that doesn't work, there is a really helpful guy in here, Robert Levine. You may want to ask him directly.
Good Luck
Maybe you are looking for
-
Need help in doing exercise with classes
Here is my exercise: 1. An object Student has: id, last name, first name, number of AAS courses and number of ESL courses in current semester and whether student uses laptop or not. The formular to calculate tuition fee: Tuition fee = AAS courses
-
has anyone compared the Vocal Transformer to Apples AUPitch? Although the controls are different they seem to do the same thing. Its as though they are both the same AU but with two different user interfaces. But I'm not sure. It seems that AUPitch i
-
i put in the code to get the digital copy for star trek into darkness, and i clicked download later, but it didn't show up in my movie library like the other movies i did the same thing to, where is my digital copy of star trek?
-
Changing OSX default volume setting to a higher level in sound preferences
When I change the default volume setting to a higher level in sound preferences within OSX, it is back at the lower level at the next listening session the following time I use iTunes on my Mac Mini. Within System Preferences there is a section that
-
I have a logical table with three sources. The query that's being generated is properly selecting information from all three sources, but it's not putting them together the way I would like. The query generated looks like this: WITH SAWITH0 (query1 f