Planning function reads data incorrectly

Hi,
I executed the planning function for the first time and then I deleted the data from the cube which got saved in the cube by the execution of the planning function  and then I tried to execute the planning function for the second time but the planning function stills reads the previous values which resulted from the execution of the first planning function.
Could some oen tell me what is the problem,is the data stored in the buffer and the way to delete it.
Thanks,
Subha

Hello,
After executing the delete planning function, explicity save the data. Pls check in LISTCUBE, whether the data is deleted successfully or not.
The goahead and excute the planning function second time..
Regards,
Ravi

Similar Messages

  • Reading manual planning function header data in exit function

    Hello all,
    I would like to know if is there a chance to read header data of a planning function. The planning function is determined by user selection (user choose which value will be in ) and in exit function I then modify the buffer by data which I get by calling RFC on another system.
    My problem is that buffer contain all the planning data for whole planning area (it seems) so there is many unnecessary call. How can I get in exit function value specified by user at start of a planning session?
    Thank you for your help

    Hi,
    There's some issue the planning funciton will only read the data specified by the users (variable values).
    Check the configuraiton once again.
    thanks

  • IP Exit Planning function copy data from cca to pca planning cubes

    Hello All,
    I have a requirement where I have to copy the characteristics and keyfigures of CCA plan cube data to pca plan cube data.The infoobjects in CCA aggregation level are are {0amount,0costcenter,0costelement,version,0calmonth,0infoprovider} which needs to be copied to corresponding infoobjects in PCA level  {0amount,0profitcenter,0account,0version,0calmonth,0infoprovider}.
    The CCA and PCA aggregation level are built on the top of the multiprovider.
    I can do it using the fox coding but 0costelement cannot be mapped to 0account as these two are different fields.Since I have to copy the values of 0costelement to 0account , I was wondering how can I do it using the exit function.
    As I have never used the exit function before, I was wondering if somebody can help me out with this.
    By the way, I have read the forums and figured out to create a class in se24 and use interface
    IF_RSPFLA_SRVTYPE_IMP_EXE and since I am generating some records , will be using the method IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTE.
         By the way , I read in the forums where there are methods/function modules which can copy data from one aggregation level to another aggregation level.Anyways, can you tell how can I loop thru the records of CCA aggregation level and copy the records to the PCA aggregation level.
    Edited by: nazeer on Feb 22, 2009 12:04 PM

    This thread might help you.
    https://forums.sdn.sap.com/click.jspa?searchID=22634973&messageID=5317176

  • Error while executing planning function with reference data

    Hi,
    I have a two planning functions one is used to upload the file (with out reference data checkbox in planning function RSPLF1) and other planning function ('Referece data'check box is selected in custom planning function RSPLF1) to execute the logic of creating new record along with the flat file data.
    Following data is uplooaded
    Company code | Profit_ctr | calmonth | Amount
    1000                 | 50000      | 01.2011  | 150
    Cube data
    Field1    |  Company code | Profit_ctr | calmonth | Amount
             |  1000                 | 50000      | 01.2011  | 150
    Z1         |  1000                 | 50000      | 01.2011  | 150
    Now I want to change the value from 150 to 200 and when I try to execute with the following data, it is giving dump 'a row with the same key already exists'.
    Company code | Profit_ctr | calmonth | Amount
    1000             | 50000          | 01.2011  | 200
    Ideally in the second execution it should append the new row with Amount value 50 to cube which is the delta value.
    I debugged the issue and found that I_TH_REF_DATA has following data and C_TH_DATA also contains the same records.
    Field1     Company code | Profit_ctr | calmonth | Amount
    #     1000                 | 50000      | 01.2011  | 150
    Z1     1000                 | 50000      | 01.2011  | -150
    Z1     1000                 | 50000      | 01.2011  | 150
    Due to this, record which already exists in C_TH_DATA and trying to append new record with the same combination is failing.
    C_TH_DATA should only contain the source data of Amount 200, but not sure why reference data is coming in C_TH_DATA.
    Could anyone please guide me on how the reference data is getting populated in C_TH_DATA ?
    Thanks in advance
    Edited by: peppy on Aug 3, 2011 5:00 PM
    Edited by: peppy on Aug 3, 2011 8:37 PM

    Hi Peppy,
    C_TH_DATA is hashed table!  According to your post you are trying to append to C_TH_DATA and this results in a dump. Please take a look at the standard planning function to see how SAP is programming the planning functions. E.g. in CL_RSPLFC_REPOST method IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE you can find the following code:
      CREATE DATA l_r_data_wa LIKE LINE OF c_th_data.
      ASSIGN l_r_data_wa->* TO <s_data_wa>.
      CREATE DATA l_r_new_wa LIKE LINE OF c_th_data.
      ASSIGN l_r_new_wa->* TO <s_new_wa>.
    LOOP AT c_th_data INTO <s_data_wa>.
    <s_new_wa> = <s_data_wa>.
    now the SAP code changes the  values, you can do it your way here
    and than write the changes back
            MODIFY TABLE c_th_data FROM <s_data_wa>.
    ENDLOOP:
    Another option is to use the READ statement to check if the record is already in the table. If not, you can use MODIFY otherwise you use INSERT. So you get something like this:
    READ C_TH_DATA from <s_data_wa> transporting no fields.
    if not sy-subrc EQ 0.
      INSERT <s_data_wa> into table C_TH_DATA.
    else.
      MODIFY TABLE c_th_data FROM <s_data_wa>.
    endif.
    Depending on your requirements you can also use the collect  statement.
    If c_th_data shows the reference data as well, you may need to adjust the filter to restrict it to the correct values.
    Hope this helps.
    Best regards
    Matthias Nutt
    SAP Consulting Switzerland

  • Use of forecast planning function in Integrated planning

    Hai ,
    Can I Know What is the use forecast planning function in Integrated planning.
    Give me One Example.
    Please tell What i hv to select in aggregation level, Filter, and Planning function for doing forecast.
    Regards
    Kishore.

    Hi,
    Filter is indeed used in IP similar to how planning package was used in BPS. There really is no difference 'conceptually'.
    What you have seen is the different options IP offers compared to BPS regarding planning function execution. You can execute planning function directly or using a planning sequence in an application (although in planning modeler, its only a planning sequence that can be executed, for eg., for testing purpose).
    If you just execute a planning function without specifying any restriction, it will operate on the entire set of planning data. Whether its a planning sequence or planning function, the data it operates on can be restricted by binding the various characteristics (or variables) using various DPs in the application. What kind of dynamic selection are you looking at?
    You can see following links if you have not read them already -
    http://help.sap.com/saphelp_nw70/helpdata/en/43/f0f8dc73b56bede10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/44/33a31fd463060ce10000000a155369/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/43/f0f92373b56bede10000000a11466f/content.htm
    These are for WAD; you can find similar links for the BI Analyser.

  • Assignment of filter to planning function in integrated planning

    Dear experts
    I am a bit new in Integrated planning and have a following conceptual question regarding filter object in IP
    In IP it seems that filter is a substitute object for planning package in BSP.
    I however do not see any possibility to assign filter to a planning function except in a planning sequence. I would however imagine to have a functionality to dynamically select the filter when i want to execute a planning function via application (excel based or Web).
    It seems that filter is not even required if a planning function is executed seperately (not as part of planning sequence).
    I have tried to execute a simple copy function without having any filter at all and it works.
    Could someone pls. explain me as to the conceptual difference between object filter and object planning package.

    Hi,
    Filter is indeed used in IP similar to how planning package was used in BPS. There really is no difference 'conceptually'.
    What you have seen is the different options IP offers compared to BPS regarding planning function execution. You can execute planning function directly or using a planning sequence in an application (although in planning modeler, its only a planning sequence that can be executed, for eg., for testing purpose).
    If you just execute a planning function without specifying any restriction, it will operate on the entire set of planning data. Whether its a planning sequence or planning function, the data it operates on can be restricted by binding the various characteristics (or variables) using various DPs in the application. What kind of dynamic selection are you looking at?
    You can see following links if you have not read them already -
    http://help.sap.com/saphelp_nw70/helpdata/en/43/f0f8dc73b56bede10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/44/33a31fd463060ce10000000a155369/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/43/f0f92373b56bede10000000a11466f/content.htm
    These are for WAD; you can find similar links for the BI Analyser.

  • Rsplan filter for planning function

    Hi.
    When creating button in bex analyzer for launching some planning function there is point Use selection from Data Provider
    where I see only providers based on queries, but none of filters created in transaction rsplan.
    What i am doing wrong?

    Hi,
    Search  "Creating Planning Applications in the BEx Analyzer" in help.sap.com or google.
    In the context menu of the button, choose Properties. The first dialog box for the command wizard appear
       a.      Select Planning-Specific Command, and choose Next ->.
       b.      Choose the required planning-specific command:
                    i.       Select Execute Planning Function.
                    ii.       Select the required planning function and data provider DP_01 as the filter.
    Regards,
    Michael 

  • 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
    Petr

    Hi 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

  • How to read data from clusters ??

    Hi ,
    Can any one please help me with procedure to read data from any Pcln tables.....other than pcl2.
    with and without using macros..
    I'm planning to read data from Pcl4 from cluster LA .using the macro RP_IMP_C4_LA. i dont know how to pass the key or where to use the key to read data .
    Please please let me know the standard procedure to read data from cluster tables.(i know PCL2).'
    Thanks In Advance !
    Kiran

    Hi Thomas,
    Just out of curiosity. In our system we have a custom table built which stores data in LRAW format.
    The table is updated using IMPORT/EXPORT FROM/TO DATABASE statements (similar to INDX).
    Can we read the PCL* tables in the same way as INDX ?
    BR,
    Suhas

  • Reading Data From a Different Planning Package in a Exit Function

    Hi,
    Is it possible to read data from a planning level / package other than the package that the exit function was executed with?  I want to read data into an internal table from another package and use that data in combination with the data in the current package to create new records.  If this is possible sample code for how to read data from a different package would be appreciated.
    Thanks!
    Mel Waldner

    Hi,
    As an example lets say you have restricted 0calmonth in your package to 6.2007. In the planning layout to fetch values for 5.2007 (read only), you can take 0calmonth in data columns, and for this column restrict it as 5.2007.
    Similarly in Planning functions, you can mark 0calmonth as field to be changed and fetch data for 5.2007.
    Hope this helps.

  • Read data in InfoCube using Planning Function

    Hi Expert,
    someone know the appropriate FMs for reading data in an infocube and provide data, from the same infocube, to the bps cube using FM-Init and FM-Exit in a planning Function?
    Many Thanks in advance
    Fabio

    You could try to use FM RSDRI_INFOPROV_READ: it will give you back the data in E_T_DATA.
    Hope it helps
    Regards

  • VISA Read gets incorrect data from serial connection

    I am having difficulty using the VISA functions in LabVIEW to read data from a virtual COM port. Data is being sent from a serial to USB chip via a USB connection using OpenSDA drivers. I have a python program written to read from this chip as well, and it never has an issue. However, when trying to achieve the same read in LabVIEW I am running into the problem of getting incorrect data in the read buffer using the VISA Read function.
    I have a VISA Configure Serial Port function set up with a control to select the COM port that the device is plugged into. Baud rate is default at 9600. Termination char of my data is a newline, which is also default. Enable termination char is set to true. A VISA Open function follows this configuration, and then feeds the VISA Resource Name Out into a while loop where a VISA Read function displays the data in read buffer. Byte count for the VISA Read is set to 20 so I can read more of the erroneous datat, however actual data will only be 6-12 bytes. The while loop has a wait function, and no matter how much I slow down the readings I still get incorrect data (I have tried 20ms thru 1000ms). 
    The data I expect to receive in the read buffer from VISA Read is in the form of "0-255,0-255,0-255\n", like the following:
    51,93,31\n
    or
    51,193,128\n
    And occasionally I receive this data correctly, however I intermittently (sometimes every couple reads, sometimes a couple times in a row) get incorrect readings like this:
    51,1\n
    51,193739\n
    \n
    51,1933,191\n
    51,,193,196\n
    51,1933,252 
    51,203,116203,186\n
    Where it seems like the read data is truncated, missing characters, or has additional characters. Looking at these values, however, it seems like the read was done incorrectly because the bytes seem partially correct (51 is the first number even in incorrect reads).
    I have search but haven't found a similar issue and I am not sure what to try from here on. Any help is appreciated. Thanks!
    Attachments:
    Serial_Read_debugging.vi ‏13 KB

    The first thing is that none of the error clusters are connected so you could be getting errors that you are not seeing. Are you sure about the comm parameters? Finally, I have never had a lot of luck looking for termination characters. You might want to just capture data and append each read into one long string just to see if you are still seeing this strangeness.
    What sort of device is returning the data? How often does it spit out the data? How much distance is there between it and your computer? Can you configure it append something like a checksum or crc to the data?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to get planning function in customized data slice?

    Hi all,
    we are using a customized data slice which implements IF_RSPLS_DATASLICE. Now we have the requirement that the data slice only protects the data when it calls via query. The data slice will not protect data if a planning function is executed. How can we implement this requirement? Is it possible in the method IF_RSPLS_DS_METHODS ~ IS_PROTECTED to read this information from an instance of the planning function (CL_RSPLS_CR_CONTROLLER?) or the buffer or something else? Or can we find some information about the query?
    At the moment we only check if a planning sequence is called by a process chain. This works fine
    IF sy-batch IS NOT INITIAL.
        e_noinput = rs_c_false.
        EXIT.
      ENDIF.
    Thanks for your help!

    Hi,
    I think this topic was already discussed in this forum.
    By design, it should not matter whether a query or a planning function is not allowed to change records. This is what data slices were designed for.
    OK, you need a different behaviour.
    1. Maybe you can detect from the planning function filter or query filter whether you run function or a query. If this is the case use the method IS_OVERLAPPING of the data slice. There you get the filter as a I_TSX_SELDR or as a range table when you call SELDR_TO_RANGE. When you return r_is_overlapping = rs_c_false. the data slice will not be called.
    2. Another option is to call the factory of the data slice and to use a flag in the data slice that indicates that the data slice is used in the context of a planning function. The factory method is GET_INSTANCE. Set a break point there to find out how the system calls this method. But when to call the factory? Check note 1101726. This note provides infrastructure to change the filter of a planning function at run time. But you can use this exit to call the factory method mentioned above. The nice thing is that you can raise the excpetion EMPTY in the exit, thus the function will not be called. So use a planning sequence with dummy1, your function, dummy2. For dummy1 switch on flag on, raise EMPTY, dummy1 will not be executed (almost no run time is needed), then 'your function' will be called (do nothing in the exit', then function dummy2 will be called, here switch the flag off again.
    Check also the following link where the above technique is used to for the conditional execution of planning functions:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a0785271-1446-2d10-6987-d1e44f08e97c
    Regards,
    Gregor

  • How to transfer data between planning functions in BPS

    Hi All,
    I have requirement, where user will enter the sales qty plan in manual planning function and need to read the zinfo object to distribute the sales qty accordingly to manufacturing plant and push into infocube.
    To fulfill above requirement, i'm thinking to create one manual plan and user will enter the total sales qty and create one more exit planning function to distribute the sales qty for each plant.
    For above approach, i need to get the data enter in mannual planning function to exit planning function.
    Can anyone let me know how to transfer data from one planning function to other planning function under same planning level and package.
    Thanks you,
    santosh.

    Hi Santosh,
    You can achieve the Distribute functionality using the Standard Planning Function for Distribute (Refer SAP Help for details).
    Moreover you would not have to do anything specifically to transfer data from one Planning Function to another. The application picks up the latest data records for processing whatever Function you are executing. If you want to execute a series of Planning Functions you could use a Planning sequence to achieve the same.
    Hope it helps

  • 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 PM

    Hi,
    I think you are talking about IP / BPS. Please post your thread to the relevant forum. This forum is for BPC on NW platform.

Maybe you are looking for