Read data from SNP planning book

Hi Frnds,
We are faced with a situation in which we need to read certain key figures such as PIR's, Goods Issue from SNP Planning book.
We tried using BAPI "BAPI_PBSRVAPS_GETDETAIL" to retreive data. But it seems that we are giving wrong input data to the BAPI. Could you please let us know what to be fed into the BAPI in simple terms? If there is any example code for the same , would be very much appreciable.
Orelse if there is some other way to retreive this data kindly suggest us accordingly...
Many thanks in advance.
Regards,
Karthick

Hi Karthick,
The parameters for calling BAPI_PBSRVAPS_GETDETAIL really depends on your Planning Area and Planning Book configurations. The planning book configuration will limit what Characteristics and Key Figures will you be able to read using BAPI_PBSRVAPS_GETDETAIL. Let me give you an example.
Assumptions: The planning book is configured as follows:
Name = ZPB1
Data view  = DV1
The DV1 data view contains the characteristics 9AMATNR and ZCNTRY and Key Figures ZKF1 and ZKF2.
Assuming also that we have the following data currently in livecache:
9AMATNR-ZCNTRY-ZKF1-ZKF2
000001234-PH       - 143  - 567
000007891-PH       - 245  - 782
000007891-US       - 124  - 890
Let's further assume that you want the data aggregated to country level (e.g. char ZCNTRY), you have 1 planning version 'ZPAV1' and you only want the data for Country=PH, then here are the parameters that you need to pass to  BAPI_PBSRVAPS_GETDETAIL:
PLANNINGBOOK = 'ZPB1'
DATA_VIEW = 'DV1'
SELECTION =  9AVERSION I EQ ZPAV1, ZCNTRY  I EQ 'PH'
GROUP_BY = 'ZCNTRY'
KEY_FIGURE_SELECTION  = ZKF1, ZKF2
Hope this helps. Please post again if you have any questions. I can give you sample code if you can post your email address.
Message was edited by:
        Emmanuel Nepomuceno (added planning version to selection)

Similar Messages

  • Purchase requisition date in SNP planning book and product view not in sync

    Hello Experts,
    We have an issue with display of purchase requisition date in SNP planning book.
    We are manually entering the PR's for a perticular week from Monday - Sunday(01.09.2014- 07.09.2014), when the last PR is entered on 07.09.2014, it does not appear on the same day in planning book(cell becomes empty) and moves to 06.09.2014, thus quantity on 06.09.2014 is the summation of the quantities present on 06th and 07th.
    The PR dates are appearing correct when we click on display details in planning book and they are correct in product view, MD04 as well.
    Additionally, this is the same date on which daylight saving time comes  into effect.
    Kindly advise if anyone has faced similar situation earlier.
    Many thanks,
    Aditi

    Hi Aditi,
    Check the time zone that you have in your location in ECC and APO.
    Also note it is recommended that you maintain the same system time zone in APO and in ECC. (check tcode STZAC in both systems).
    Different time zones should generate this kind of inconsistencies.
    Kind Regards,
    Mariano

  • BAPI or FM needed to retrive data from SNP Planning Area

    Hi All,
                 There is a planning area created for SNP ,now I need to retrive key figure values present in this SNP Planning area.Does any know of BAPI or FM which can be used to retrive data from SNP Planning Area?
    Thanks,
    Venu

    Hi Venu,
    A)  Please try this BADI Implementation
        /SAPAPO/EXTRACT_EX             Sample implementation
        /SAPAPO/SDP_EXTRACT             Definition name
        /SAPAPO/IF_EX_SDP_EXTRACT   Interface name
        /SAPAPO/CL_IM_EXTRACT_EX     Class name
    The Uses of this BADI are;
    1) You can interrrupt the data extraction process from the planning area.
    2) You can use the CHANGE_INPUT method to override the input parameters for the extractor (sent from the requesting system).
    3) You can use the CHANGE_OUTPUT method to alter the extracted data, derive the values of certain InfoObjects  , for example.
    4) You can use the CHANGE_SELECTION method to modify the selection table that is used for extracting data using a  BAdI method. This is particularly useful when extracting data from an SNP planning area because you cannot specify a location product in the standard selection.
    B)  You can also try the below function modules
    /SAPAPO/CL_IM_EXTRACT_EX - Load key figures of Demand Planning
    /SAPAPO/CDI_TSDMID_KEYFS_LOAD - Load key figure data from TSDM
    Regards
    R. Senthil Mareeswaran.

  • How to extract data from SNP Planning Area

    Hi All,
    I am trying to extract data from SNP Planning Area. i had created the data source as it is given in help document but when i try to test the data source for the data through extractor checker it gives a message "0 data records selected".
    So please help me out if some body have some document in the regard pl forward it to my mail id [email protected]
    Thanks in Advance.
    Best Regards.
    rahul

    Hi Ganesh,
    In SNP you do not have to go to RSA6 u can create datasource in S&DP Administration>change planning area>Extras-->Data Extraction Tools.
    from there u can do all the settings and can as well test.so there is no use of either RSA6 or RSA3.
    bets regards,
    rahul

  • Does exist a way to read data from IP planning cube with ABAP?

    Hello All.
    My scenario is as follows:
    I have an ODS where we store costcenters to be planned. This ODS is loaded via a manual falt file load (regular dta transfer process).  In order to avoid inconsisten data in the planning cube, I want to check in my ODS load process, if any costcenter which is already planned (it has planned data in my planning cube) is being deleted in the loaded file.
    To do this, I need to access my planning data cube ( i guess also planning buffer), so my question is if there is any function module which retrieves data from a planning level as reference data.
    Thanks a lot and best regards,
    Alfonso.

    Hi Alfonso,
    note 1101726 shows how the plan buffer can be read.
         l_r_plan_buffer = cl_rsplfa_plan_buffer=>if_rsplfa_plan_buffer~get_instance( i_infoprov ).
         l_r_plan_buffer->get_data( EXPORTING i_t_charsel = l_t_charsel       
                                              i_include_zero_records = rc_false
                                              i_r_msg = l_r_msg
                                    IMPORTING e_r_th_data  =  l_r_th_data
                                    EXCEPTIONS OTHERS  = 2 ).  
    Please take a look at the note. You do not need to implement the after_burn_selection exit, but you can find sample code how to read the planning buffer. Please give it a try.
    Another solution would be to use the function module RSDRI_INFOPROV_READ. But you need to make shure that you first close the yellow request. This can be done using function module RSAPO_SWITCH_BATCH_TO_TRANS.
    Hope this helps
    Matthias Nutt
    SAP Consulting Switzerland

  • Error in reading data from planning book

    Hi Guys,
    I am facing error in reading data from SNP planning book .
    When i try to read single product data for simulation version , it gets loaded correctly.
    However, when i try loading data for more than one product, then i get error "Product does not exist".
    I checked all products are assigned to model-version.
    I tried running consistency check as well and after it finished got message as "All inconsistencies can not be corrected".
    Please let me know if any one had faced this error.
    Thanks.

    Hi,
    Consistency check should solve the problem in this case. Try running it specifically on the version you are using. It should work.
    Regards,
    Guru Charan.

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

  • Data available in RRP3 view but not coming in SNP planning book

    Hi All,
    I am facing an issue in SNP book. I can see forecasts in RRP3 view. But when I load the same data in SNP planning book, the forecasts are not coming there (forecast KF)
    I ran LC Cons check, PA cons check, OM17, but still the same result.
    Any pointer would be highly valuable.
    Regards,
    Manotosh Bhattacharya

    Hi
    If you look at the standard Forecast KF 9ADFCST in your planning area, it is usually assigned the Category Group of DF1. This category group only contains the category FA for forecast. If you create Forecast in /SAPAPO/RRP3, this will create Additional Forecast or category group FC. Therefore any forecast generated this way will not appear against the standard planning book KF.
    So you have two choices, if your forecast is only FC category then use the KF 9AAFCST Forecast (Addittional) in your data view or create a new Category Group with both FA and FC assigned to it and then assign this Categotry Group to 9ADFCST in your planning area.
    Regards
    Ian

  • Problem in getting data in SNP Planning Area Data Source

    Hi All,
    Problem Statement: To fetch data from SNP Planning Area for reporting in SAP BW.
    Approach: Followed the standard SAP Help Document. Link:http://help.sap.com/saphelp_scm40/helpdata/en/e0/9088392b385f6be10000000a11402f/content.htm
    First Step: To create a DataSource on the Planning Area (Z9ASNP02) and Aggregate(9AMALO).
    For that
    Go to SAP Easy Access>Click on /SAPAPO/MSDP_ADMIN/ you are on S&DP Administration>Select the planning Area Z9ASNP02 double click on it
    You are on Change Planning Area Screen>Go to Extras left click>DP/SNP Data Extraction Tool-->Click on Generate Data Source, Provide the
    Data Source Name & Select the Aggregate 9AMALO and click on continue. Data Source is generated.
    But now when i go for Test Data Source-->Extractor Checker Screen and then providing the version 000 and then when i click on extraction Button
    It gives a Message "0 data records selected".
    Thanks in Advance,
    rahul

    Hi Somnath,
    Please correct me if my understanding is wrong; you are saying that, we cannot extract data from order series keyfigures. In that case how many key figures you maintain for time series, performance miight come down for planning area if you maintain huge no of keyfigures.
    Is there any way to extract data from Order series Planning area?
    Thanks & Regards,
    Jagadeesh.

  • User are getting kicked out of SNP planning book

    Hello Experts
    I hope you can help me out here!
    From time to time we are experiencing strange issue for SNP user's .. User are getting kicked out from SNP planning book
    Please help us.
    Thanks
    Ramesh

    Hi Ramesh,
    As far as I know, users should not get kicked out unless someone terminates their session.
    Even if they lock some data and the same data is needed by some job, it's the job that would fail showing data lock. Similarly, if some other uses tries to access the locked data, the user who is accessing later would face the issue of not being able to go to edit mode.
    It's possible to write programs that could specifically do this work of kicking out users before we run batch jobs, but let me assume that this is not the case with you.
    One possibility is that there is issue in livecache and so users are not able to access livecache or get kicked out from their active session (e.g. your log area gets full, then users would soon get kicked out after seeing the system hanging initially). This you would need to check at the time when users face issue. This would also mean that other processes that need livecache should also fail e.g. GATP, or SNP planning or PPDS planning related jobs would fail at the same time.
    If you could share exactly what error message the users are seeing, that could be helpful in resolving the issue.
    Thanks - Pawan

  • SNP - Planning Book/Data View not showing up in /SAPAPO/SNP94

    Hi All:
    I created a planning Book out of a custom SNP planning area. While I could see the Planning Book in the list of Planning Book in the /SAPAPO/SDP94 - Interactive Supply Network Planning (all Books)   I could not see the custom planning book in /SAPAPO/SDP94 - Interactive Supply Network Planning (all Books) .  I could ony see the SAP supplied PB there.  Will SDP94 transaction display only the standard SNP Planning book?  How can I make sure that the custom PB is displaed in /SAPAPO/SDP94?
    pl. help
    Thanks
    Ryan

    Hi Narayanan,
    a couple of simple checks..
    can you please check that you have not set a filter critera in the shuffler in planning book/data view?
    you can also check if by mistake only a limited number of users are assigned to this planning book and data view ?
    else you may want to check note : , 327371
    Let me if this helps.
    Rgds, Sandeep

  • How to create a custom Button in a SNP planning book

    Hi Experts,
    I created my own Planning Book and Dataview in SNP with 3 Key Figures: KF1, KF2, KF3. Now I want to create one my own button with Macro so that when I press that button, the Macro will run to calculate: KF3 = KF1 + KF2.
    I know that I can drag this Macro to one of default events like: Default, Level Change, Start. But actually, I want to create my own button so that I can handle the event as I want.
    My question are:
    1. How to create a custom button on the toolbar of SNP Planning book and writing macro for the button?
    2. Please give me any document, material teaching about writing macro and relating to my above scenario.
    Thanks very much!
    Duyennx
    Edited by: xuanduyen on Sep 6, 2011 9:20 AM

    Hi,
    Access the transaction "/n/sapapo/advm". In the list select your planning book/ data view and click 'Start Macro Builder' button.
    In the Macro builder screen, drag and drop your macro from Macro depot to the work area.
    Right click on your macro name and select 'properties'. In the pop up, next to the Assigned Push button field, there is a button 'Choose'. Click that. It will display all the available icons. In standard system, it displays more than 1000 icon. Choose any one icon which is suitable for your macro function. Close the pop up and save the macro. This will assign a push button to your macro.
    In the Planning book tool bar, you can see the selected icon in the header tool bar. Just by clicking that icon, you can execute the macro interactively.
    And I don't know whether we can include/design our own icon. But there are already 1000+ standard icons to choose.
    Regards,
    Manimaran M.

  • Possible to call a transaction from a planning book using a macro button?

    Hi All,
    Is it somehow possible to call a transaction using a macro button in the planning book? Also, the current selection should be passed as input parameters to the transaction.
    In my example, I am trying to run the transaction /SAPAPO/MC90 - Release to Supply Network Planning from the Demand Planning  Planning Book/Data View. This way if planners need to change forecasts mid month for specific selections, they can easily transfer to SNP without having to go out of interactive planning.
    Thank you,
    Maria

    Hello Maria,
              It's possible to call a transaction from a planning book using a macro button.
    What you can do is ..... Create a function module and inside it use the command "Call Transaction Tcode"  (ABAPer can do this) to call ur specific transaction. And this module can in turn be called from your macro. Please find the below link which explanis how to call a function module from a macro. Do let me know if you need more information on this.
    Calling a function module from APO Macro
    Regards,
    Siva.

  • Demand on VC material not visible in SNP planning book

    Hi Experts,
    Is there any way to plan VC (Variant Configuration ) materials in SNP at the group level ?
    I will explain the scenario more in details below
    I have an VC material say X. Material X has end product Y attached to it (material variant). When material X is cifed to APO, it appears as configurable product in APO & is a top level product. Now when I create a demand on material X through DP, the demand appears in product view (RRP3). However the demand does not appear in the SNP planning book nor it gets selected during background planning run. The system is configured as Variant Configuration & not CDP.
    Is it possible to plan material X in SNP ? If possible how can the demand be read in SNP ?
    Thanks in advance
    Regards
    Sandeep

    Hi Sandeep,
    One of the limitations of Characteristics Based Forecasting is, CBF results can only be used in PPDS and not in SNP, hence it is not possible to plan that material X in SNP. Even though you use MC90 transaction which is release DP to SNP, but the data will not be available in SNP
    That material X will be planned only in PPDS, there are two ways to plan, those are
    1. one way is by releasing CBF results to active version using MC90 transaction, during this release, you should maintain consumption group in release settings and in product master, in this case you have to use Forecast Check/Allocation check as a part of ATP/GATP, here you can not use CTP or MATP
    2.the other way is by releasing CBF results to inactive version using MC90 transaction, during this release you should not define consumption groups,  generate the dependent requirements in inactive verison using heuristics in PPDS , and convert dependent requirements from inactive version to Forecast - active version using /SAPAPO/DMP2 transaction, in this case you can use MATP/CTP as a part of GATP
    -Deepak

  • Key figure Explaination in SNP planning books 9ASNP94

    Dear Experts ,
    I am curious to know regarding SNP planning books key figures
    when i am exploring sap standard  Planning book
    9ASNP94
    Data view : SNP94(1)
    I can able to see many KEY FIGURES  Please refer below
    I AM NOT SURE how they are used in planning , i mean  what is clear definition of those key figures and i see some key figures are grey out and some or open for entry
    how to find those detail information
    when i go  to T code SDP84 - define planning book
    i can able to see those descrption and infocubes but not sure how to understand clearly , would be more thankful if some give me a clear explaination of it
    Forecast     TXT                                                                                                                   
    Sales Order     TXT                                                                                                                   
    Distribution Demand (Planned)     TXT                                                                                                                   
    Distribution Demand (Confirmed)     TXT                                                                                                                   
    DistrDemand (TLB-Confirmed)     TXT                                                                                                                   
    Dependent Demand     TXT                                                                                                                   
    Total Demand     TXT                                                                                                                   
    Distribution Receipt (Planned)     TXT                                                                                                                   
    Distribution Receipt (Confirmed)     TXT                                                                                                                   
    Distribution Receipt (TLB-Confirmed)     TXT                                                                                                                   
    In Transit     TXT                                                                                                                   
    Production (Planned)     TXT                                                                                                                   
    Production (Confirmed)     TXT                                                                                                                   
    Manufacture of Co-Products     TXT                                                                                                                   
    Total Receipts     TXT                                                                                                                   
    Stock on Hand     TXT                                                                                                                   
    Supply Shortage     TXT                                                                                                                   
    Safety Stock     TXT                                                                                                                   
    Reorder Point     TXT                                                                                                                   
    Target Days´ Supply     D                                                                                                                   
    Target Stock Level     TXT                                                                                                                   
    Days´ Supply     D                                                                                                                   
    ATD Receipts     TXT                                                                                                                   
    ATD Issues     TXT                                                                                                    
    Many thanks & Regards
    Raj

    Hi
    Please find below the short summary of each key figures.
    Forecast TXT  :- FCST which has been released from APO DP to APO SNP
    Sales Order TXT :- Sales order transferred from ECC to APO via CIF.
    Distribution Demand (Planned) TXT :- Dependent demand coming from other location to this location for same product. Network planning
    Distribution Demand (Confirmed) TXT :- In case deployment , we confirm the Distribution Demand (Planned) will appear her.
    DistrDemand (TLB-Confirmed) TXT :- Mainly used in case of TLB.
    Dependent Demand TXT :- Dependent demand coming from parent product in case of BOM
    Total Demand TXT :- The sum of all above demands is called as Total Demand.
    Distribution Receipt (Planned) TXT :- SNP created Purchase req will appear in this key figure.
    Distribution Receipt (Confirmed) TXT :- In case of deployment Distribution Receipt (Planned) will be get confirmed in the Distribution Receipt (Confirmed) key figure.
    Distribution Receipt (TLB-Confirmed) TXT :- Mainly used in case of TLB.
    In Transit TXT :- In will contain the in transit stock which will transfer for ECC via CIF.
    Production (Planned) TXT :- Planned order will get created via SNP in case of domestic mfg.
    Production (Confirmed) TXT :- In case of SNP deployment Production (Planned) will be get confirmed in the Production (Confirmed)) key figure.
    Total Receipts TXT  :- Total of all the receipt elements as been used.
    Stock on Hand TXT :- Stock has transferred from ECC or R3 via CIF.
    Supply Shortage TXT :- This will be calculated with macro based on total demand and total receipt.
    Safety Stock TXT :- Based on SNP master data, safety stock will get calculated during planning run.
    Reorder Point TXT :- Based on SNP master data, Reorder Point will get calculated during planning run. . There are different methods of calculating safety stock.
    Target Days´ Supply D :- The safety stock defined in number of days appears based on SNP master data in APO.
    Target Stock Level TXT :- Get calculated by macro  based on Target Days´ Supply D and total demand in future.
    ATD Receipts TXT :- Mainly used for Deployment.
    ATD Issues TXT :- Mainly used for Deployment
    If you require any specific information for any key figure please do let me know.
    I hope this will be useful for you.
    Thanks
    Amol

Maybe you are looking for