FM to find the first & last date of month when we enter period and year
Hi Gurus,
I required an urgent need.
I want a function module which gives me first and the last date of the month when I enter the period and the year.
Reply me as soon as possible.
Regards,
Sagar
Try this coding... enter 02/2007 into the selection screen field and execute
report zrich_0001 .
data: start_date type sy-datum,
end_date type sy-datum.
parameters: p_spbup type spbup.
start-of-selection.
start_date = p_spbup.
start_date+6(2) = '01'.
call function 'LAST_DAY_OF_MONTHS'
exporting
day_in = start_date
importing
last_day_of_month = end_date.
write:/ start_date, end_date.
Regards,
Rich Heilman
Similar Messages
-
Hello Everyone ,
Does anyone knows any function module or way to find the first and last date of any month ?
Thanks,
Deepak.Hi,
Try the following
DATA: l_first_date LIKE SY-DATUM,
l_last_date LIKE SY-DATUM.
PARAMETER l_Date LIKE SY-DATUM DEFAULT SY-DATUM.
First day of month
CONCATENATE l_date(6) '01' INTo l_first_date.
call function 'HR_HCP_GET_LAST_DAY_OF_MONTH'
exporting
im_date = l_date
IMPORTING
EX_LAST_DAY_OF_MONTH = l_last_date.
WRITE:/ l_first_date.
WRITE:/ l_last_date. -
Get first and last date of month
Hi,
Is there any function module to get first and last date of month for a entered date.
Please let me know.
Regards,
SPHi,
Use the below FM to find the Last day of month and them u can easily calculate the first day.
DATA : v_startdate TYPE sy-datum.
DATA : v_enddate TYPE sy-datum.
DATA : v_temp TYPE dats.
v_temp = sy-datum.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = v_temp
IMPORTING
last_day_of_month = v_enddate
CONCATENATE v_enddate+0(6) '01' INTO v_startdate.
Hope it helps.
Regards,
Arnab. -
Looking for a query to find first/last dates in overlapping dates...
Hi,
I'm looking for a query to find the first dates and last dates in a table conaining overlapping dates.
I have a subscription table which has for each Customer start and end date for different subscriptions.
I want to know the different ranges of date where there is subscriptions active.
so if the table has this:
CustID, Start date, end date
1, 2008-01-01, 2012-06-06
1 ,2009-01-01, 2011-01-01
1, 2011-01-01, 2013-02-02
1, 2013-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
I want to produce this result:
custid, range start, range end
1, 2008-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
the first row is the range identified from the 4 rows in my subscription table.
thanks :)I think I found it...
http://stackoverflow.com/questions/5213484/eliminate-and-reduce-overlapping-date-ranges
let me try this method
Hi,
m writing to follow up with you on this post. Thanks for you posting a reply to share your workground. Was the problem resolved after performing the above link? If you are satisfied with the above solution, I’d like to mark this issue as "Answered".
Please also feel free to unmark the issue, with any new findings or concerns you may have.
Thanks,
Sofiya Li
If you have any feedback on our support, please click here.
Sofiya Li
TechNet Community Support -
i have purchased 100 songs in last 2 years on itunes now i am able to find the first 50 songs, i am using the origial id in all my devices.i even got the invoice of my purshace where can find them all?
ITS NOT EVEN SHOWING UP IN PURCHASED SECTION1. iTunes won't offer cloud downloads for songs that it "thinks" are in your library, even if it "knows" the files are missing. If you've exhaustively searched for the missing files and there is no prospect of repair by restoring to them to their original locations, or connecting to new ones, then delete that tracks that display both the missing exclamation mark and are of media kind Purchased/Protected AAC audio file. Don't hide from iTunes in the cloud when asked, close iTunes, then reopen. You can download from the cloud links or iTunes Store > Quicklinks > Purchased > Music > Not on this computer > All songs > Download all.
2. Why? Not sure, perhaps 3rd party tools or accidental key presses combined with previously hidden warning messages when trying to organize the library. There is a hint that using the feature to downsample media as it is synced to a device may also be involved, though I've not replicated it. Whatever the reason a backup would protect your media.
tt2 -
How would I find the first date a shipment occurred for a specific material
We need to determine when an item is new and set the u201Cnew item indicatoru201D to True. Once a material is considered new, the u201Cnew item indicatoru201D should remain true for a period of three years. Each week, a process needs to run that looks at the material master data (First Arrival Date) and compares that with the current date to check if three years has passed. If three years has passed, then the u201Cnew item indicatoru201D should be set to False. Initially, all items need to go through this process to set the new item indicator.
Hi,
You could setup a DSO keyed by material in which you have a date key figure that is set to MIN aggregation in the transformation. If you load that DSO from your shipments, it will automatically keep the date of the first shipment.
You could then run a periodic load that could be picking up all the materials whose date in the DSO is older than 3 years and which are still marked as NEW_ITEM. In that load you then update the NEW_ITEM status.
Cheers
Henry -
Hi,
I'm just attempting to setup an iSCSI target on a freshly installed Windows 2012r2 box, but I get the following error when attempting to Create and iSCSI virtual disk via the wizard after a successful
installation of the iSCSI target role.
The full error is:
Cannot find the Windows PowerShell data file 'ImportExportIscsiTargetConfiguration.psd1' in directory 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\IscsiTarget\en-GB\', or in any parent culture.
I tried to uninstall, then reinstall the role but no go.
The Server Locale and UI was all updated to en-GB but this folder does not appear to exist in this location. Rather, the folder I can see is:
'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\IscsiTarget\en-US\'
I'm going to attempt to copy the 'en-US' folder to 'en-GB' to see what happens, but I would like to know why this has occurred in the first place? Other roles have installed (such as AD DS AD CS and
IIS) on other machines with no issue.
Many thanks
Chris
ChrisHi Chris,
The error "Cannot find the Windows PowerShell data file 'ImportExportIscsiTargetConfiguration.psd1'" occured, because the file 'ImportExportIscsiTargetConfiguration.psd1' can't be loaded under the folder en-GB with current culture.
I recommend you can copy this .psd1 file under 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\IscsiTarget'. Essentially if PowerShell can’t find the specified data file for the current culture it will “fallback” to the top-level data
file in this case.
For more detailed information, please refer to this article:
Windows PowerShell 2.0 String Localization
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
How to find last date of month
Dear All,
Can anybody tell me how to find last date of month I need it to check some validations
helpful answer will definatly rewarded
Regards
ShashikantHi,
RP_LAST_DAY_OF_MONTHS Determine last day of month
HR-D: Payroll Germany code
RP_LAST_DAY_OF_MONTHS
HR-D: Determine last day of month
DATE_CONVERT_TO_FACTORYDATE
Returns factory calendar date for a date Calculates and returns factory calendar date for a date (if CorrectOption = '+');
Checks if the date is work day (if CorrectOption = '-').
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND. -
How to find the value of date char used as exception aggregation reference
Hi BI Gurus,
On a BEx report I need to list three things by material:
1) the open (not yet delivered) Purchase Order quantities
2) the PO quantity to be delivered next and
3) the date that belongs to the next delivery
The model supports these data i.e. for each material I can list all open quantities by Purchase Order / Item / Schedule line and the scheduled delivery dates are also available as a characteristic.
Determining 1) is easy as the drilldown is fixed (materials only) the open quantities get summarized for all PO-s belonging to the materials.
To determine 2) I used a Calculated KF simply including KF 1) =Open PO Qty in the definition and setting Exception Aggregation (first value) with a reference char of the delivery date. This gives back the Open PO Quantity to be delivered first.
My question is about how to determine the 3rd value (actually this is not a KPI but a characteristic value). In other words, for each materials I would need to determine the first among all of the possible delivery date char values of the open PO Items / schedule lines. This is the date the quantity shown in the 2nd KPI will be delivered on.
Does anybody have an idea how to approach this issue?
Thanks for you help in advance,
AttilaHi Olivier,
Thanks for your suggestion. I got a bit closer with the replacement path formula variable and the CKF. I tried to apply the same logic of KPI 2) but for some reason it did not work. Actually, it delivers the right value but only when 0SCL_DELDAT (Scheduled delivery date) is in the drilldown But what I need is the first delivery date by Material only, and without this 0SCL_DELDAT drilldown.
Any other ideas?
Thanks and bye,
Attila -
HOW TO FIND THE REQUIRED DELIVERY DATE IN VA02
hi
HOW TO FIND THE REQUIRED DELIVERY DATE IN VA02.
i want to display this field in my report. what is the fieldname and in which table it is ?Hi Jyothsna,
There are 2 dates when you say Requested Delivery Date
1. Header level in VBAK-VDATU is the field
2. At item level it is in the schedule line. VBEP-EDATU.
The relationship between item (VBAP ) and schedule line ( VBEP )is 1 to many. But there will be mutiple schedule lines only if you are using the scheduling functionality. Also note to check for confirmed quantity (VBEP-BMENG) to be greater than 0 and use that schedule lines EDATU date as Requested delivery date.
regards,
Advait Gode. -
How to get the date for the first monday of each month
Dear Members,
How to get the date for the first monday of each month.
I have written the following code
SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
But it look bith complex.
Abhishek
Edited by: 9999999 on Mar 8, 2013 4:30 AMUse IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
select sysdate current_date,
trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
from dual
CURRENT_D FIRST_MON
08-MAR-13 04-MAR-13
SQL> Below is list of first monday of the month for this year:
with t as(
select add_months(date '2013-1-1',level-1) dt
from dual
connect by level <= 12
select dt first_of_the_month,
trunc(dt + 6,'iw') first_monday_the_month
from t
FIRST_OF_ FIRST_MON
01-JAN-13 07-JAN-13
01-FEB-13 04-FEB-13
01-MAR-13 04-MAR-13
01-APR-13 01-APR-13
01-MAY-13 06-MAY-13
01-JUN-13 03-JUN-13
01-JUL-13 01-JUL-13
01-AUG-13 05-AUG-13
01-SEP-13 02-SEP-13
01-OCT-13 07-OCT-13
01-NOV-13 04-NOV-13
FIRST_OF_ FIRST_MON
01-DEC-13 02-DEC-13
12 rows selected.
SQL> SY. -
Find the first occurance of a word
I have a script which finds and counts ALL occurances of a word.
I need the script to find the FIRST instance of a word only.
Can any one please advise how to modify the script to find the first instance of the word?
Script as follows:
var numWords = this.getPageNumWords(0);
for (var i=0; i<numWords; i++)
var ckWord = this.getPageNthWord(0,i);
if ( ckWord == "MATERIAL")
/*Script will go here based on finding the first instance of the word "MATERIAL"*/
I have tried var CKWord = this.getPageNthWord(0,0); but console reports back is UNDEFINED?Thanks for your help. Script now returns the first occurance of the word "MATERIAL".
I know have to add to the script to find the SECOND OCCURANCE of the word "ISSUED".
Can you please advise how I would code the script for this, ie would this have something to do with the break command?
var numWords = this.getPageNumWords(0);
for (var i=0; i<numWords; i++)
var ckWord = this.getPageNthWord(0,i);
if ( ckWord == "ISSUED")
var coord = this.mouseX;
var annot = this.addAnnot({
page: 0,
type: "Stamp",
name: "AppStamp",
rect: [coord+1000, 2300, 30, 2820],
rotate: 90,
AP: "#C94cHAFFa42U1gTH5Tug5C" });
/*break; how can this be modified to break for the second occurance of the word "ISSUED"?*/ -
Query to find the second maximum date in a table
please give me the query to find the second maximum date in a table
You can try with this
SELECT empno
,hiredate
FROM emp a
WHERE 2 = (SELECT COUNT(DISTINCT hiredate)
FROM emp b
WHERE b.hiredate >= a.hiredate
OR
SELECT empno
,hiredate
FROM (SELECT ROWNUM row_num
,empno
,hiredate
FROM emp a
ORDER BY hiredate ASC
WHERE row_num = 2;Regards
Arun -
What is the formula to bring the current last date from period hierarchy
Hi,
Iam working on Hyperion financial Reporting.i have created a grid with 2 dimensions(entity and period).My requirement is that the current last date of the period hierarchy should be displayed automatically in the header when the report is run.what formula should i write in the textbox to bring the current last date.Moreover i dont want to create a prompt for the period dimension.
Kindly help me on this.
thanks in advance.Thanks for all your replies..
My actual requirement is that I have a period dimension with year,month and week as members.I dont want to set period as a UserPOV or a prompt.but i want the last date of current week of the period diemnsion to get automatically displayed in the text box which is placed on the header when the report is run.Period dimension is not used anywhere else in the report.I've tried using another grid for the period and i've hidden it.but what formula should I use to to display the last date of the week on the header.I tried using the function Bottomofhierarchy but it wasn't helpful..
Please help me on this. -
How to find the First block....in a multi block form
hi
How i can find which is the first block in a multi block form....
( there are n number of forms with multi blocks...so
i need to generalise the code to find the first block in all of
the forms)
regards
KrisIf you searched in the on-line help for "First", you would find that the Get_Form_Property built-in provides two: First_Block and First_Navigation_Block.
Maybe you are looking for
-
SSO between ITS 620 R/3 and EP
Hi, I need to use ITS 620 for R/3 4.7 and EP 6.0 for ess/mss implementation I have to configure SSO between R/3 and EP. Do I also need to configure SSO between ITS and R/3 , ITS and EP also for this? If yes can any one tell me the steps in configurin
-
How do I set background color of cell using JTable?
Hello all! I have a question on the use of JTables. I am using a JDialog consisting of a JTable and a number of buttons to insert and to select OK or cancel. Everything is working perfectly, but I now must add editing capabilities to prevent invalid
-
"This game cannot be played" message??
I have a 5th Gen ipod and I bought 2 games about 6-10 moths ago. I went to play one yesterday and the ipod gave me the message "this game cannot be played" and tells me to connect the ipod to itunes and reinstall the games. How do you reinstall the g
-
I have AppleTV directly connected to my Sony SRX TV. AppleTV states it supports 1080p, but the highest resolution option I have in AppleTV seetings is 720. The AppleTV is directly connected to the TV with a HDMI cable.
-
i have 320 x 240 videos that i want to edit in final cut express HD. in my old FCP i could just create a setup for this frame size, but in HD i just cannot see how to get my project and sequence to be the right size. i thought maybe i could capture s