on 12-08-2015 11:13 AM
hi Experts,
We need a help in writing function in SAP BFC rule. We are using SAP BFC 10.0 SP16.
We have a consolidation in which dataentryperiod is 2015.10 and multi-periods 2016.01 to 2016.12 are used.
We need to write a function data to fetch data of an account for each period.
we have tried below function codes to fetch data for 2016.01, but both of them does not work. Please let me know in case any details are required.
If any details are attached here.
Thanks & Regards,
Shalini
Codes are attached below
hi All,
I am passing 2015.10 in the consolidation and I need to fetch data for 2016.01, 2016.02 and so on till 2016.12. Here 2016.01, 2016.02 to 2016.12 are periods whereas 2015.10 is dataentryperiod.
now I could achieve this using below period expression :
for 2016.01 - -> period =[UPDPER]+188416
2016.02 --> period = [UPDPER]+196608
2016.03 --> period = [UPDPER]+204800
Thanks & Regards,
Shalini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shalini,
I have a question regarding your data :
- does the amount on your MXPROP account / F99 flow exist in your consolidated data before the execution of the function (maybe on another period) and your objective is to populate target periods with the source amount ?
- or are your willing to insert amounts on MXPROP account / F99 flow on target periods for a fixed value (or maybe coming from another source, for example another account) ?
Regards,
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shalini
The id for 2016.01 is 30416896
In SQL you can get the period_id based on period (2015.03 etc.) with this:
@period_id = (convert(int,LEFT(@period,CHARINDEX('.',@period)-1))-1900)*262144+convert(int,RIGHT(@period,LEN(@period)-CHARINDEX('.',@period)))* 8192
Thanks
Marc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shalini
Not sure what you are trying to do. [UPDPER] is already in the 'integer' format, so no need to convert it
All 'period' fields in FC are stored as integers, and the code I provided is simply a way of converting the 'readable' code to its equivalent integer
So, for example if you run this code:
DECLARE @period char(7)
DECLARE @period_id int
SELECT @period = '2016.01'
SELECT @period_id = (convert(int,LEFT(@period,CHARINDEX('.',@period)-1))-1900)*262144+convert(int,RIGHT(@period,LEN(@period)-CHARINDEX('.',@period)))* 8192
SELECT @period_id
The result would be: 30416896
Marc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.