How to get the date of first day of a week for a given date
Hi gurus
can any one say me how to get the date of first day(date of Sunday) of a week for a given date in a BW transformations. For example for 02/23/2012 in source i need to get 02/19/2012(Sunday`s date) date in the result. I can get that start date of a week using BWSO_DATE_GET_FIRST_WEEKDAY function module. But this function module retrieves me the start date as weeks monday(02/20/2012) date. But i need sundays(02/19/2012) date as the start date. So it would be really great if anyone sends me the solution.
Thanks
Rav
Hi,
The simplest way would be to subtract 1 from the date date which you are already getting in transformation routine, but instead of doing that subtraction manually which might need bit of errort, you can simply use another FM to subtract 1 from given date.
RP_CALC_DATE_IN_INTERVAL
Regards,
Durgesh.
Similar Messages
-
How to get the total time spent by a Portal User for a given Date?
Hello,
We need to develop a Daily Audit Track Report that displays
the Users logged into our System for a given day and the total login duration in Hours( should include all the
Login-Logouts of a given date).
While Portal30_SSO.WWSSO_AUDIT_LOG_TABLE$ can help me get the Users login to Portal for a day, there is no Login/Logout periods in it.
Any help would be appreciated.
Thanks
MadhavYou may want to consult with the view WWLOG_ACTIVITY_LOGS. Not sure how your environment is configured, but ours includes two WWLOG_ACTIVITY_LOG tables (1 & 2). These tables purge themselves based on your configuration. In other words, Portal will log activity in WWLOG_ACTIVITY_LOG1$ for a certain period of time, then switch to WWLOG_ACTIVITY_LOG2$ while purging the first one. You can specify the purge timetable in the Adminster tab of the Admin page (under Global Settings). If you just key on just 1 log table, you're logs may someday go blank.
The actions used are 'login' and 'logout'. You can link the actions using the key_1 and key_2 columns of the view. From our current experience, Portal does not account for users that simply close the browser. In other words, we have not been able to get a log event for the action 'logout' for the same key_2 value if someone does this. -
How to find the Day on a Week for any given Date
Hi..... I need your help to find out the Day on a Week for any given Date .
Say if the Date is 31/12/2009 , what would be the Day on a Week for this Date.
Are there any fucntions available to determine the same?
Please let me know....Thanks in Advance
Regards
SmitaHi ,
You can using the following peice of code to get the Day of a Week for the given date :
Calendar now = Calendar.getInstance();
System.out.println("Current date : " + (now.get(Calendar.MONTH) + 1)
+ "-" + now.get(Calendar.DATE) + "-" + now.get(Calendar.YEAR));
//create an array of days
//Day_OF_WEEK starts from 1 while array index starts from 0
String[] strDays = new String[]{"Sunday", "Monday", "Tuesday", "Wednesday", "Thusday", "Friday", "Saturday" };
String day_of_week = strDays[now.get(Calendar.DAY_OF_WEEK) - 1];
System.out.println("Current day is : " + strDays[now.get(Calendar.DAY_OF_WEEK) - 1] );
Edited by: Ritushree Saha on Jun 4, 2009 1:09 PM -
How to get the fixed result in a DES/CBC mode with fixed input data and fix
How to get the fixed result in a DES/CBC mode with fixed input data and fixed key. Below is my program , I tried to get the checksum of the DESInputData with the DESKeyData, but each time the result is different.
below is my code:
byte[] DESKeyData = {(byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01, (byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01 };
byte[] DESInputData = {(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31,(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31 };
SecretKeySpec skey = new SecretKeySpec( DESKeyData, "DES" );
Cipher cipher = Cipher.getInstance("DES/CBC/NoPadding");
cipher.init( Cipher.ENCRYPT_MODE, skey );
byte[] result = cipher.doFinal( DESInputData );Use class javax.crypto.spec.IvParameterSpec to specify IV for CBC mode cipher:
// Create CBC-mode triple-DES cipher.
Cipher c = Cipher.getInstance("DESede/CBC/PKCS5Padding");
// Specify IV.
IvParameterSpec iv = new IvParameterSpec(new byte[] { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF });
// Initialize cipher with proper IV.
c.init(Cipher.ENCRYPT_MODE, yourKey, iv);
// Encrypt and decrypt should work ok now.
For more info about cryptography, search the Internet for IntroToCrypto.pdf from mr. Phil Zimmerman. This document is also part of PGP (http://www.pgp.com).
An excellent book is 'Applied Cryptography' from Bruce Schneier (http://www.counterpane.com/applied.html).
Regards,
Ronald Maas -
I bought two films on my ipod tough 4g ( normally comes up on my ipad if i have bought something on my ipod) but i dont know how to get the two films on my ipad without paying for them.
Movies work differant than TV shows, music and apps. With movies, to get them from one device such as an iPod Touch to an iPad, you would need to connect the Touch to your computer first and in iTunes under the file menu, hit transfer purchases. Next connect the iPad and you can sync the movie to the iPad.
While the iPad is connected to the computer, in iTunes, click on the iPad in the left pane and when the screen loads, click movies and from there, you can select the movie that you want to sync. -
How to get the object class field value in CDHDR table for vendor
hi
how to get the object class field value in CDHDR table for vendorTry KRED/KRED_N as object class in CDHDR for Vendor.
-
I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?
Hi , Welcome to the HP Forums!
It is a terrific place to find answers and tips!
For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide.Learn How to Post and More I grasp you would like to replace the keyboard and would like the part number and where to purchase one. Here is a link to the HP Pavilion 17 Notebook PC HP Pavilion 15 Notebook PC Maintenance and Service Guide . Please note chapter 3, page 20, item 2 for the replacement keyboard part numbers. You stated you were having a difficulty locating where to purchase the part. Here is a link to HP Notebook PCs - Ordering HP Certified Replacement Parts for your convenience. You can also try a Google search with the part number for other vendors that may have one. To say thanks for replying please click the thumbs up icon below. If this has addressed your query please choose solution provided to help other people locate this information. Best of Luck! -
I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help
Hello Mattxy2,
Thank you for the question. It sounds like you would like to add some Apple Loops to your project. I recommend reviewing the following sections in Garageband Help:
GarageBand Help - Search for Apple Loops
http://help.apple.com/garageband/mac/10.0/#gbnd3002ab64
GarageBand Help - Add Apple Loops to your projects
http://help.apple.com/garageband/mac/10.0/#gbndc1d3db81
Thank you for using Apple Support Communities.
Best,
Sheila M. -
How to get the user created at and modified at properties for a site collection using powershell
Hi guys, I Know how to get the list of users of a site collection by Get-SPUser cmdlet but hte problem is that this cmdlet doesnt give me the user Created at and modifed at properties
can any one tell me how to get these values via powershell????
ps: ignore the 2013 screenshot.. i just want a way to get those values .. if you provide me solution in either 2010 or 2013 , i will crack the other..
plz guys help me ...Get the User Information list and then get the user from that list
$web = Get-SPWeb "siteUrl"
$userInfoList = $web.SiteUserInfoList
$userItem = $userInfoList.Items[0]; #0 here is just for demonstration. You take the user you want here or loop through all users.
$created = $userItem["Created"]
$modified = $userItem["Modified"] -
How to get the page layouts programmatically and create a page for that pagelayout
how get the page layouts programmatically and create a page for that pagelayout and add webpart
please help me with da code.Thanks
adityadugyalaHi if your page layouts alreday created then create new page programaticaaly and apply your page ayouts to that page by coding you can do something like following
PublishingWeb publishingWeb =
PublishingWeb.GetPublishingWeb(web);
PageLayout[] layouts = publishingWeb.GetAvailablePageLayouts();
PageLayout layout = layouts[0];
string pageName =
"MyPublishingPage5.aspx";
PublishingPage newPage = publishingWeb.GetPublishingPages().Add(newFolder.Folder.ServerRelativeUrl +
"/"+ pageName, layout);
newPageUrl = web.Url +"/" + newPage.Url;
newPage.Description = "This my sample publishing page";
newPage.Title = "My Publishing Page";
newPage.Update();
Please follow link
http://blogs.msdn.com/b/sowmyancs/archive/2008/03/15/create-publishing-pages-in-portal-sites-programmatically.aspx
Please mark answer , if you think answer is helpful or correct. -
Get date of first day of current week
HI!
Why does the following method do not return the date of the first day of the week in which the given date lies?
public static int getFirstDayOfWeek(int year, int month, int date) {
GregorianCalendar GregCalendar = (GregorianCalendar)
new GregorianCalendar(year, month, date).getInstance();
while(GregCalendar.get(Calendar.DAY_OF_WEEK)!= Calendar.MONDAY) {
GregCalendar.roll(Calendar.DATE, false);
return GregCalendar.get(Calendar.DATE);
What I want the method to do:
year = 2003
month = Calendar.JANUARY
date = 8
==> GregCalendar.get(Calendar.DAY_OF_WEEK) == Calendar.WEDNESDAY
==> GregCalendar.roll(Calendar.DATE, false);
==> GregCalendar.get(Calendar.DATE) == 7 (?????????)
==> GregCalendar.get(Calendar.DAY_OF_WEEK) == Calendar.TUESDAY
==> GregCalendar.roll(Calendar.DATE, false);
==> GregCalendar.get(Calendar.DATE) == 6
==> GregCalendar.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY
==> return GregCalendar.get(Calendar.DATE)
But in reality, it always returns 6 grrrrrrrr
What is wrong wirh it?
Yours RBpublic Date getCurrentMonday()
Date monday = null;
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_WEEK);
int distance = 0;
if (day == Calendar.MONDAY)
monday = rightNow.getTime();
else
distance = day - Calendar.MONDAY;
if (distance == -1)
distance = 6;
monday = (Date) (rightNow.getTime());
monday.setTime(monday.getTime() - 1000 * 60 * 60 * 24 * (distance));
return monday;
} -
How to get the MTBR value in days instead of in hours
Dear Sir,
Please help me to get the MTBR value (T-Code MCJB) in the units of days instead of in the units of hours which is coming as default unit at present.
Looking for an early reply please.
THANKS AND REGARDS,
RN SABAT.hi for this you need to change the formula in the std sap
as per sap's formula
suppose start date is 01.01
breakdown date is 10.01
downtime = 10 hrs
next break down date is 20.01
downtime is 5 hrs
mtbr =19 days X24 hrs-10/2
the above is how sap calculates
if 24 hrs is removed from the formula all the data will be in days
i hope iam right .
Edited by: Mohammed Iqbal on Apr 27, 2011 6:26 PM -
How to get the co-ordinates(X-axis and y-axis) for irregular static map
hi all,
i am trying to get the co-ordinates like latitude and longitude which are used in google map in an irrregular Static Maps,and i also want to know how can i Get perfect location Depending on Coordinates which i given using Page items.
can any help me pls
I AM USING APEX 4.1.1
thanks,
Pavan
Edited by: Pavan on May 29, 2012 7:58 AMhi VC,
Thanks for your reply,,
I Just want to Develop a static map that is not using any Google api or Google Maps,Its like Google maps but not totally a Map which resembles Google map. But i want to have an access of coordinates in an static regular Map where with the help of coordinates we can find any point on that static map's .
Thanks & Regards:
Pavan -
i bought is this new hp notebook 15 with 8.1 preinstalled but unfortunately the system crashed. i tried to recover the windows using hp recovery tool but it wont work. so i downloaded a new windows from microsoft. the main problem is that the new windows wont activate through the OEM key already present in the BIOS. i have contacted hp. they said that my new windows was a retails version and i have to get a factory shipped OS? where can i get a factory shipped OS? do i have buy a New windows?
so do i have to buy a recovery media?
I have contacted hp support and told them about the whole problem but a i have to wait for that.... so here it is
i bought this new hp notebook 15 and after two weeks the windows crashed and i didn't even created a recovery media. so i downloaded a new windows from microsoft. After that when i tried to activate the windows through OEM key it won't activate and gave some error. Then i contacted the hp support center and they suggested that the new windows i have installed is a retails version and i order to get to activate windows through OEM key i need a Factory Shipped OS. NOw i just need to know whether i have to buy a new windows? or hp can give me a FActory shipped os on demand or can i download a factory shipped operating system anoter site (other than Micosoft)? -
How to get the calendar days of last month in SAP HR Schema?
Hi all,
I have a question about the calendar days of last month, cause the customer calculated the salary not by natural month but cross-month, for example,
for calculating salary of Aug, the time period may be 7.28-8.27, so I need the days of this period which is the calendar days of last month exactly.
But I only knew GKSOLL was used for getting the calendar days of current month.
If any place wrong, please guide me.
Look forward to getting experts' help, thanks.
Regards,
May.Hi Sankarsan,
Thank you so much for your help.
The requirement I have described in detail when replying Viverk, you can take it as a reference.
Cause my customer don't want to use retro in SAP system, so I noted the schema about retro.
Now my question was how to get the last month calendar days in Schema. For example, now I am calculating the salary of July, the full attendance will be 30 days(06.28-07.27), in rule GKSOLL will get 31 days, so it's not right.
I hope you can get my point, below is the wrong rule.
Please guide me to correct it, thanks.
Regards,
May.
Maybe you are looking for
-
Why won't 'IF-Statement' Formula work for an entire column?
I am trying to make an IF formula subtract a cells value from another cells value, creating a 'balance'. The formula is working when selecting one cell for each part of the formula, but is not working when I try to use the formula for multiple cells
-
Hi I am an amateur newbie on EBS I am setting up a sandbox test environment using AMAZON AWS OVM template for EBS 12.1.3 I get the vision demo DB up running. Following the post below: http://www.oraclenerd.com/2009/12/ebs-install-part-3.html However,
-
Problem Recording Sound when Recording Video with iSight
I am trying to make a short movie using iMovie '08 (ver. 7.1.4) with my built-in iSight camera and built-in mic on my iMac (2.16 GHz Intel Core 2 Duo). I want to post this short movie in my MobileMe gallery. I am able to record and view the video (ev
-
Apple ID - 'Page can not be displayed' error.
I recently bought Apple Protection plan for my iPod, and I was registering it today when it told me to type in my Apple ID. I did so, then it came up with a 'Page can not be displayed' page. I'm really confused. I've tried several times, but it still
-
Configure the tcode SCOT and SMTP for the SPM module in the R/3
Hello, I want to know if I have to configure the tcode SCOT and SMTP for the SPM module (SAP GRC AC 5.3 SP5) in the R/3 if I want to send information toe the owner & controller. Best Regards. Pablo Mortera.