Weekdays and dates
hi all,
i have the following two requirements. Please let me know if there are any function modules for the same.
1) I have a From-Date and a To-Date. Within this interval i want to find all the nth days of week. for example for n = 2, i want the dates for all mondays within this period.
2) again for the interval (from-to date) i want the dates on the nth weekdays. for example, for n = 4 and weekday = 2, then i want dates for all 4th mondays of month within the period.
(of course this means that the period will span for more than one month for the second requirement while for the first it can span for more than one week)
regards,
PJ
Hi,
combine fm <b>WFCS_FCAL_WDAYS_GET_S</b> (get workdays)
and fm <b>DAY_IN_WEEK</b> (nr. of the day)
Andreas
Similar Messages
-
Dates that fall on weekday and weekend
Hi everyone, consider the following data i have.
WITH eff_dates AS
SELECT To_Date('1/29/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('2/1/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('2/3/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('2/4/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('2/26/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('3/1/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('3/31/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('4/1/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('4/30/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('5/3/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('5/4/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
SELECT To_Date('5/28/2010','mm/dd/yyyy') c_date FROM dual
output should be
C_DATE
1/29/2010
2/26/2010
3/31/2010
4/30/2010
5/28/2010this is how to get to this output.
i want to display all month end dates. you might already notice that 1/29 and 2/26 and 5/28 are not month end date. however, they fall on the last friday of the
month. so basically i want to display all month end dates that fall on a weekday and if they fall on a weekend, then display the date of the last friday for that
month
can somebody help write a query that produce the output above for the data given?Try this:
SQL> WITH eff_dates AS
2 (
3 SELECT To_Date('1/29/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
4 SELECT To_Date('2/1/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
5 SELECT To_Date('2/3/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
6 SELECT To_Date('2/4/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
7 SELECT To_Date('2/26/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
8 SELECT To_Date('3/1/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
9 SELECT To_Date('3/29/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
10 SELECT To_Date('3/30/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
11 SELECT To_Date('3/31/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
12 SELECT To_Date('4/1/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
13 SELECT To_Date('4/30/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
14 SELECT To_Date('5/3/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
15 SELECT To_Date('5/4/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
16 SELECT To_Date('7/30/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
17 SELECT To_Date('8/27/2010','mm/dd/yyyy') c_date FROM dual UNION ALL
18 SELECT To_Date('5/28/2010','mm/dd/yyyy') c_date FROM dual
19 )
20 select c_date,
21 to_char(c_date, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') wd_c_date,
22 ld,
23 to_char(ld, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') wd_ld
24 from (select c_date, last_day(c_date) ld from eff_dates)
25 where to_char(c_date, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') in ('MON', 'TUE', 'WED', 'THU', 'FRI')
26 and (c_date = ld or c_date = trunc(ld, 'iw') + 4);
C_DATE WD_C_DATE LD WD_LD
29/1/2010 FRI 31/1/2010 SUN
26/2/2010 FRI 28/2/2010 SUN
31/3/2010 WED 31/3/2010 WED
30/4/2010 FRI 30/4/2010 FRI
30/7/2010 FRI 31/7/2010 SAT
SQL> Except that in your sample output I think may 28 may have been a mistake, since may 31 is not on a weekend. -
DSO - What key fields and data fields in dso
Hi experts,
I need to create a dso in between the cube and 2 data sources(2lis_11_vaitm, 2lis_12_vcscl) to stage the data. My question is: what key fields and data fields to choose for the dso? is there a standard dso to copy? please explain in detail the model to set up, whether to connect both the ds's to dso and then to cube or one ds to dso and the other to the cube. more details will help.Check this for standard DSO:
http://help.sap.com/saphelp_nw04/helpdata/en/43/fcdc387f34384f94c3227baf3837a8/content.htm
Thanks...
Shambhu -
Reading MS Project column names and data on the fly from a selected View
Hi guys,
I have several views on my project file (MSPROJECT 2010) and I want to build a macro so that;
1. User can select any view ( Views can have diffrent columns and the user may add new columns as well)
2. User runs the Macro and all the coulmns along with the tasks displayed in the view will be written to a excel file. ( I don't want to build several macro's for each view, I'm thinking of a common method which would work for any selected view)
The problem I'm facing is that how will i read the column names and data for a particular view on the fly without hard coding them inside the vba code ?
The solution needs to work on a master schedule as well.
Appreciate your feedback.Just to get you started the following code writes the field name and data for the active task to the Immediate window.
Sub CopyData()
Dim fld As TableField
For Each fld In ActiveProject.TaskTables(ActiveProject.CurrentTable).TableFields
If fld.Field >= 0 Then
Debug.Print Application.FieldConstantToFieldName(fld.Field), ActiveCell.Task.GetField(fld.Field)
End If
Next fld
End Sub
Rod Gill
Author of the one and only Project VBA Book
www.project-systems.co.nz -
Pdf portfolio source file name and date in file details
Is it possible to import the source file name and extension as well as the source file created date in the portfolio file details? Need to document source to portfolio in working with 3rd parties that will only have the original source. Need to document what was converted into pdf as not all files in a directory will successfully convert to pdf. Sometimes need to convert 100's of files. Manual entry is inefficient. the file names and modified dates are displayed on the Combine Files dialog. is there a way to capture the detail on that page?
I don't need the detail of when the pdf was added to the portfolio. I
need know which dwg or jpg or word file was converted and the original
created date of that file for control of information.
That is impossible; sorry. For some *very specific* types of conversion to PDF the pdfx:SourceModified XMP tag will be set to show the last-modification date of the source file (for example DOCX files converted using MS Word), but there will never be a human-readable record of the source filename or its creation date unless you have manually added them as document XMP properties after conversion (this is what the "Custom Properties" dialog is for). To embed source data automatically would raise no end of privacy and security problems for customers, who most certainly do NOT want their recipients seeing details of internal documents.
Without writing a plugin there's no access to the internal workflow of the Combine Files dialog, so you cannot use a script to read the names and dates of the files *before* conversion and store them automatically in the new PDF Portfolio's Fields array. -
I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.
Hello. Most of the engineers in developer exchange are more familiar
with NI products. Contacting ICS for technical support is a better
course of action. -
How can we get Dynamic columns and data with RTF Templates in BI Publisher
How can we get Dynamic columns and data with RTf Templates.
My requirement is :
create table xxinv_item_pei_taginfo(item_id number,
Organization_id number,
item varchar2(4000),
record_type varchar2(4000),
record_value CLOB,
State varchar2(4000));
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
select * from xxinv_item_pei_taginfo;
Item id Org Id Item Record_type Record_value State
493991 224 1265-D30 USES fever TX
493991 224 1265-D30 HOW TO USE one tablet daily TX
493991 224 1265-D30 SIDE EFFECTS XYZ TX
493991 224 1265-D30 DRUG INTERACTION ABC TX
493991 224 1265-D30 OVERDOSE Go and see doctor TX
493991 224 1265-D30 NOTES Take after meal TX
Above is my data
I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
its a BI Publisher report.
please suggestif you have data in db then you can create xml with needed structure
and so you can create bip report
do you have errors or .... ? -
Diff B/w ABAP Dictionary and Data Dictionary
What is the difference between ABAP Dictionary and Data Dictionary........
Hi,
Both are the same.
Please check this online document perhaps it may help.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBDIC/BCDWBDIC.pdf
Regards,
Ferry Lianto -
After upgrading my ATT iPhone 4 to iOS5, I thought I would try out iCloud. I read somewhere, that it only syncs when it is connected to a powersource, and maybe I read that wrong, but I interpret it to mean when I am connected to either a power outlet or my computer using the cable. In otherwords, it wouldn't sync while I was out and about, away from my wireless home network, using the 3G network.
Is this not correct?
Because 2 days ago I racked up 80 MB of my data plan (not iCloud storage) while I slept at home, where I have a wireless network. I found this out by getting a text warning from ATT the next day, that I was close to using up my alloted 200MB data usage. I checked out my account online, and sure enough the 80MB transferred in the middle of the night. I didn't notice the "documents and data" setting was turned on so it looks like my apps updated while my phone was in sleep mode. Is there anything else it could be? I have everything iCloud turned off now and wondering if there is something I should know about to avoid wasting my data usage?elko wrote:
After upgrading my ATT iPhone 4 to iOS5, I thought I would try out iCloud. I read somewhere, that it only syncs when it is connected to a powersource, and maybe I read that wrong, but I interpret it to mean when I am connected to either a power outlet or my computer using the cable. In otherwords, it wouldn't sync while I was out and about, away from my wireless home network, using the 3G network.
Is this not correct?
Because 2 days ago I racked up 80 MB of my data plan (not iCloud storage) while I slept at home, where I have a wireless network. I found this out by getting a text warning from ATT the next day, that I was close to using up my alloted 200MB data usage. I checked out my account online, and sure enough the 80MB transferred in the middle of the night. I didn't notice the "documents and data" setting was turned on so it looks like my apps updated while my phone was in sleep mode. Is there anything else it could be? I have everything iCloud turned off now and wondering if there is something I should know about to avoid wasting my data usage?
I think possibly you are thinking about wireless sync of iTunes. That can be set to happen when you connect to a charger etc, but that is not the same thing as you are descrbing with iCloud. -
Loading MS Access Table and Data into Oracle
Hi,
I have few tables in MS Access. I want to create same layout of tables in Oracle and want to populate data from MS Access tables to Oracle tables.
Please let me know if there is a way by which I can create tables and load data automatically (thru some option or script)?
I have Oracle 10g database and its clients.
Thanks in advance,
Rajeev.You can use Oracle migration workbench
Loading MS Access Table and Data into Oracle
It´s very easy to use and good to import
regards,
Felipe -
Question regarding roaming and data usage
I am currently out of my main country of service, and as such I have a question regarding roaming and data usage.
I am told that the airplane mode is sufficient from keeping the phone off from roaming, but does this apply to any background data usage for applications and such?
If the phone is in airplane mode, are all use of the phone including wifi and application use through the wifi outside of all extra charges from roaming?Ann154 wrote:
If you are getting charged to use the wifi, then it is possible. Otherwise no
Just to elaborate here, Ann154 is referring to access charges for wifi, which is nothing to do with Verizon, so if you are using it in a plane, hotel, an internet cafe etc that charges for Wifi rather than being free . Verizon does not charge you (or indeed know about!) wifi usage, or any other usage that is not on their cellular network (such as using a foreign SIM for example in global phones) So these charges, if any, will not show up on the verizon bill app. Having it in airplane mode prevents all cellular data traffic so you should be fine -
Infoset Join condition on Key feilds and data fields
Hi Guys,
I have a requirement to biuld the Info set with join conditon on two DSO's the info objects which i am using in the JOin condition are defined as data fieds in one DSO and defined as key fields in another DSO, is it possible to define join condition on key fields and data fields.
The two info objects are
0AC_DOC_NO
0ITEM_NUM
These two info objects are defined as data fields in DSO : 0LIV_DS1 Invocie verificaion
key fields in DSO: 0FIAP_0o3 FI AP Line Item
Please suggest me is it possible to define join the condtion on the data fields and key feilds.
Thanks
Best regards
SGHi
yes you can create join, you will get any issue in reporting level.
example: Say i want to create Info Set on 0MATERIAL and Sales DSO.
In 0MATERIAL Info Object it is key filed, but in my DSO 0MATERIAL is data field.Still we can create
Creation of join is dependent on fields common in your source objects.
check out the below document
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2f5aa43f-0c01-0010-a990-9641d3d4eef7?QuickLink=index&overridelayout=true
Regards,
Venkatesh
Edited by: Venkateswarlu Nandimandalam on Sep 27, 2011 2:26 AM -
Key fields and data fields in a DSO ??
i have a question regarding key fields and data fields in a Standard DSO...
i am using 2 datasources to build a open sales report 2LIS_11_VASTH and 2LIS_11_VASTI i am pulling in data from these 2 data sources to a DSO and i am wondering what infoobjects should be in the key fields and data fields .....does this reflect back to table VBUK and VBUP tables and does the key field in the DSO have to be the key fields in VBUK and VBUP tables ???? or what really should be included as key fields and data fields ????
please help....If you look at the various SD tables, VBELN and POSNR are commonly used as the document number and document line item.
For VBAP and VBUP, it's referring to the Sales Order Line Item with the columns VBELN and POSNR as the key for both tables. However, if you look at the LIPS table, which is the Delivery Line Item table, it too has VBELN and POSNR as the key. Likewise, the VTTP table, which is the Shipment Line Item table, also has VBELN and POSNR as the key.
While using RSOSFIELDMAP as a map is a fairly good "rule of thumb", it still needs to be used with a level of skepticism. -
Prerequsites for deciding Key fields and data fields
Hi
I would like to know the criteria to decide upon KEY fields and Data fields for an infoprovider.Hi,
What is a Key field in a Database and How should I choose one?
Keys are crucial to a table structure for many reasons, some of which are identified below:
They ensure that each record in a table is precisely identified.
They help establish and enforce various types of integrity.
They serve to establish table relationships.
Datafields may be Charecteristics and it may be keyfigures
Regards,
Marasa. -
Key Fields and Data Fields in ODS
Hi Guru's ,
Can u Explain what are Key Field's and Data Field's in ODS,and How they work.
Thanx in Advance.Hi Pradeep,
An ODS key fields forms a unique combination of chars according to which data in the ODS will be summed up. Data fields are additional fields, chars or key figures.
For example, you have the following key fields:
Doc No, Doc line item (item no in the doc) and you load the following data:
Doc# Item# Amount CALDAY
1234 1 100 26.09.2005
1234 1 150 27.09.2005
1234 2 300 27.09.2005
1235 1 400 27.09.2005
The first two rows with the same key fields (1234-1) will be aggregated and into ODS will go amount of 250.
What I said is true if for Amount key figure the Add option is set.
But if you set an Overwrite option, then the second record will overwrite the first one and only amount of 150 will go to ODS!
But if CALDAY is also a key field, then into ODS will go all records without any aggregation, because key fields combination is different for all records.
So, ODS key fields choice and KFs settings are very important for data aggregation in the ODS.
Best regards,
Eugene
Maybe you are looking for
-
Email link to a pdf with text anchor on web site
I'm trying to create an email with a link to a web site's pdf file with a text anchor. I want the link to take the reader not just to the pdf file but to a certain location in the pdf file. I'm creating the pdf with the text anchor in Indesign 4. It'
-
We each have an iPhone and separate Apple ids. When we bought our iMac we were advised to set up two user accounts to keep ids separate. Now we can only have one id associated with the Mac in any 90 days. What is the point of having separate accou
-
HP LaserJet P3015 Creating its own copy in Control Panel
Hi Everyone, I am new here.I've a HP LaserJet P3015 printer which is connected with my laptop via USB cable. Whenever i connect the cable to another port of the laptop it creates the copy of the printer naming with (Copy 1). Cna anyone help me immedi
-
How to add a full column to a chart
How can I add a full column of data in a table to the y axis in a line graph in Numbers?
-
Hello All, I want to use Data Pump import in ORACLE 10g, to transfer data from database A to database B, i am using the TABLE_EXISTS_ACTION=APPEND below is a description of my need, I have table X on database A that contains records 1, 2, 3, 4 and th