Function module for fiscal year
Hi all,
can you please suggest me the function module for automatic generation of fiscal year.
Thanks and regards,
S.Latha.
Hi Latha,
Please find below the code for auto generation of the fiscal year.
l_date = sy-datum. "l_date should declared of type sy-datum
Use the function module to get the period
CALL FUNCTION 'MC_PERIODE_ZUM_DATUM'
EXPORTING
idate = l_date
iperkz = l_p " 'P'
iperiv = l_periv "V6
IMPORTING
eperid = l_period
EXCEPTIONS
wrong_period = 1
OTHERS = 2.
l_fiscal = l_period+0(4).
l_p - 'P' i. e. Is the period indicator (Period according to fiscal year variant)
l_periv - 'V6' i.e. Is the Fiscal year variant. Here it is V6 which relates country 'US'.
l_period - gives you the Fiscal period.
l_fiscal - The first four digits of l_period gives you the 'Fiscal year'.
Hope this helps you !.
Thanks & Regards,
MM Jaffer.
Edited by: MohammedJaffer on Aug 10, 2010 12:53 PM
Similar Messages
-
Function module for Fiscal period ( monat field name)
Hi ,
please suggest the function module for (monat) Fiscal period. our reqirement is default to previous accounting period from the current month.
Thnks
SrinivasHi,
Refer to the following code:
DATA: LV_FISCAL_YEAR_VAR(2) TYPE C,
LV_PERIOD LIKE T009B-POPER.
CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
EXPORTING
COMPANY_CODE = S_BUKRS-LOW
IMPORTING
FISCAL_YEAR_VARIANT = LV_FISCAL_YEAR_VAR
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 1
OTHERS = 2.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
I_DATE = P_BUDAT
* I_MONMIT = 00
I_PERIV = LV_FISCAL_YEAR_VAR
IMPORTING
E_BUPER = LV_PERIOD
* E_GJAHR =
EXCEPTIONS
INPUT_FALSE = 1
T009_NOTFOUND = 2
T009B_NOTFOUND = 3
OTHERS = 4 -
Function module for current year
Hi ,
Is there any function module which will give current year only ??
Regards
rahuldata : a(20).
<b>CALL FUNCTION 'GM_GET_FISCAL_YEAR'</b>
EXPORTING
I_DATE = SY-DATUM
i_fyv = 'V3'
IMPORTING
E_FY = a.
EXCEPTIONS
FISCAL_YEAR_DOES_NOT_EXIST = 1
NOT_DEFINED_FOR_DATE = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write : a. -
Any function module for getting fiscal year week numbers
can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
Thanks!
Lakshmikandhhi,
Use FM <b>'DATE_GET_WEEK'</b>...
parameter D1 LIKE SCAL-DATE.
Data w like scal-week.
CALL FUNCTION <b>'DATE_GET_WEEK'</b>
EXPORTING
date = D1
IMPORTING
WEEK = W
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write W+4(2).
Regards,
Santosh -
Function module for year todate
Hi ,
Here i am looking for a functiona module for year to date (YTD ) .
For example fiscal year is Apr 2010 to till date we need to have the information . to get this kindly suggest the FM .
Thanks
VenkatHi
Please take some pain in searching on Forum.
However have a look at this link but make sure you search for available information on SCN for all your future basic queries.
[http://wiki.sdn.sap.com/wiki/display/ABAP/FunctionModulerelatedonDate+calculations]
Regards
Abhii -
Function modules for the following
Hi,
I want to know the function modules for the following purposes.
1) Check whether a date is valid or not
2) Calculate the no of days between two dates.
Expecting an early response.
Thanks n Regards,
AmitHi,
PARAMETERS: p_list LIKE t009b-bumon AS LISTBOX
VISIBLE LENGTH 11 OBLIGATORY ,
p_list1 LIKE t009b-bdatj OBLIGATORY.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS: p_list2 LIKE t009b-bumon AS LISTBOX
VISIBLE LENGTH 11 OBLIGATORY,
p_list3 LIKE t009b-bdatj OBLIGATORY.
Calling Function Module for calculating no of days between the
selected period
CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
EXPORTING
par_month = p_list
par_year = p_list1
IMPORTING
par_days = ws_n_days.
CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
EXPORTING
par_month = p_list2
par_year = p_list3
IMPORTING
par_days = ws_n_days1.
For Concatenating the month and year into the date format
CONCATENATE p_list1 p_list ws_i INTO ws_c_date1.
CONCATENATE p_list3 p_list2 ws_n_days1 INTO ws_c_date2.
date = ws_c_date1 - ws_c_date2.
In the above sample code the selection screen has month and year as input.
Also check this link
http://www.sapdevelopment.co.uk/tips/date/datehome.htm
Check FM
<b>RP_CALC_DATE_IN_INTERVAL</b> Add/subtract years/months/days from a date
<b>SD_DATETIME_DIFFERENCE</b> Give the difference in Days and Time for 2 dates
<b>Also for checking valid date:</b>
U can specify the date field as
Select-options: s_date like likp-date(similar to ur requirement)
This itself ceck for the valid date no seperate validation needed.
Thanks & Regards,
Judith. -
Version 0 is not defined for fiscal year 2012.
Hello Experts,
While am tring to release a work order, i am getting the below error.
Version 0 is not defined for fiscal year 2012.
Message no. GP626
Diagnosis
The version 0 is not defined in controlling area DE06 for the fiscal year 2012.
You have to maintain the fiscal year-dependent version parameters for all actual versions for which multiple valuation is updated.
System Response
The version 0 cannot be used for fiscal year 2012.
Procedure
Maintain the fiscal year-dependent version parameters for the version 0.
Execute function
By this what i understood is we need to change the Settings for each fiscal year for the version 0 in controlling area DE06.
i.e. we need to add the fiscal year 2012 in that.
Is this correct????
If yes what will be the impact of adding 2012 in that screen?
i think its a soft config only.
Please let me know the correct process
Thanks in Advance,
SatyaVersion 0 is not defined for fiscal year 2015.
What to do next ? Please help with it. -
Function Modules for Format Date, Month Name and Quarter value.
Hi All,
1. I am getting the date field from the Flatfile, so i need to format the date to YYYYMMDD. Is there any Function module for that in BW.
2. Based on the above Formated Date i have to find out the Name of the Month like JANUARY, FEBUARY etc.
3. Based on the same above Formated Date i need to find out the Quarter like 1, 2 etc.
Could you please let me know if any function modules are there for the above questions in BW not in ABAP, why i mention is some Function modules are there in ABAP but not in BW.
Thanks in advance.
Regards,
srinivasHi ,
1.If your input date format is MMDDYYYY then Use SDATE as conversion routine in trans strucutre to convert into YYYYMMDD.
2.By passing year as input parameter for the following FM you would get all the months with text.Using READ statement in routine you can get month name
MONTH_NAMES_GET
3.For Quarters you can use the following FM:
TSTR_PERIODS_QUARTERS
hope it helps...
regards,
Raju -
Sugestion required for Fiscal Year scenario
Hi Gurus,
I need your suggestion for the below scenario
One of our client going to change the Fiscal period from (Jan - dec ) to (Sep - Oct). We have nearly 5 years of records as on date based on the (Jan-Dec) fiscal period.
Requirement: If new fiscal peirod will come in active , they want to view all the data ( Including historical records)based on the both the fiscal period based on the selection in the query.
Technical requirement: Dynamic switching is requried for Fiscal Year Variant in the query level.
Suggestion Required for below point:
1. Is it required to maintain two Fiscal year variant ?
2.How do we maintain the new fiscal year period for historical record ?
3. Is it any posibilities their with out major disturbance of the existing query ?
4. Is it possible to do in query level with minor impact of performance ?
5. Is it possible to do in back end side with out redundancy of the records ?
6.I have a solution to use multiprovider on top of two infoprovides which are maintain the fiscal period based on two fiscal year variant. If I realize this it would lead major back end work.
7. I have another solution to add another two fields in the existing structure to hold new variant and fiscal period. If I do this How dynamically I can change the structure of the query for to view the different fiscal period information.
Anticipate your reply eagerly
With Regards
SivaHi,
1. Is it required to maintain two Fiscal year variant ?
Yes, You will need to have another Fiscal Year variant for Sep to Oct.
2.How do we maintain the new fiscal year period for historical record ?
To do this at the BI Level, You can have a routine to convert the Fiscal Year Period according to the new Variant.
You will have to get the help of a functional consultant in order to understand the logic of opening and closing balance. According to the new variant the current Fisc Period 009.2009(Sep 2009) will become 001.2010 and so on. Apart form just converting the period, you will also have to take care of carrying over the balances.
3. Is it any posibilities their with out major disturbance of the existing query ?
Once you implement the above logic, you can just include the New Fiscal variant into the query.
4. Is it possible to do in query level with minor impact of performance ?
Yes, as mentioned above.
5. Is it possible to do in back end side with out redundancy of the records ?
Not sure about this.
6.I have a solution to use multiprovider on top of two infoprovides which are maintain the fiscal period based on two fiscal year variant. If I realize this it would lead major back end work.
This seems to be the best way. You will not have to touch the existing cube. Only your reports will have to be copied to the New MultiCube. The logic in the 2nd Q above will be for the new cube.
Regards,
Gaurav -
Hi all
We are currently using Fiscal Year Variant Z6(July - June, 4 special periods).
When we display the texts for Fiscal Year Period in a Query it displays as CALMONTH FISCYEAR. E.g. July 2004, which is FISCPER 01.2004 but Calmonth 07.2003 (July 2003). I want the texts to display as the correct calendar year month, not as a combination of calendar month with the fiscal year.
I have tried to maintain the texts of 0FISCPER, but I get the following message "The master data table of char. 0FISCPER is not generated, operation terminated"
Has anyone managed to solve this problem?
Thanks in advance
ChamiChami,
I see the problem. The Year Part of the Text is wrong.
Unfortunately this means that Fiscal Year cannot be used to display the texts.
The solution to your problem is to have the description from the calendar month/year in the column headings by adding the calendar period to the data target, convert the fiscal period to calendar period on data loading (using provided date conversion functions in the formula builder) and use it for display purposes. The fiscal year is still used as selection criteria (as a filter)
The other solution is to have text variables created from the Calendar period and used in the column headings
Hope that helps!
Rishi -
Functional module for automatic creation of pur requisition & pur order
hello,
what is the functional module for automatic creation of puchase requisition and automatic creation of purchase order which we will assign in action box in service order processing management.
please let me know as early as possible
regards,
rajesh kumar rajuHi,
Please check with following.
IDOC_INPUT_ACC_PURCHASE_REQUI
IDOC_INPUT_ACC_PURCHASE_ORDER
/ISDFPS/OR_PURCHASE_ORDER_CR
BS01_PURCHASE_DOCUMENT_CREATE
CO_MP_CREATE_PURCHASE_ORDER
Thanks & Regards
Sadhu Kishore -
Function module for calculating planned and actual cost of production order
Hi ,
Do we have any standard function module for calculating planned and actual cost for production order?
i need to implement this in a Z-report.
Thanks
SriniHi,
try below function module
CRMCO_GET_PLAN_ACTUAL_COSTS
CO_IH_GET_PLANNED_COSTS_TOTAL
Regards,
Sankaran -
How to create the INBOUND Function Module for INBOUND IDOCs
Hi Friends,
Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS
which are recieved from XI Server ?
I am working in SAP-ISU
Here i will recieve the INBOUND IDOCs for the Meter Reading Orders.
We have a Standard INBOUND FUNCTION MODULE
IDOC_INPUT_ISU_MR_UPLOAD
which Uploads the Meter Reading Results.
I copied the Same function Module into ZIDOC_INPUT_
and working on it.
Can any one suggest me, whether i am going in correct way or not.
In IDOC_INPUT_ISU_MR_UPLOAD Inbound fun module,
BAPI_MTRREADDOC_UPLOAD is used to Update or Insert the Meter Reading Results,
My requirment is to Insert and Update the Meter Reading Orders which are Inbounded from XI.
Can I Use the Same BAPI
BAPI_MTRREADDOC_UPLOAD
to Update the below fields,
EABL-SERNR
EABL-ZWNUMMER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS
EABL-ADATTATS
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Kindly Suggest me,
Thanks in Advance,
GaneshHello Ganesh
I think you are going completely astray with you z-function module for IDoc processing.
If you look at TABLES parameter METERREADINGRESULTS (type BAPIEABLU ) of BAPI_MTRREADDOC_UPLOAD you will find many of the requested fields already:
EABL-SERNR => BAPIEABLU-SERIALNO
EABL-ZWNUMMER =>REGISTER
EABLG-ABLESGR
EABL-V_ZWSTAND
EABL-N_ZWSTAND
EABL-ABLHINW
EABL-ZSKIPC
EABL-ADAT
EABL-ATIMTATS => ACTUALMRTIME
EABL-ADATTATS => ACTUALMRDATE
EABL-ATIM
EABL-ZMESSAGE
EABL-ABLESER(Meter reader number)
Field EABL-ZMESSAGE appears to be custom field (at least I cannot find it on ECC 6.0). If this field was added using include CI_EABL then you probably can get these values into the BAPI using the EXTENSIONIN parameter.
Check routine CHECK_UPLOADRECORDS in the BAPI which allows two extension structures:
- BAPI_TE_EABL
- BAPI_TE_EOSB
Not surprisingly BAPI_TE_EABL contains the include CI_EABL.
Regards
Uwe -
How to config Check Digits function module for Student Number Validation
Hi SLCM Experts,
In the SAP-SLCM, How to use check digits function module for validate student number. Just only config it or need to customizing program.
*Any idea to student number validation in SLCM?*
Best Regards,
Suvatchai K.Hi ,
Can you expalin it further ?
You configure the St. no in piq_matr . And set it as external or internal no. range which suits your business .
What is the validation you are looking for ?
Regards
Gajalakshmi -
Function Module for FB01 Vendor line items postings in 3.1 Version
Hello all,
Is there any Function Module for FB01 Vendor line items postings in 3.1 Version. I do not want to go for BDC. Please suggest.
Thanks,
SubbaHi,
search for function module ACCPOSTING* or get development class of transaction FB01 and goto SE80, enter development class - and search in function group's function module.
Cheers.
...Reward if useful.
Maybe you are looking for
-
How to store en-crypted passwords in Oracle database.
There are several user IDs for whom passwords are to be stored in database which are to be encrypted and there should be a function to compare the passwords entered with the passwords stored in the database . Could any one let me know how to do this
-
How to track the changes in DB
Hi Guys, we are mentaining few envs where all the envs get refreshed from the same baseload.But due to some reasons in a particular QA env after some time of the db refresh due to some test script execution or from the application, some data are gett
-
I'm using iPhoto 8.0.2 (402) and trying to import my existing library of photos that were tagged with keywords ratings and locations in Vista Photo Gallery on a PC. The Vista app uses the XMP standard to store the metadata right in the files. When I
-
i cant purchase an app even though i already sgned up with my credit card.a promp tells me that i have not used the account to purchase any pp yet.what should i do?
-
N78 - N-GAGE 1.40.1557 trouble after software upda...
Everything worked fine with my N78, except minor RealPlayer issues, but after software update 12.046 to 13.056 N-Gage application won't launch games, won't uninstall old n-gage ones, won't install new n-gage trials. The phone's application manager st