FM for First day of the Fiscal Year.
Hi ,
i want to calculate First day of the Fiscal Year ,please send me the FM name urgently.
Thanks in advance
hi,
BAPI_CCODE_GET_LASTDAY_FYEAR
this will give you back the last day of a fiscal year for a company code, but if you start with previous year, than you add 1 to the result, than you get first day of current fiscal year.
FIRST_AND_LAST_DAY_IN_YEAR_GET
this will give you back the first and the last dates of a given year, but you'll need the period version as well.
hope this helps
ec
Similar Messages
-
BI Content Variable on 0Calday for first day of the fiscal year and first day of the current month
Hi Friends,
In one of my BEx queries, I need to restrict a key figure for 0Calday based on the first day of the current fiscal year. And another key figure for the first day of the current month. Instead of using Customer exit, I hope there is some SAP delivered standard variable for these filters.
Please let me know if there is anything available for this. Your answers will be highly appreciated.
Thanks & Regards,
RanjanHi Ranjan,
Please find below standard variables.
Pls check below link for more.
Standard Variables in BEX related to Time Charcteristics
Characteristic
Variable
Description
0CALDAY
0CWD
Current Workday (SAP Exit)
0CALDAY
0CYTCD
Cumulated to Current Day (SAP Exit)
0CALDAY
0DAT
Current Calendar Day (SAP Exit)
0CALDAY
0DAY_***
Cumulation of all Values to Key Date (SAP-Exit)
0CALDAY
0LYTCLD
Cumulated to Current Day of Previous Year
0CALDAY
0LYTCLD
Previous Year Cumulated to Current Day (SAP Exit)
0CALDAY
0L_DATE
Last Calendar Date
0CALDAY
0P_LY_R
Comparative Period for Last Year
0CALDAY
0P_TY_R
Period for Current Year up to Yesterday
0CALDAY
0S_KDATE
Key Date Interval for Previous Year (SAP Exit)
0CALDAY
0S_KDAY
Key Date Interval Current Year (SAP Exit)
Best,
SATYA. -
Function Module to get first day of the fiscal year on passing a date
Hi Experts!!
Can you please suggest a Function Module to get first day of the fiscal year on passing a date..?
Example: if a fiscal year starts from 30 November 2009 and ends at 28 november 2010.
it should return 30 th nov 2009 (first day of the fiscal year)Moderator message - Welcome to SCN.
I think you'll find that this question has been answered before. Please search the forum before posting.
Also, Please read Please read "The Forum Rules of Engagement" before posting! HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
Rob -
Dynamic Variant for First Day of the Year
Hello All,
When I am trying to change the variant field related to date, i couldnot find out variant attribute for the FIRST DAY OF THE YEAR.
Is it possible to add one more attribute FIRST DAY OF THE YEAR just like attributes which are existing.(Current date, First day of the month .. etc are already existing.)
If it is possible,could anyone please post the procedure for this..?
Thanks and regards,
Mervin MathewHi,
unfortunatelly there is not such option.
If this is customer report, You can set initial date in INITIALIZATION event:
INITIALIZATION.
CLEAR: so_date, so_date[].
so_date-sign = 'I'.
so_date-option = 'GE'.
so_date-low = sy-datum.
so_date-low+4(4) = '0101'.
APPEND so_date.
Regards,
Przemysław -
DATE FOR FIRST DAY OF THE WEEK
I am new to Oracle and am looking for a procedure that will calculate the first day of the week given today's date.
Given 1/23/2000 I need to find Sunday 1/21/2000.Hi there,
I don't think there's a built-in Oracle procedure for what you want. However...
In SQL (at least, Oracle's SQL), you have the function TO_CHAR and TO_DATE that allow you to convert a date to a string and vice-versa. They work pretty much in a similar way, that is :
TO_<something>( <data_to_convert>, <format> )
eg.: To have the day of the week for the current date, you can do
SELECT TO_CHAR( SYSDATE, 'D' ) FROM DUAL;
Wednesday, January 24th, 2001 would then return 4.
To have the day of the year, you would do
TO_CHAR( SYSDATE, 'DDD' )
Then, to have the day of the year of the first day of the week, you then could subtract the day of the week of your date from the day of the year of your date, and then add one. To be able to do math stuff of char value, you must use TO_NUMBER.
In one ugly line, you could do this by doing the following :
select to_date( (to_char(sysdate,'YYYY') | | to_char( to_number( to_char(sysdate,'DDD')) - to_number( to_char(sysdate,'D')) + 1)),'YYYYDDD') from dual;
Eurk.
Or you could write a function that would return the date of the first day of the week of a specific date, like :
create or replace
FUNCTION FDOW (P_DATE DATE) RETURN DATE
IS
R_FDOW DATE;
BEGIN
R_FDOW := to_date( (to_char(P_DATE,'YYYY') | | to_char( to_number( to_char(P_DATE,'DDD')) - to_number( to_char(P_DATE,'D')) + 1)),'YYYYDDD');
return R_FDOW;
END;
(FDOW : First Day Of Week - not really original, I know)
Then, you can call it wherever you want:
SELECT FDOW(SYSDATE) FROM DUAL;
Have fun!
Frederic Denis -
Macro to Unlock the Cell on the start day of the Fiscal period
Dear Experts
We are using fiscal periods for the forecasting.1 period = 15 days.We forecast for 24 fiscal periods.
We only give chance to some customers to update forecast on 1 day of the fiscal period in the customer planning book .In this regard we have to lock the cell all most all the days except on 1 st day of the fiscal period.If the first of the Fiscal period is Sunday or Saturday, system should not unlock.
We did not maintained any Time stream ID to the storage bucket profile.
Example:
KF1 is used by our customers to update forecast.This keyfigure should always in the unedit mode.On the first day of the Fiscal period system should unlock the keyfigure.If first day of the period is saturday or sunday then system should not unlock this keyfigure.
Can we use calender in Macro?
Is it possible to achieve above logic in our case since we did not maintained time stream ID in storage bucket profile.
Please give your expertise opinion on my requirment.
regards
VickyHi Vicky,
Whilst other simpler options are given by others for locking /unlocking a KF with macros, Work around as below, if feasible in your environment.
Create two planning books (or with authorization at data view level, 2 data views).
One planning book PB1 with the KF1 in non-edit mode. This will be used normally.
Other planning book PB2 with KF1 in edit mode.
Create one more authorization profile/ role for each customer user.
Assign this additional authorization profile/ role only on specific dates as per background job to give additional authorizations.
Otherwise, if no. of user licenses is not an issue, then create an additional user id for each of the customer with additional authorizations and unlock these additional user accounts only on specific dates by background jobs.
We had in one project, some additional user accounts for similar( not exactly same) requirement. This gave better traceability.
Regards
Datta -
Changing the first day-of-the-week on the MyTimesheets app
IN the SAP ECC and Portal implementations of the timesheet app, we were recently able to change the display so the first day of the week is listed as Monday, rather than Sunday. I would like to do the same thing with Fiori.
That is, when the app starts up the first view a calendar view of the whole month. If a person wants to enter time manually, they click the button labeled "manual" and a data entry screen pops up. The first day of the week listed across the top is Sunday, which does not reflect our settings in ECC. We need the 1st day of the week to be Monday.
Is there a configuration change we can make to force the 1st day of the week to be Monday, as it is in ECC?
thanks for your help!
-Rob SolomonHi Rob,
Are you using Wave2 app? You could change the setting for first day of the week in CAC1 and Fiori Timesheet app will adjust te calendar accordingly.
Nothing needs to be done for Fiori app.
Please update UIX01HCM to SP03 if you are using Wave2 app?
Best Regards
Pankaj -
Default parameter to first day of the year
Hi,
I am looking to put default value of the parameter to first day of the year. Help me
Thanks
susheel
sushUse this expression as Default Value for parameter:
=DateSerial(YEAR(Today()), 1, 1)
- Vishal
SqlAndMe.com -
How to find first day of the year
Big picture: trying to determine how many pay periods are left in the year. There are 52 weeks in a year, and our company pay out each week.
The first pay week of the year always starts on a Friday. So If Janurary 1 is a friday, then the 1st week of pay period starts that week. If Jan 1 is a Thursday, then the first pay week will start on Janurary 2.
I need to figure out what day the first day of any year it is. By day, i mean Mon, Tue, Wed, Thur, Fri, Sat, or Sun.
Then when I figure out what day it is, i will write an if/then statement saying if Jan 1 is a monday, then add 4 days to that date and that will be the first day of a pay period.
Then when i figure out the first day of the first week, I wanted to add 7 days to create week2, week3.... week 52.
Then take todays date and if it was between week x and week y, then it would determine that z many pay periods are left...
is this the best way to go about this? anything easier?You can use the getDay method of a Date object to determine the day of the week. Any decent JavaScript reference will have more information.
George -
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 -
Need the first day of the year and last day of the year.
hi all,
i need a function module which can get me the first day of current year and last day of the current year??
please help.Similar date questions are being asked ALL THE TIME. Please search.
-
You have not maintained a rule for the fiscal year variant
1) I have Fiscal Year Variant in the Cube ( it got added along with fiscal year ) but there is no Fiscal year variant in the datasource & when I dont map it Transformation activation prompts error " You have not maintained a rule for the fiscal year variant ".
Can I just delete Fiscal year variant from the cube..does it matter?
2) Fiscal year & Posting Period can be populated from Fiscal Period, is the vice versa possible..? Does the sytem will take care of the conversion..?1. no, you should not delete and you cannot delete fiscal year variant from cube, it's required by fiscal year/ period (compound infoobject), you should add it in your datasource, or you can map with a constant value e.g K4
2. yes, fiscal period can be populated by posting period
some info on time characteristic relationtionship
http://help.sap.com/saphelp_nw70/helpdata/en/44/be8b631c743959e10000000a1553f6/frameset.htm
hope this helps. -
How to give the Fiscal year period in RSA3 for checking the data.
Hi BW Experts, good morning.
We have loaded the data monthlywise with selection parameters as Fiscal Year Period(FISCPER).
While checking the data consistency in both R/3 and BI, the selection parameter which i have given is in the format of 001.2005
I got the records in BI side.
But if we give the same format In RSA3 in the Fiscal Year Period tab , we r getting 0 records.
So kindly help me how to enter the selection parameters for 1 month.
Thanks
AnjaliHi sanyam ,
Thanks for the help.
I got it now.
Thank you so much
Bye
Regards
Anjali -
Function for finding first day of the month !!
Hi,
I know we have function to find the last day(DD) of the month. Do we have any functions for finding the first day of the month ??? if not is there any way i can find the first date(DD) of the month .
Bcoz i m trying to incorporate the logic for finding the first day of the month partition.
Thank you!!!Shahid Ali Tcs wrote:
There are many solution given by member in relation with your question, and all are correct .
I want to make u know something else.
Have you ever think why oracle has given function for last_day but no function for first.....
I u think this question u will get the answer of your "first day finding " question.
Because first day is alwasy 01 of every, while last day can be 30,31,29,28.....
Got my words ........
One more solution from my side,,,,
SQL> select '01' || to_char(sysdate,'-MON-YY') from dual;
'01'||TO_
01-SEP-09Which is a completely poor way of doing it.
Using TRUNC or LAST_DAY(..) + 1 will return a DATE datatype result.
Your method is converting the DATE into a VARCHAR2, which then prevents further processing/date based calculations unless it is explicitly converted back to a DATE again.
The reason Oracle hasn't provided a FIRST_DAY is because the TRUNC function already caters for it as this works with DATE's as well as NUMBER's, not because the first day is always 1. -
Is there any way to change the first day of the week back to Monday in iCal for iPhone?
With the new upgrade, iCal in my iphone is now showing Sunday as the first day of the week.
Is there a way to change it back to Monday as the first day of the week?Hi! The only way I know of is changing the screen resolution. Tom
Maybe you are looking for
-
HP ENVY WILL NOT SCAN TO THE COMPUTER
I spent 1 hour yesterday with a HP tchnician. He took control of my computer, did some things (which forced me to reinstall chrome) and then concluded that it was Kaspersky's fault. I haven't been able to do this since I bought the printer a few m
-
Sum Aggregation Error in Physical & BMM Layer in OBIEE 11g with Essbase 11
Hi everyone, I'm using OBIEE 11g with Essbase 11 as the data source. I'm using Sample Basic database from the Essbase as my data source. If I'm using the hierarchy for the measures (so I don't flatten the measures), and when I changed the aggregation
-
Trying to run a Web Dynpro Simple Sample with no luck??
Hi I have downloaded a Web Dynpro and BPM simple sample application from this location: The problem is after configuring the CE instance and setting everything up, when i Deploy and Run this app i get the following error displayed can some one please
-
Java/OpenJDK problem with OSS/osspd/ALSA/pulseaudio [SOLVED]
I've got problems with sound output of java programs, which usually try to hog /dev/dsp, using pulseaudio and openjdk 7. Some rare java apps' sound methods surprisingly do work. Others (which the majority of java programs seem to use) do not. In Sun
-
when user is opening the BEX Analyzer it is throughing the error as Method Logon of Object CSAP Logon Connection Failed". pls let us know what the error it is. Thanks