Planning Function to update Fiscal Period Characteristics
Hi,
Is it possible to write a Planning Function that would update empty Fiscal Period Characteristics from the already populated 0CALMONTH Characteristic? I know the ABAP required if I can use it, but I'm just wondering about IP having the ability to do this in the Planning Function Environment.. I'm guessing it's a repost effort, but I can't think how to accomplish this? Or do I need to create a custom planning function?
Thanks!
Thanks for the info, My planning data is being uploaded via the SDN Planning File Upload Solution. What I did was end up modifiying the upload class ZCL_RSPLF_FILE_UPLOAD Method EXECUTE.
I added the following code if anyone is interested.
*{ INSERT BWDK902323 1
THIS SECTION OF CODE POPULATES THE FISCAL PERIOD CHARACTERISTICS
USING THE FISCAL YEAR VARIANT 'NK' AND THE CALENDAR MONTH/YEAR
FIELD-SYMBOLS <0FISCVARNT> TYPE /BI0/OIFISCVARNT. " Fiscal Year Variant
FIELD-SYMBOLS <0FISCYEAR> TYPE /BI0/OIFISCYEAR. " Fiscal Year
FIELD-SYMBOLS <0FISCPER> TYPE /BI0/OIFISCPER. " Fiscal Year/Period
FIELD-SYMBOLS <0FISCPER3> TYPE /BI0/OIFISCPER3. " Posting Period
FIELD-SYMBOLS <0CALMONTH> TYPE /BI0/OICALMONTH. " Calendar Month/Year
ASSIGN COMPONENT '0CALMONTH' OF STRUCTURE <L_S_DATA> TO <0CALMONTH>.
ASSIGN COMPONENT '0FISCPER' OF STRUCTURE <L_S_DATA> TO <0FISCPER>.
ASSIGN COMPONENT '0FISCVARNT' OF STRUCTURE <L_S_DATA> TO <0FISCVARNT>.
ASSIGN COMPONENT '0FISCPER3' OF STRUCTURE <L_S_DATA> TO <0FISCPER3>.
ASSIGN COMPONENT '0FISCYEAR' OF STRUCTURE <L_S_DATA> TO <0FISCYEAR>.
<0FISCVARNT> = 'NK'.
CALL FUNCTION 'FISCPER_FROM_CALMONTH_CALC'
EXPORTING
IV_CALMONTH = <0CALMONTH>
IV_PERIV = <0FISCVARNT>
IMPORTING
EV_FISCPER3 = <0FISCPER3>
EV_FISCPER = <0FISCPER>
EV_FISCYEAR = <0FISCYEAR>.
*} INSERT
Similar Messages
-
Us Planning Function to Update BPS Variable
I have read through several 'How To' papers on variables, but did not come across this. Is it possible to develop a planning function (FOX or User Exit) to prgramatically read and then update a BPS variable?
<FONT FACE = "Tahoma", Font Color = "Blue">
Hi<br>
--> You can write an ABAP Exit Variable and populate TO variable as From Variable + 1. You can then use both these variables in a Planning Level and use Normal BPS Copy to copy data from FROM version to TO version. You can include this Function in a Global Planning Sequence and later on include this Sequence in a process chainby creating variant on Standard Program UPC_BUNDLE_EXECUTE.<br><br>
Let us assume that because of some reasons you don't want to write ABAP Exit. Then you can write a FOX Code to do copy for you. Choose Version as Field to be changed. You can use TMVL operator in FOX to increment your FROM variable and populate your TO variable. You would have to include all of your characteristics in your planning level to be safe. But please note that this is not a recommended way to do copy. You should use standard BPS Copy Function as far as possible.
<br><br>
Hope it helps.<br>
Cheers Abhijit</FONT><FONT FACE = "Verdana", Font Color = "Red">
Please assign Reward Points if I deserve them in your opinion
</FONT> -
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 -
DP Planning in Fiscal Periods and Fiscal Weekly Periods
Hi,
We are using fiscal calnedar that starts on first Sunday of Nov with 4 weeks in each period i.e., fiscal year 2009 started on Nov 2nd (Sunday) and first period goes from Nov 2nd (Sunday) to Nov 29th (Saturday) and so on.
So, our fiscal week also starts on Sunday and ends on Saturday i.e., in first period of 2009 the following are the fiscal weeks
1 fiscal week - Nov 2nd to Nov 8th
2 fiscal week - Nov 9th to Nov 15th
3 fiscal week - Nov 16th to Nov 22nd
4 fiscal week - Nov 23rd to Nov 29th
1 fiscal period - Nov 2nd to Nov 29th
In storage bucket profile we are able to assign only one fiscal period profile. There is no place to consider fiscal weeks.
Created two planning books as follows
1. Planning book with time bucket profile of fiscal periods. It is allowing me to plan in fiscal periods and works as expected
2. Planning book with time bucket profile of fiscal weeks. It is not allowing me to plan in fiscal weeks
How to make the fiscal weeks planning book work?
Thanks in advance,
SriniWhat version are you using? We asked for this in 2003 at ASUG and although it was delivered in 4.1 we never got it to work, but when we upgraded to 5.1 it works perfectly.
Define 1 storage bucket profile with fiscal weeks and 2 planning bucket profiles, one with fiscal weeks and the other with fiscal months. Then define your planning area with the SBP fiscal week. Within interactive planning, turn on the header functionality. Choose the first icon on the upper left corner of the planning grid and choose "change periodicity" and you can switch from "fiscal weeks" to "fiscal months". -
Function module reqd for fiscal period using current date
Hi,
Is there any function module which gives fiscal period using current date.
Thnaks,
MaheedharHi Maheedhar,
Try the code below.
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = '1000' " Company Code
DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
CURRM = w_currm " Current Fiscal Month
CURRY = w_curry " Current Fiscal Year
PREVM = w_prevm " Previous Fiscal Month
PREVY = w_prevy. " Previous Fiscal Year
Regards,
Amit. -
Issue creating planning query on cube partitioned by fiscal period
I have a cube that is partitioned by fiscal period (0FISCPER). This requires that there is a constant value for fiscal year variant (0FISCVARNT). When I try to create an agg level on this cube 0FISCVARNT is automatically pulled into the agg level. However, because 0FISCVARNT is set to a constant value it is not available in query designer to add into a planning query...as such, I cannot create a planning query on this cube.
I can repartition the cube (i.e. remove the partitioning), but does anyone know of any other work arounds?
Thanks.We resolved this.
-
Function module to find get the Fiscal period using date
Hi Experts,
I am need of getting fiscal period and year from the given date. Is there any function module exists. Please advise.
Thanks in advance,
VivenDATA: I_FYV1 LIKE T009-PERIV.
CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
EXPORTING
COMPANY_CODE = i_billno-bukrs
COMPANY_CODE = S_BUKRS-LOW
IMPORTING
FISCAL_YEAR_VARIANT = I_FYV1
EXCEPTIONS
COMPANY_CODE_NOT_FOUND = 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.
CALL FUNCTION 'ME_DETERMINE_GJAHR'
EXPORTING
I_BSTYP =
I_BEDAT = P_DATE
I_PERIV = I_FYV1
IMPORTING
E_H_MONAT =
E_H_GJAHR = GJAHR1
E_H_DATUM = -
Hi All,
We have created a Contract/Subscription and the corresponding Rev Rec document that got posted is with fiscal/period as 0000/00.
Revenue Recognition: Fiscal/Period updated as 0000/00 for a Rev rec document created after creation of a Contract.
We have not executed VF45 or any revenue recognition process.
What amay be the reasons and how can we proceed further on this ?
Thanks,
M.Shiva KumarDear Amrish,
Problem of this you did not maintain the provision account in your revenue account determination. Please go to vkoa transaction and maintatin this provisional account any account number.
eg; application: v. condition type: kofk, chart of account: int, sales org: 0001, revenue account: 89999, provisional account 788888 (something)
I hope you understood
Thanks & regards -
Validation(in the planning function) is failing to read fiscal year
Gurus,
We created a fox formula in the planning function for validating budget data so that users do not profile above the allowed budget. We declared variables correctly as follows:
**Declare variables*
**++++++++++++++++++++++*
*DATA CURRBUD TYPE F.*
*DATA DIFF TYPE F.*
*DATA HEADF TYPE F.*
*DATA FUNDF TYPE F.*
*DATA FUNDFX TYPE F.*
*DATA HEADF1 TYPE F.*
*DATA HEADF2 TYPE F.*
*DATA HEADF3 TYPE F.*
*DATA HEADFX TYPE F.*
*DATA FUNDF1 TYPE F.*
*DATA FUNDF2 TYPE F.*
*DATA FUNDF3 TYPE F.*
*DATA FUNDF4 TYPE F.*
*DATA FUNDF5 TYPE F.*
*DATA FUNDF6 TYPE F.*
*DATA FUNDF7 TYPE F.*
*DATA FUNDF8 TYPE F.*
*DATA FUNDF9 TYPE F.*
*DATA FUNDF10 TYPE F.*
*DATA FUNDF11 TYPE F.*
*DATA FUNDF12 TYPE F.*
*DATA KVERSION TYPE 0VERSION.*
*DATA KYEAR TYPE 0FISCYEAR.*
*DATA KGRZHEAD TYPE ZGRZ_HEAD.*
*DATA PAREA TYPE AREA____.*
*FOREACH KGRZHEAD, KYEAR.*
**Original Budget*
*HEADF1 = {0AMOUNT,KYEAR,CRBU,0,KGRZHEAD,FUNDPROF }.*
**Supplementary Budget*
*HEADF2 = {0AMOUNT,KYEAR,CRBU,SUP,KGRZHEAD,FUNDPROF }.*
**Returns Budget*
*HEADF3 = {0AMOUNT,KYEAR,CRBU,RET,KGRZHEAD,FUNDPROF }.*
*HEADFX = HEADF1 + HEADF2 - HEADF3.*
*FUNDFX =*
*{0AMOUNT,KYEAR,HEAD,0,KGRZHEAD,FUNDPROF}.*
FUNDFX = FUNDFX + FUNDF.**
*ENDFOR.*
**Calculate the Difference between the Approved budget*
**And the Funding profile amount for the year*
**++++++++++++++++++++++++++++++++++++++++++++++++++*
*DIFF = HEADFX - FUNDFX.*
*IF DIFF > 0.*
*MESSAGE I025(ZGRZ) WITH KGRZHEAD HEADFX FUNDFX DIFF.*
*ELSEIF DIFF < 0.*
*MESSAGE E026(ZGRZ) WITH KGRZHEAD DIFF HEADFX FUNDFX .*
*ELSEIF DIFF = 0.*
*MESSAGE W027(ZGRZ) WITH KGRZHEAD HEADFX FUNDFX.*
*ELSE.*
*MESSAGE E028(ZGRZ)WITH KGRZHEAD.*
*EXIT.*
ENDIF.
A variable FYEAR has been created for characteristic 0FISCYEAR. This formula has been working correctly last year but when we changed the variable to point to 2011, for this year, it refuses to read that variable. The system is giving the followign error message:
Value of variable Fiscal year (FYEAR) cannot be determined
This only experienced in production, but in Develoment and QAS the function is working properly.
Kindly assist,
Tatenda
K
Edited by: tatenda chigwedere on Jan 4, 2011 4:13 PMHi,
I think you are talking about IP / BPS. Please post your thread to the relevant forum. This forum is for BPC on NW platform. -
Function module to find the fiscal periods
Hi Guys,
Please let me know if any of you are aware a function module which determines the fiscal periods between two dates.
(Begin and end dates.)
Thanks.Hi Sai,
From your post, I understood that you want to find how many periods are there between two dates, right.
I am not sure whether there is a direct function module for this.
But you can try this.
Use the FM DATE_TO_PERIOD_CONVERT to get the Fiscal Year and Period from a date. You have to input the date and Fiscal variant.
Using this you can determine the Fiscal year and Period for both the dates.
Then you can find the difference of these two Fiscal Periods.
This thread will be helpful for you to find the Difference of two fiscal periods
Urgent : Difference of two fiscal period
Hope this helps,
Regards,
Hari. -
Update DSO with planning function independently from saving data in realtim
Dear all,
I have an realtime cube which will be loaded via planning function and/or data entry queries.
In order to track the entries, I store all companies with status in a DSO objects, by using a planning fuction which calls a function module and inserts entries in the DSO table. The planning function will be start by clicking a button in a web application.
For example: A company enters data. The value will be stored in the realtime cube and the DSO entry will be created with company xyz and status 1.
Sometime it is necessary to create a status entry in the DSO without entering data in the realtime cube. ( In order to provide an other department to enter data in during status 1).
In this case the planning function which calls the function module in order to insert entries in DSO is not working because there is no data exchange with the realtime cube.
How can I change DSO entries independently from writing data in a realtime cube or not.
Any help would be great.
Best regards,
Stefan from Munich/GermanyHello Marcel,
i have one planning function which copies data from one version to another within the cube and another planning function (type fox) which calls up an ABAP function module in order to update my status DSO. see below:
DATA FISCYEAR TYPE 0FISCYEAR.
DATA COMPANY TYPE ZMCOMPANY.
FISCYEAR = OBJV( ).
COMPANY = OBJV( ).
CALL FUNCTION Z_FM_SEND_FOR_APP_PLAN_C01
EXPORTING
I_COMPANY = COMPANY
I_FISCYEAR = FISCYEAR.
normal way:
User enters data via query and sends data to headquarters (1. planning functions copy from version 1 to 2 and second planning functions changes status in DSO from 1 to 2.) This works.
not normal way, but somethis necessary:
User does not malke any entries, and headquarters wants to change the status via an own web application. In this case the first planning function runs, but no data were copied because there are no entries. So far thats ok, but at least the second pölanning function should run and change the status in the DSO from 1 to 2. And exacltly this is not working. I suppose that the reason is, that there are no data in the cube.
Any ideas would be great.
Best regards,
Stefan from Munich/Germnay -
IP - Fox Code - Planning Function -How to do a mass upload for filters ?
Hello Guys,
I have a question regarding executing a planning function.
I have a planning function with filters
Profit center
Sales Order no
Line Item No
Fiscal Period/Year
From Indicator
To Indicator
This planning function is ideally used to change few records where the user enter a sales order no and line item no, profit center and all above parameters. It works fine.
But one user has a requirement where he has to do a mass update. I have to do it in batch or mass update for example about 100 line items
Sales Order Line Item
100 10
100 20
200 10
300 30
300 40
plus the profit center , from indicator and to indicator.It will be very tedious for the user to enter the values and it can't work . because it will take more time time to execute the planning function for each sales order and line item.
How to create the filter for above values. I will be getting a excel spreadsheet. I can ask the user to give in the above format like
sales order, line item, profit center, from indicator, to indicator,Fiscalyear/period.
Then I have to upload the excel spreadsheet to create the filter values and then execute the planning function.
We are using the Integrated Planning tool and planning function is in fox code.
Can you guys throw some pointers how to achieve the above solution.Thanks
SenthilHello Senthil,
There is a standard functionality of file upload ,which can be used in your scenario.
You can give the hyperlink directly to user either in WAD or excel where in that link user can select the varaible values for profit center ,sales order no etc for upload and at the back of this functionality you will be using the file upload planning function to load the data.
Can check the link below for more details:-
/people/marc.bernard/blog/2007/11/25/how-to-load-a-file-into-sap-netweaver-bi-integrated-planning-part-2
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90cef248-29e0-2910-11bb-df8dece7e22c -
Distribute by Reference Data from Sender to Recipient planning function?
Hi all;
Im trying to use the planning function Distribute by Reference Data from Sender to Recipient to distribute the reference data by material to plan data.
This is:
Reference Data:
Version: 001
0vtype: 010
Material: M1; M2; M3
Sub-brand: SB1;
Price Group: PG1;
Customer: C1;
Area Manager: AM1;
Exercise/Period: 001.2008; 002.2008; 003.2008
Quantity: 100; 200; 300 -> 600
Plan Data 1:
Version: 002
0vtype: 02
Material: #
Sub-brand: SB1;
Price Group: #
Customer: C1;
Area Manager: AM1
Exercise/Period: #
Quantity: 1000
I want to distribute the 1000 according with the material reference data. The plan doesnt consider the Price Group and Exercise/Period.
Goal:
Plan Data 2:
Version: 002
0vtype: 02
Material: M1; M2; M3
Sub-brand: SB1;
Price Group: #
Customer: C1;
Area Manager: AM1
Exercise/Period: #
Quantity: 167; 333; 500
M1 = 100 / 600 * 1000
In the planning function I had use:
Fields for change:
Material: 0 - ZZ
Fields for conditions:
0vtype: 020
Exercise: 2008
Key figure: quantity
Version: 002
Old material: #
Reference characteristics:
0vtype: 010
Exercise: 2008
Material: (I didnt fill because it doesnt allow all the material items)
Key figure: quantity
Version: 001
When I execute the function a message appears:
No reference data
Can anyone help me?
Regards;
RicardoHi,
price group is missing in your reference data
D -
Customer exit code to populate fiscal period for prior three months
Dear frns,
I need an ABAP customer exit code to populate prior three month's fiscal period.
Please update on this...thanks
Cheers! ShanaHi
Here is the code that will satisfies ur condition.
CASE I_VNAM.
IF I_STEP = 2.
WHEN 'ZVAR1'.
DATA DATE1 TYPE D.
DATA PERIOD1 TYPE N.
DATE1 = SY-DATUM.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'.
exporting
l_date = date1
l_periv = 'v3'
importing
E_BUPER = PERIOD2
E_GJAHR = YEAR2.
DATA PER3 TYPE N.
PER3 = PERIOD2 + 1.
CONCATENATE YEAR2 PERIOD2 INTO FPERLOW.
DATA LDATE TYPE D.
LDATE = SY-DATUM + 365.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'.
exporting
l_date = LDATE
l_periv = 'v3'
importing
E_BUPER = PERIOD2
E_GJAHR = YEAR2.
CONCATENATE YEAR2 PERIOD2 INTO FPERHIGH.
DATA WA1 LIKE LINE OF E_T_RANGE.
WA1-LOW = FPERLOW.
WA1-HIGH = FPERHIGH.
WA1-SIGN = 'I'.
WA1-OPT = 'BT'.
APPEND WA1 TO E_T_RANGE.
ENDIF.
Hope u gotit,
Regard,
RaviChandra -
Forecast planning functions/sequences
Hi,
I want to ask you for some advice in two issues. We want to create forecast that is based on actual data from Actual data cube and this forecast save to Forecast data cube (both cubes are in multiprovider)
1) I created sequence , for that I use filter and planning function type forecast. Is it some relationship between historic data filter in forecast planning function setting and "classic" filter (part of planning sequence), It looks that u201Eclassic filter is stronger than historic data filter, so no data from base cube are readu2026 When i use filter with small restriction some data are read...
2) When I created forecast planning function, I use historic data filter for specification of base data for forecast (I used Actual data cube and another restrictions) but I can´t find anywhere some target field for restriction, so I dont know to which cube will be data saved and with which restriction...
Thanks for some advice.
Regards
PetrHi David,
thanks for reply.
If I understand good forecast planning function create data with same restriction as is used in Historic data filter only with another time horizont, Am I wright?
So the data will be saved to the same cube where is "based" data - in my case Actual data cube and there no possibility to choose Forecast cube for it. So we will have to than use some copy function to copy data to Forecast cube...
I found in help.sap.com some example of forecast scenario, it looks that in this scenario also version are changed from Actuals to PLAN_LIN, but maybe it s only my opinion...
Function Type Forecast
Comments Writes the data for forecast period to version PLAN_LIN. Reference data is read from version ACTUALS.
Filter Version = PLAN_LIN, Month = Jan 2007u2013Dec 2007
Characteristics of Function to be Changed Month
Parameters of Function Past: Jan 2005 u2013 Dec 2006,
Past filter: Version = ACTUALS,
Forecast period: Jan 2007 u2013 Dec 2007,
Forecast parameter: Linear Regression
Thanks for your comment.
BR
Petr
Maybe you are looking for
-
Error while cancelling the material document.
HI, while cancellation of material document thru MIGO screen getting error Deficit of PU IR quantity 20.000 EA Message no. M7021 Diagnosis Shortfall below the specified stock level or quantity amounting to 20.000 EA. Diagnosis Shortfall below the spe
-
Blurry text after Tabbed Cycler runs on IE
http://faculty.medicine.iu.edu/mentoring/ So three quotes rotate through on this page using the TabbedPanelsCycler that I found on the forum long ago. I recently have been getting complaints that as the second panel rotates the fonts dont render out
-
Splitting XML Files without namespaces
Hello, I have a file that looks similar to this: <?xml version="1.0" encoding="UTF-8"?> <File> <Header> <Location>Phoenix</Location> <Date>052214</Date> </Header> <Bill></Bill> <Trailer> <Total>1076</Total> </Trailer> </File> What I wo
-
Unplanned MIC during result recording
Dear Gurus, Can anybody tell me what is means by Unplanned MIC. How do I create the same in Inspection Plan and make result recording. Srinivasan.
-
How can i create i view?
Hi how can i create i view? give me some docs regarding this