Split SNP PDS using BADI /SAPAPO/CURTO_SNP Method CIF_IMPORT

Hello APO ABAP experts,
The requirement is to split SNP PDS based on the number of modes. Meaning, the PDS should have only Mode per Activity in the Operations.
My plan was to change the changing internal tables in the method CIF_IMPORT to create number of SNP PDS depending up on Modes. But, i am not sure whether it is possible or not. Please suggest.
Note: BADI will be triggered once per each PDS.
Thanks,
Shaun.

Saurabh,
Let me explain you what i am doing:
Since i need to split one PDS into multiple PDS, I am changing the fields EXT_PLANNR and EXT_NAME just by appending a counter. Once after i change them, adding the entries to the changing internal tables (CT_*). At the end of CIF_IMPORT, i am deleting the original PDS entries.
Example code:
  LOOP AT ct_planactz INTO ls_planactz.
    ls_planactz-ext_plannr = lv_new_ext_plannr.
    APPEND ls_planactz TO lt_planactz.
  ENDLOOP.
  APPEND LINES OF lt_planactz TO ct_planactz.
Right now, for testing purpose - i am not splitting the PDS. I am just trying to create 2 SNP PDS by using one PDS. I want to test my code first to create multiple PDS.
When doing this, i get the following error:
Error: Activity 250006007010001-012 000600000004 P  does not exist
Message no. /SAPAPO/CURTO005
Piece of standard code cuasing the problem:
LN 64 in method GET_APO_GUIDS.
    READ TABLE ct_cif_planactz INTO ls_cif_planactz
              WITH KEY actnr   = ls_apo_planactz-r3actnr
                       plnkn   = ls_apo_planactz-plnkn
                       zaehl   = ls_apo_planactz-zaehl
                       phasenr = ls_apo_planactz-phasenr
                       uvorn   = ls_apo_planactz-uvorn
              BINARY SEARCH.
Call stack:
METHOD     GET_APO_GUIDS
METHOD     CREATE_RTO
METHOD     CREATE_SNP_RTO
FUNCTION     /SAPAPO/CUSLNTRTO_CREATE_RTO
Question:
May i know what is the significance of other fields in internal table ct_cif_planactz ? Since i am chaning only EXT_PLANNR field, above binary search is picking up the same entries and ignoring my second PDS.
I would appreciate if you can share your ideas.
Thanks,
Shaun.

Similar Messages

  • Use of BADI /SAPAPO/SDP_RELDATA METHOD CHANGE_PROD_LOC

    We have a requirement for a small number of product/locations to re-direct them onto a customer location when releasing the forecasts to SNP.
    We have been pointed in the direction of the BADI /SAPAPO/SDP_RELDATA method CHANGE_PROD_LOC.
    Unfortunately we can not find any documentation on the use of this BADI/Method, we've tried to change the location using the parameter CT_MATID_LOCID, also setting the parameter CV_CHANGE_PROD_LOC where a change has been made, but it doesn't seem to work.
    Has anyone used this BADI/Method and has advice on it's usage?
    Regards, Mark

    Hi Mark - Changing the CT_MATID_LOCID table alone will not associate the change with a plobj or CV. I am surprised you do not get an error. You will also need to update the CT_MATLOC_PLOBJ table - find the entry for the old matid/locid then update that with the new matid/locid. Also the CT_PLOBJ_CHAR table needs to be updated as well - find the same plobj and update matid/locid accordingly.
    Regards
    Andy

  • BADI /SAPAPO/SDP_INTERACT (Method 'DVIEW_DISPLAY_MODE_SET)

    Hi All,
    Is there a way to restrict the planners have both change /display access in 001(sim version) and selected planners to have display only acesss in 000 (active version).
    I went through the BADI /SAPAPO/SDP_INTERACT (Method 'DVIEW_DISPLAY_MODE_SET) info. It says that the display/change mode can be altered for specific users with the user parameter '/SAPAPO/SDP94_D_MODE'/.
    Can this be done?  and if so pls give me the steps to make changes in  BADI and implement it.
    Thanks in advance for your help and support.
    Kind Regards,
    SSP

    Hi,
    You need to give this BADI  /SAPAPO/SDP_INTERACT name to your developer, he / she should be able to imlement and write the code according to your need.
    See OSS note 401830 for parameter id.
    user parameter '/SAPAPO/SDP94_D_MODE'
    Parameter:
    - I (Initial)Started in display mode, switch to change mode possible
    - A (Always)Started in display mode, switch to change mode not possible
    - C (Change)Started in change mode (if the planning book/ data view permits the change mode)
    cheers
    Pavan Verma

  • Hide row in planning book using BADI /SAPAPO/ADVX USER_EXIT_MACRO

    Dear All,
       I would like to have your suggestion how to hide row in planning book using BADI USER_EXIT_MACRO
       the requirement is when I drill down the object by region, the first line will be "total" and the second and third line
       will be region like "north" and "south".
       I want to show only "total" line and hide region detail.
       Would it be possible to do this using the badi USER_EXIT_MACRO?
    Thank you in advance,
    Boonsom

    Hi,
    In the Interactive Planning, you see a Cap-like icon on the top-left...... click on it and choose the characteristic (say, region) and say ok. You will then be able to see the Region just on top of the planning table. When you load the data, by default, it will have "Total" as option, and with your wish, you can choose to see the data for a particular region (North, South etc).
    Regards,
    Guru Charan.

  • Creation of SNP PDS using planned delivery time

    Dear Experts,
    How do i control creation of PDS because of operaion generated from planned delivery time,although planed delivery ime is zero.
    the scenario is as follows:
    Material :XXXXX
    Planned Delivery time
    Procurement Type:E
    Plant:XXXX
    in transaction /sapapo/curto_simu: there are two PDS displayed with PDS usage as PDS for Supply Network Planning(SNP)
    the first one is because of operation generated fromm planned delivery time,output qty is the same a s that maintained as base qty in BOM and mode is blank,activity field is even blank.
    the other PDS is created because of the valid production version in R/3.
    Thanks in advance
    Amrish

    Hi Dutta,
    Thanx for a quick revert.
    Yes we are using reciepe and we have a valid PDS being generated because of Production Version.
    The problem lies with the creation of other PDS from planned delivery time whereinplanned delivery time is zero.I want a resolution so as the system doesnot create thses PDS which are invalid in nature.
    These invalid PDS are hamperring result out of SNp optimizer for the reason these are considered in the input log of optimizer.
    Regards,
    Amrish

  • APO DP - use of BADI /sapapo/sdp_fcst4

    I am wanting to use BADI /sapapo/sdp_fcst4 to store forecast errors in mass processing.
    My question is:
    How do I see/use these stored forecast errors when I am working in interactive DP.
    Thanks,
    Bob Austin, Atos Origin

    Dear Bob
    I suggest you to check this document: to extract the forecasting results from SAP APO
    I also suggest you to look at this [thread: APO DP - BADI for storing forecast error in mass processing.|;
    Best regards,
    Carlos Eduardo Rodríguez

  • APO DP Using BAdI SDP_SELECTOR

    Hi experts,
    I am trying to use BAdI /SAPAPO/SDP_SELECTOR but I can not get any method of it to stop at a breakpoint.
    What I want to implement: By opening a planning book and loading a specific selection profile, some fields in selection shuffler have to be grayed out or become invisible at all. I thought this BAdI could be used for this, but after many attempts I have to give up and ask experts for advise.
    Kind regards
    Aban

    Hi Aban - the method INIT_OBJECT_LIST is called when you load a planning book either by first entering SDP94 or changing planning book while in SDP94. This method allows you to manipoulate what fields will apear as selections depending on the object selected - you can grey out the left side by making a field required but not the values on the right side of the selection. None of the methods are called when creating changing or saving selection profiles - the other methods are called for F4 or after selection is chosen to filter the selected data or to add fields to the selected data ALV. If you want to grey out the values in a selection then you may want to create an enhancement implementation to do so. It sounds like there may be other options to limit what users are doing such as authorization or filtering the selection using the above BADI. Also you may be able to set up profiles users can select that have prepopulated values then train or require users to choose those profiles and add additional criteria.
    Andy

  • How to insert new row in MIGO using badi.

    hi,
    Transaction code: MIGO. i'm using badi "MB_MIGO_BADI" and method "LINE_MODIFY", i want to insert N number of item lines when user entered any production order no. and press enter.
    Notes: production order has only one item line with qty N.
    regards,
    Shahid Rais

    Such a feature is not available, but you could add a key event handler which works its magic when it detects a press on the down arrow key, while the last row is selected. Then you can perform the code to insert a new row.

  • Badi-- ME_PROCESS_PO_CUST, PROCESS_ACCOUNT method

    Hi,
    My requirement is that While Creating PO,if the first four characters of Cost Center and FundsCenter is not equal to Plant then an error message should be raised . For this i used
    Badi>ME_PROCESS_PO_CUST   and Method->PROCESS_ACCOUNT .
    The problem is that  in  PROCESS_ACCOUNT method the parameter IM_ACCOUNT doesn't contain Plant value.
    If I am using PROCESS_ITEM method,in this IM_ITEM is not capturing Fundscenter value.
    Please help in solving the issue. Is  there any User Exit or Badi which gives me Plant,CostCenter,FundsCenter Values.?
    Thanks
    K Srinivas

    Hi,
      You can use same Badi for getting Plant,CostCenter,FundsCenter. what are all values you are not getting for that you use field-symbols. like here for getting Plant value Try these steps.
    1. Press F1 on PO Screen Plant value. Get Program name, screen field structure from that.
    2. declare one variable as field as field-symbols, in badi.
    FIELD-SYMBOLS: <lv_var> type any.
    Assign '((SAPLMEGUI)MEPO1211-NAME1) to <lv_var>.
    Here SAPLMEGUI is Program Name And MEPO1211-NAME1 is field structure of your program screen.
    in <lv_var> you will get the value of plant.
    Same process you can try for other fields also.
    Regards
    Vishnu Gupta

  • BAdi /SAPAPO/SDP_DISTR

    Hello,
    Did anybody used the BAdi /SAPAPO/SDP_DISTR?  Can this be used for defining custom fair share rules in Deployment.
    Please let me know if anybody has used this before and has some insights into this.
    Thanks

    Hi
    I have used BADI /SAPAPO/FS_USER insted of the /SAPAPO/SDP_DISTR for user defined fairshare distribution.
    Regards,
    Raghu.

  • Use of APO BADI /SAPAPO/SNP_ADV_SFT

    I am using APO SNP safety stock planning.
    I want to store the calculated 'demand forecast error' from the safety stock program on a field on the APO product master.
    Is the BADI /SAPAPO/SNP_ADV_SFT suitable for this (method GET_FORECAST_ERROR)?
    Or is there a better approach?
    Thanks for any advice on this...

    Is these products are unique?  If yes, then you can use Location split functionality.

  • Incorrect vendor line splitting using BADI MRM_WT_SPLIT_UPDATE. BADI.

    Hi, gurus !
    Custom MIRO vendor line item splitting implemented throw BADI MRM_WT_SPLIT_UPDATE. BADI is active and called.
    At transaction MIRO we try to imitate invoice posting. I see, that at badi method te_rbvs table is updated correctly. At invoice posting imitation screen incorrect amounts for vendor splitted lines appear.
    At badi call start
    I_RBKPV-H_RBVS
    1               0000     000001     963.99
    TE_RBVS[]
    Initial
    TI_DRSEG
    1     ST          8000     607.02
    2     ST          8000     172.64
    3     ST          8000     49.18
    4     ST          8000     16.02
    5     ST          8000     119.13
    At badi call end
    I_RBKPV-H_RBVS
    1               0000     000001     963.99
    TE_RBVS[]
    1               0000     000001     607.02
    2               0000     000007     172.64
    3               0000     000008     49.18
    4               0000     000009     16.02
    5               0000     000010     119.13
    At imitation screen items appear as follows:
    1     K                    C          607,02-     LTL
    2     S     G          607,02      LTL
    3     S     G          172,64      LTL
    4     S     G          49,18      LTL
    5     S     G          16,02      LTL
    6     S     G          119,13      LTL
    7     K                    C          607,02-     LTL
    8     K                    C          607,02-     LTL
    9     K                    C          607,02-     LTL
    10     K                    C          1.464,09      LTL
    7-10 lines are incorrect.
    Thanks in advance.
    Edited by: Gabtia on Aug 7, 2009 4:00 PM

    Had anyone used BADI MRM_WT_SPLIT_UPDATE succesfuly ?

  • Can we use SNP PDS in Multi level ATP ?

    Hi All,
    We do CTM planning with existing SNP PDS In APO and now we want to explore to use the Multi level ATP functionality for GATP.  I know, MATP can create the ATP trees if the stock is not available and these can be converted into PPDS order.
    My question is, can we use SNP PDS for this purpose?
    Thanks,
    Abhilasha

    Hi Abhilasha,
    There is no such specific mention anywhere in the literature that you cannot use SNP PDS for MATP. The only downside to using SNP PDS is that SNP PDS are meant for mid to long term planning and the activities/operations in SNP PDS are usually not in detail i.e only important activities or bottle neck components are usually used which will not always facilitate detailed scheduling.
    On the other hand MATP creates ATP tree structures by plan exlosion(which can be SNP/PDS) and saves the requirements groups(component requirements of header level) with dates/qts and source of supply. It uses PPDS component to convert these ATP tree structures into PPDS planned orders depending on the conversion horizon/requirements dates. It does that by reading the source of supply, requirements dates and quantities from ATP tree structure and by plan explosion.
    When MATP planned orders are created you should no longer plan them with automatic planning run as that will cause re-explosion of the plan and might cause incorrect down stream requirements if you had had substitutions at component leve during MATP check. In planned orders, you have an option of changing the allowed sources of supply (in source of supply section). But for orders created by MATP, you will not be allowed to change the source of supply field from SNP PDS to PPDS PDS in the planned order because it will re-explode the plan. So you can decide for yourself if you can use SNP PDS as source of supply for PPDS planned orders.
    Hope that answers your question.
    Regards,
    Mohan

  • Changing & deleting the SNP PDS planned order in APO using BAPI

    Hi,
    There is a requirement to consolidate the SNP PDS planned order created from CTM in APO. This is to change one of the SNP PDS planned order by adding the quantities of the other planned order , which is to make it into one & delete the other SNP PDS planned order. Can this be done progrmatically using BAPI?. As we know this cant be changed in RRP3 as the SNP-PDS are uneditable.Please help me on this one. As I need the solution to this ASAP.
    Is there any BAPI/FM using which SNP PDS planned order can be changed? What is the BAPI for PPDS planned order creation / change?
    With thanks & regards,
    Naveen
    Message was edited by: Naveen Srinivasa

    Hi Mariano,
    I have gone through the description of the FM it says:
    This function module is complex and is subject to several technical restrictions. For this reason, you should not use ORDER_CHANGE for extended periods of time.
    The recommended alternatives are:
    OM_ORDER_CREATE
    for creating orders
    OM_ORDER_DELETE
    for deleting orders
    OM_ORDER_MODIFY
    for changing existing order components
    Have you used these FM any time?.Kindly share more details in case is you have used them.
    with thanks & regards,
    Naveen

  • Switch between SNP-PPM and SNP-PDS

    Hi,
    In APO I have both SNP-PPM and SNP-PDS, but right now I am having some trouble with the bucket time from the PDS so I am trying to temporarly change my PDS to PPM.
    My query is:
    - Is there a way in APO to make the SNP-PPM the default production model over theSNP- PDS?
    I was searching for some kind of documentation on this topic and I found that I should change the priority for the PDS throught the PDS_MAINT transaccion in ECC, is this the only way to do it?
    Thank you in advance,
    Fernando

    Hi ,
    SNP heuristics  planning source determination gives first preference to Quota arrangement.
    You may include PDS as a source of supply in the inbound quota arrangement of the product.
    There is a BADI  BAdI /SAPAPO/PWB_SOS to modify the content and the sequence of the sources of supply in the ranking list.
    The normal ranking list for SNP source determonation  is as below:
    Quota arrangements
    Procurement priority
    Procurement costs
    Procurement type
    There are two other BADIs releveant as below:
    u2022        /SAPAPO/CURTO_SNP ) Enhancements When Creating an SNP PDS (R/3) (Generation)
    u2022        /SAPAPO/CULLRTOSNP ) Change SNP/CTM Production Data Structure Data (Generation)
    Hope this gives some options.
    Regards
    Datta

Maybe you are looking for