Skip to Content
author's profile photo Former Member
Former Member

Function in SAP BFC 10.0

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

Code1.PNG (7.4 kB)
Code2.PNG (7.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2015 at 11:36 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2015 at 02:10 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Dec 10, 2015 at 10:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.