Determining last date if period and year are given
hi,
what is the code if the period and year are given and to print the last date of that particular period and
year.
suppos period is perio = '2006002'
Data sdate type sy-datum.
Data edate type sy-datum.
mm = perio+5(2).
yy = perio+0(4).
concatenate yy mm '01' into sdate.
call function 'SG_PS_GET_LAST_DAY_OF_MONTH'
exporting
day_in = sdate
importing
last_day_of_month = edate.
edate is your lst day of that period month.
\[removed by moderator\]
Regards
Rajesh
Edited by: Jan Stallkamp on Jul 21, 2008 2:35 PM
Similar Messages
-
I want to keep date special month and year.
I want to keep date special month and year.
Example in sqlplus
insert into area(input_time) values(to_date('MAR-04','MON-YY'));
and select
select input_time from area;
the result
01 MAR 2004
in Oracle
01-MAR-2004 12:00:00 AM
I don't keep day, but I want to keep month and year.
Can you do?
Thanks.An Oracle date column must contain a date down to the second. If you don't specify a day or a time, it will default to the first of the month and midnight.
If you want a column to only contain values at the beginning of a particular month, you can create a CHECK constraint that verifies that
input_time = trunc( input_time, 'MM' )Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Accumulated values from rpsco up to specific period and year
I am develping report with parameters: period and year.
Then my programs need to accumulate values in table rpsco from the period 01 year 1800 and up to period and year in my selection.
Any suggestions?Hi Prasad,
This would be happening if you have put the user entry variable in the global filter of your query.
As a result the complete data set is restrcted to get the data only for one month.
Please use the variable for user entry month in a selection and not globally.
-Vikram -
TVARV - Dynamic Period and Year
Hi,
A standard FI report is executed weekly in batch job. The selection screen for the report has the following fields: Period and Year. We need the following:
1) A report variant that takes the current period and current year
2) A report variant that takes the previous period and current year
I know that it is possible to have dynamic dates (Current / date calculations), but is it possible with period and year as well ina variant?
What do the variables in TVARV table "SAP_SCMA_PERIOD" and "SAP_SCMA_FISC_YEAR" do?
Since this is a standard report, what could be the solution?
Awaiting response.Hi Anuritha,
Did you able to solve this problem. Basically I am also in the same situation, so it would be great help if you suggest me what needs to be done exactely !
How did you manage the variants SAP_SCMA_FISC_YEAR & SAP_SCMA_PERIOD in TVARV table to work accordengly.
Looking forward for your reply.
--Thanks
Pankaj -
Difference between data selection period and personal seletion period
Hi
Experts ,
ples Expline ,
Difference between data selection period and personal seletion period. to Data screening .Data selection period means
For example if u given any period,
here we are checking whether data is valid in this period.
Personal selection period means
we are checking whether person is valid in a given period.
Example is:
For example if the employee resigned in a company on 15th of month.
He can get the salary only at the end of month it means his data is avilable upto end of month.
But when you consider his status from 16th to end of month
the person is not available.
So when u given date(16th to end of month) in data selection period is showing that person data is avilable.
But when mention that date in person selection period it is showing no person is avilable.
if useful
reward with points............ -
How to find last date of the current year
Hi
Please tell me is there any function module to find out the last date of the current year.Hi,
You can do that very simply like so.
code
report zrich_0001.
data: first type sy-datum.
data: last type sy-datum.
first = sy-datum.
first+4(4) = '0101'.
last = sy-datum.
last+4(4) = '1231'.
write:/ first, last.
[/code]
OR use function modules
1.use this function module HR_GB_TAX_YEAR_DATES
Pass these values
P08_TXYEAR = Year
P08_PAYROLL_AREA = '01'
2.use FM......... FIRST_AND_LAST_DAY_IN_YEAR_GET
DATA: first LIKE sy-datum,
last LIKE sy-datum.
CALL FUNCTION 'FIRST_AND_LAST_DAY_IN_YEAR_GET'
EXPORTING
i_gjahr = '2007'
i_periv = '24'
IMPORTING
e_first_day = first
e_last_day = last.
WRITE: / 'First Date', first, ' Last Date', last.
Regards,
Raj. -
The data types varchar and varchar are incompatible in the subtract operator
Hi ;
I want to fetch values 6,903,00 format ,my query is ;
SELECT CONVERT(varchar(50), CONVERT(money,SUM(DEBIT)),1) AS DEBIT ,CONVERT(varchar(50), CONVERT(money,SUM(CREDIT)),1),AS
CREDIT CONVERT(varchar(50), CONVERT(money,SUM(DEBIT)),1) - CONVERT(varchar(50), CONVERT(money,SUM(CREDIT)),1) AS BALANCE
FROM TABLE
it was get error : The data types varchar and varchar are incompatible in the subtract operator.
I want to Show result ;
DEBIT - CREDIT - BALANCE
6,903,00 4,387.24 2,515.76
Thanks in advanceYou have to do the subtraction with the MONEY data type (prior to covert-ing).
Starting with SQL Server 2012, you can use the FORMAT command:
https://msdn.microsoft.com/en-us/library/hh213505.aspx
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014
We have to use SQL 2005 due to licensing issue . -
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,
SagarTry 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 -
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. -
Process order dates in ECC and APO are not matching.
Hi
We are sending Planning order to ECC there we convert to process order.I see there is diffrent start and end dates in APO and ECC.
But I see in CCR report I get error message material ABC has a different receipt date in SAP APO and SAP R/3.
I am not able to reconcile there.Message says
you should deactivate the receipt date comparison. Alternatively, you can activate the order end date comparison if the primary product is assigned to the final operation.
I am not sure how to do this.Can anyone guide how to do the same.Also what is the root cause of issue.Why I am getting this message.
Regards
RIn APO, if the receipt date of the primary product deviates from the end date of the last activity of the order (for example, due to an offset or scheduling at the end of a fixed block), the receipt date always identifies this as inconsistent.
You cannot rectify inconsistencies of this type by using the reconcile provided in the CIF compare/reconcile function.
In this case, you should deactivate the receipt date comparison. Alternatively, you can activate the order end date comparison if the primary product is assigned to the final operation.
You can use the business add-in /SAPAPO/CIF_DELTA3 Enhancements Comparison Report to deactivate individual comparisons.
Check for the Note 645597 in which you can find example coding with which you can activate the order end date comparison.
Also check notes 815509
Thanks,
nandha -
Dear All,
I have date column.I have to display Month name and Year.
E.g
NOV 2011
DEC 2011
How will get this could you pls send me Syntex
ThanksHi Govind,
There are many ways to do,
1. you can use evaluate function to do that.
2. simple and better way is to overide the date formate of thet coloumn with the custom and then type MMM YYYY
Hope this helps you... -
Aggregated data for quatrter and year
Hi,
I have created a input schedule by using any by any template, I have account on row and time dimension on column, I input some test data for each month for some accounts, it work ok and I send the data successfully.
I create another report using Evdre with the row and column structure, I set both member set as "SELF AND DEP", however, when I run the report, I notice that the Quarter data and the year data is not correct, For example, Q1 data should the summary of Jan,FEB and MAR, instead it show the same data as MAR, while the year data show the same data as Q4.
Anybody know hot to fix this?
ThanksI did another test as following:
I copy a appshell from SAP standard AppShell, I generated some test data for each month using input schedule, then I build a evdre report, it work perfect,if i choose PERIODIC, I get the quarter and year data summary the month or quarter, if I choose YTD, I get the year to date data,
then I copy the my master data to replace the orginal master data, I generated some test data, this time the report only show the YTD data no mater I choose PERIODC OR YTD for measure in CV. This is verystrange. -
I had a problem with tab groups - if I mistakenly close tab groups, I can only recover the last 10 tabs.
I had a window with many more than 10 tabs which I reopened each session by going to History > Recently Closed Windows. I knew this was risky - I could lose this if I did not keep it in an open window or recently closed window. So I was looking for a way to save this window with all the tabs. I looked into tab groups and, not knowing what I was doing, I closed the groups of tabs. There seems to be no recovery for other than the last 10 tabs. And open tabs are not necessarily in recent history if I have not accessed the tab and refreshed.I don't use tab groups myself, but I know of a way to increase the number of closed tabs that Firefox remembers. Unfortunately, it's not retroactive...
(1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
(2) In the search box above the list, type or paste '''sess''' and pause while the list is filtered
(3) Double-click the following preferences and enter the preferred new value:
(A) '''browser.sessionstore.max_tabs_undo''' (default: 10)
(B) '''browser.sessionstore.max_windows_undo''' (default: 3)
Regarding what is in history, by default, Firefox will load tabs on demand when you restore a session, rather than loading every single tab immediately. If you turned off that setting, or if you visited all the tabs, then those pages should be in history, but finding them amidst all the others would be quite a challenge... -
How do I sort a bunch of date by week number and year? I have a bunch of date in the format IW-YYYY such as
45-2010
46-2010
47-2010
48-2010
49-2010
50-2010
51-2010
52-2010
01-2011
02-2011
If I sort by week, I get the following which is not what I want. I want the above.
01-2011
02-2011
45-2010
46-2010
47-2010
48-2010
49-2010
50-2010
51-2010
52-2010
Thanks,
SMdo you happen to have the underlying dates as well as the iw-yyyy format? If so, then it's just a matter of:
order by trunc(actual_date_col, 'iw')If not, then you're going to have to do:
order by to_number(substr(date_in_iw_format_col, 4)), to_number(substr(date_in_iw_format_col, 1, 2))eg:
with sample_data as (select '45-2010' date_in_iw_format_col from dual union all
select '46-2010' date_in_iw_format_col from dual union all
select '47-2010' date_in_iw_format_col from dual union all
select '48-2010' date_in_iw_format_col from dual union all
select '49-2010' date_in_iw_format_col from dual union all
select '50-2010' date_in_iw_format_col from dual union all
select '51-2010' date_in_iw_format_col from dual union all
select '52-2010' date_in_iw_format_col from dual union all
select '01-2011' date_in_iw_format_col from dual union all
select '02-2011' date_in_iw_format_col from dual)
select *
from sample_data
order by to_number(substr(date_in_iw_format_col, 4)),
to_number(substr(date_in_iw_format_col, 1, 2));
DATE_IN_IW_FORMAT_COL
45-2010
46-2010
47-2010
48-2010
49-2010
50-2010
51-2010
52-2010
01-2011
02-2011 -
How do I verify that the Citadel data tables Trace and Points are being updated?
I am using MSQuery to look at the data in my Citadel database, but it appears there is no data in the database. There are transactions in the A/E viewer. I am totally new to lookout and citidel. TIA.
Hi Jeff,
Here are some old articles on accessing Citadel 4 data from MSQuery and MSAccess. These should at least give you a starting point:
http://zone.ni.com/devzone/conceptd.nsf/webmain/85CECF0AEEC5B1B28625680800733CC6
http://zone.ni.com/devzone/conceptd.nsf/webmain/0A3D4EEAC9208065862568080072DB9F
Also, do you have NI-MAX? You can check for data in there too.
Hope this helps,
Khalid
Maybe you are looking for
-
Hi all, I have created a smartform for printing the shipping labels depending upon the delivary number. For each delivary number it creates several spool based on the label. Now the requirement is that we want all the labels(spool) under one spool r
-
When trying to start itunes a screen pops up saying error new itunes libarary and only allows mw to click okay. Just wondering what I need to do? Thanks!
-
Im fairly new to RSS and I've just recently set up a few RSS feeds in Apple Mail...but I'm a little confused though. I thought you could actually read the article right within the Mail application. However, Mail only gives the headings and a link to
-
Provide some suggestion about items max volumn
Hi experts I would like to know the max items number for B1. My customer have about 20,000 items, and every item have about 35 WH. Is this volumn OK for B1? could you provide some suggestion about items max volumn? Glen
-
Java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
Hi, I am using Jdeveloper 11.1.1.5. When we are trying to create a new row in the table through EO, we have overrided the default Create method in EOImpl. protected void create(AttributeList attributeList) { DBTransaction trans = getDBTransaction();