Help on /SAPAPO/PPM_CALC

hi everyone
I want to implement the above BADI in order to remove the Splits from the PP/DS Model when the conversion to the SNP Model occurs.
If Splits exist in the SNP Model they multiply the standard Capacity Requirements for a material by the Number of Splits.  This is not correct, therefore, Splits must be removed from the SNP Model.
Can you please tell me how to proceed further with this

@RELATIVE("AllDept",0) will return only the children of "AllDept"
If you want to include "AllDept" then modify the script as below:
FIX(FY12,&CurMnth,@IDESCENDANTS("AllDept"))
Expense;
Merging Expenses = Expense - Department3 -> Account4;
ENDFIX;
KosuruS

Similar Messages

  • Help to /sapapo/cull_rto_del

    Hi experts,
    Where do I see the results about /sapapo/cull_rto_del  execution when I execute It in background mode.
    The log only shows the message log is "PDS to material 99999999 in XXXXX version will be prepared to eliminate" and "PDS will be eliminate if no entry exists contradictory".
    How I eliminated many entries (around 20.000) I need see the results.
    Thanks,
    Rolim de Camargo Souto Junior

    Dipankar
    Thanks for your information. I this case I already filled the source of supply with product and location .
    Your information and the others could help me.
    best regards,
    Rolim

  • Implementing a BADI user exit

    Hi
    I am totally new to BADI's. Now I have a specific requirement in which I need to implement BADI User Exit /SAPAPO/PPM_CALC. Method  =  CALC_BUCKET_CONS. 
    In the User Exit, remove the Splits from the PP/DS Model when the conversion to the SNP Model occurs
    Can you please guide me how to proceed briefly.. points for all helpful answers

    Hi
    Following Steps:
    1. Execute Business Add-In(BADI) transaction SE18
    2. Enter BADI name i.e. BADI_MATERIAL_CHECK and press the display
    button
    3. Select menu option Implementation->Create
    4. Give implementation a name such as Z_BADI_MATERIAL_CHECK
    5. You can now make any changes you require to the BADI within this
    implementation, for example choose the Interface tab
    6. Double click on the method you want to change, you can now enter
    any code you require.
    7. Please note to find out what import and export parameters a
    method has got return the original BADI definition
    (i.e. BADI_MATERIAL_CHECK) and double click on the method name
    for example within BADI_MATERIAL_CHECK contract is a method
    8. When changes have been made activate the implementation
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    <b>good link to understand and work</b>
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
    http://support.sas.com/rnd/papers/sugi30/SAP.ppt
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://members.aol.com/_ht_a/skarkada/sap/
    http://www.ct-software.com/reportpool_frame.htm
    http://www.saphelp.com/SAP_Technical.htm
    http://www.kabai.com/abaps/q.htm
    http://www.guidancetech.com/people/holland/sap/abap/
    http://www.planetsap.com/download_abap_programs.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    /people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
    /people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
    http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
    http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
    http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
    check this links are u can easily to work .............
    look second highlighted document is good.
    if its useful reward me .
    thanks
    suresh

  • SNP PPM Generation from PPDS PPM - Time less than 1 sec. in snp bucket con

    Dear All,
    Request immediate help .
    (a) My PPDS PPM have time elements less than 1 seconds towards processing time and there are operations without a set up time .
    (b) While converting such a PPM PPM into an SNP PPM I get an error of bucket consumption as SNP cannot convert less than 1 second into a daily bucket .
    (c) I have to maintain the base qty in BOM and Routing as 1 unit hence cannot increase the same .
    (d) Is there a way in which SNP PPM can be generated from a PPDS PPM wherein the PPDS PPM has only a processing time of 1 second and no set up time .
    (e) Infact I have tried to convert the PPDS PPM with a time of 1.5 seconds but now I have lot of products where the routing suggests a processing of less than 1second and no set up . This is leading to a PPDS PPM of time less than 1 second and SNP PPM is not getting generated as guess it cannot convert a PPDS PPM with less than 1.5 seconds in a day .
    Would appreciate a quick response .
    Thanks and Best Regards ,
    Prashant Kumar

    Hi
    Firstly, can I ask why the base unit has to be 1, this seems a strange restriction?
    If it has to be, then two possible solutions:
    1) In the CIF enhancement CIFPPM01 you could multiply all values by, for example, 100 to give you larger values in the PP/DS PPM in APO and hence of a size that SNP conversion can cope with.
    2) In one of the BADI's /sapapo/ppm_calc or /sapapo/ppm_gen you can do the same conversion factor if the PP/DS PPM has to also be 1 unit.
    Hope this helps
    Ian

  • Delivery day at customer are changing very often

    Hello,
    In our case for customer collaboration SNC5.1, the customer can receive the products on Tuesday and friday so we have assigned the time stream calendar according to this.
    Our requirement is such that sometimes customer wants the products to be shipped only on Thursday.
    so do we need to make another time stream ca;endar and assign it to location.
    Is there any way to tackle this scenario.
    Regards,
    Vaibhav Virkud

    Hi Vaibhav
    Check the below thread, it should help you
    /SAPAPO/LOC3 Shipping Calendar
    If you are completely aware of the dates, during which customer requests on thursday.
    You can manually change the periods in your shipping calendar, the fixed check box will not allow any automatic changes to the manually changed periods
    /n/sapapo/calendar, Tab Periods
    In this way you can avoid the two calendars...
    Regards
    Vinod

  • Determine Block Number at Save

    Hi Gurus,
    we'are tryning to determine the block numbers for a specified resource into Tcode /sapapo/res01
    ( Block planning / Create Blocks / Insert Blocks)
    We only found one BADI that could help us : /SAPAPO/MC01_BLK ,  method BLOCK_CHANGES_PUBLISH.
    But this method doesn't allow any Block number change.
    Checking the standard code, we noticed an interesting form :
    in Include /SAPAPO/LMC01_RULF99  , perform propose_blocknr_from_user ,
    its parameters correspond to want we want to modify but its code is empty, it only contains following comments :
    * from here, a block number can be set by from a customer
    * enhancement (modification, by now)
    * In order to activate, above Form propose_blocknr_for_line,
    * set global variable gb_blocknr_active = 'X',
    * and enter customer specific coding in order to determine the
    * block number below.
    * implement customer-specific functionality to determine
    * new block numbers here (as a modification).
    * Write new block number into CC_BLOCKNR.
    * Use LC_RESID as internal ID for ressource,
    * and LC_SIMVERSID as internal ID for planning version,
    * if required.
    * Also, some methods of class /SAPAPO/CL_TMC01TB may
    * be helpful in order to determine new block numbers
    * (like method BLOCKNR_IS_UNIQUE)
    Do we have to modify the standard code in this perform, or is there another method to determine block numbering among project specific rules ?
    Thanks' in advance for responding !

    hi Romain
    Block numbers to be generated automatically. This is not a standard functionality. Based on the customer requirement we  activating the user exit /SAPAPO/LMC01_RULF99.
    for every Location and resource we specified a number range
    for Block ID
    User Exit - /SAPAPO/LMC01_RULF99 is implemented to achieve the  Generation of block number automatically.  It is implemented in the Function Pool  /SAPAPO/MC01_RUL Formulate Rules Using Characterisics, inside the sub program /SAPAPO/LMC01_RULF05.
    Read the table gt_tmc01tr with key component id and Block id.
    In the subroutine propose_blocknr allows automatic determination of a block number for a newly created block by user enhancement. Using the method /sapapo/cl_mc01_vrs=>componentid_unfold get the resource id and version id, because the action to be performed only on a Active version. Now, call the /sapapo/cl_tmc01tb=>blockid_2_blocknr to get the old block numbers, so that it does not get disturbed. Call the method /sapapo/cl_tmc01tb=>blocknr_is_unique
    To have a block number which is unique.
         Now, block number is generated using the following procedure. Initially check if any block number is already exists or not. If not, proceed further by calling the function module MMRP_RESID_2_RESNAME for getting the resource name and id. Split the resource at u2018_u2019 and get the location number. Get the Number range from the block number range table zao_blk_num_ran( custom table which stores location , resource & number range). Check for the location number and Resource exists in the table, if it matches then call the function module: NUMBER_GET_NEXT to generate an unique number for each block.
         Now, to specify the range, ZAO_BLOCK ( custom object)is created in SNUM transaction.
    After generating the number the exit /SAPAPO/LMC01_RULO15 is used to display them.
    In the standard code, a line has been deleted and a new line is added to make the block number in display mode.
    Hope this information helpas you
    please feel free to ask furthur doubt
    regards
    Vaibhav sareen
    Edited by: vaibhav sareen on Jul 3, 2009 2:23 PM

  • BADI /SAPAPO/AM_ALERTLIST - How to fill values in new field catalogue

    Hi,
    I need some help for passing values into the field Catalog of an ALERT Monitor.
    The requirement is to add new fields in the ALERT Monitor and then populate them with values form the PRODUCT view.
    I have implemented method MODIFY_ALERTLIST of BADI /SAPAPO/AM_ALERTLIST. I am able to add the new columns but I am unable to add the values. Actually while debugging i found that even though the NEW values are going into the table T_ALERTS, but the space between the New Added values and the original value is HUGE. Therefore when the Field Catalog is displayed in the Alert Monitor, the NEW Values are not shown.
    I am attaching my Code
      DATA: l_table_ref TYPE REF TO data,
      l_table_ref_1 TYPE REF TO data,
      l_fieldcat_str TYPE /sapapo/am_aot_fieldcat_str,
      ls_fieldcat TYPE LINE OF lvc_t_fcat,
      ls_t_fieldcat LIKE LINE OF t_fieldcat,
      l_alert_str TYPE LINE OF /sapapo/alert_tab,
      l_str_ref TYPE REF TO data,
      l_str_ref_1 TYPE REF TO data.
      FIELD-SYMBOLS: <aot_tab> TYPE STANDARD TABLE,
      <aot_tab_1> TYPE STANDARD TABLE,
      <alert_str> TYPE /sapapo/alert_str,
      <aot_str> TYPE ANY,
      <alert_str1> TYPE c,
      <alert_str_uc> TYPE c.
      FIELD-SYMBOLS: <zat103> TYPE c. "ANY.
      DATA : l_col_pos TYPE i,
      gv_entries TYPE i,
      xlength TYPE i.
      FIELD-SYMBOLS : <info> TYPE ANY,
                      <aot_str1> TYPE ANY.
      DATA olen1 TYPE i.
      DATA: t_pegid TYPE STANDARD TABLE OF /sapapo/amopegid_tab,
            t_ordid TYPE STANDARD TABLE OF /sapapo/amoordid_tab.
      CLEAR: l_alert_str,
        l_table_ref ,
        l_table_ref_1 ,
        l_fieldcat_str ,
        ls_fieldcat ,
        ls_t_fieldcat ,
        l_str_ref  .
    *Add new column
      READ TABLE t_fieldcat INTO ls_t_fieldcat INDEX 1.
      DATA: x1 TYPE lvc_t_fcat,
           y1 LIKE LINE OF x1.
      x1 = ls_t_fieldcat-fieldcat.
      LOOP AT x1 INTO y1 WHERE reptext NE space.
        CHECK y1-fieldname NE 'DELIVERY_DATE'.
        xlength = xlength + y1-intlen.
      ENDLOOP.
      DESCRIBE TABLE  x1 LINES gv_entries.
    Appending Delivery Date
      ls_fieldcat-col_pos = gv_entries + 1.
      ls_fieldcat-fieldname = 'DELIVERY_DATE'.
      ls_fieldcat-ifieldname = 'DELIVERY_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Delivery Date'.
      ls_fieldcat-outputlen = '10'.
    ls_fieldcat-rollname = '/SAPAPO/DELIVERY_DATE' . "'DATS'.
      ls_fieldcat-domname = '/SAPAPO/CHAR20'."'/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Delivery Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Start Date
      ls_fieldcat-col_pos = gv_entries + 2.
      ls_fieldcat-fieldname = 'STARTDAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Start Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Start Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Required Shelf Life Date
      ls_fieldcat-col_pos = gv_entries + 3.
      ls_fieldcat-fieldname = 'SL_MIN_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req.SL dte'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req.SL dte'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Shelf Life Date/Required Maximum Shelf life Date
      ls_fieldcat-col_pos = gv_entries + 4.
      ls_fieldcat-fieldname = 'SL_MAX_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'SL Date 2'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'SL Date 2'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending (Availability/Requirements) Date of a Schedule Line
      ls_fieldcat-col_pos = gv_entries + 5.
      ls_fieldcat-fieldname = 'AVL_REQ_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Schedule Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Schedule Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Req Date/ Shipment end date
      ls_fieldcat-col_pos = gv_entries + 6.
      ls_fieldcat-fieldname = 'SHIP_MAX_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req Date/ Shipment end date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req Date/ Shipment end date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Expected Grading Date
      ls_fieldcat-col_pos = gv_entries + 7.
      ls_fieldcat-fieldname = 'GRAD_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Expected Grading Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Expected Grading Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Available Date
      ls_fieldcat-col_pos = gv_entries + 8.
      ls_fieldcat-fieldname = 'AVAIL_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Available Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Available Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
      MODIFY TABLE t_fieldcat FROM ls_t_fieldcat.
      DATA lvc_t_fcat TYPE lvc_t_fcat.
    *CODE FOR ADDING THE NEW VALUES*
    ASSIGN Alert Structure to Field Symbols for Unicode
      ASSIGN COMPONENT 0 OF STRUCTURE l_alert_str
                         TO            <alert_str>           CASTING.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ls_t_fieldcat-fieldcat
        IMPORTING
          ep_table        = l_table_ref.
    *assign dynamic structure
      ASSIGN l_table_ref->* TO <aot_tab>.
      CREATE DATA l_str_ref LIKE LINE OF <aot_tab>.
      ASSIGN l_str_ref->* TO <aot_str>.
      ASSIGN l_str_ref->* TO <alert_str_uc> CASTING.
      LOOP AT t_alerts INTO l_alert_str.
       READ TABLE t_fieldcat WITH KEY aot = l_alert_str-aot
       INTO l_fieldcat_str.
       CALL FUNCTION '/SAPAPO/ATAB_FIELDCAT_GET'
         EXPORTING
           aot        = l_fieldcat_str-aot
           mview      = l_fieldcat_str-mview
         IMPORTING
           table_ref  = l_table_ref
           t_fieldcat = lvc_t_fcat.
        ASSIGN l_alert_str TO <alert_str>.
    *copy alert to aot-specific structure
        MOVE <alert_str>-info TO <alert_str_uc>.
    *Write this code inside the loop
        ASSIGN COMPONENT 'DELIVERY_DATE' OF STRUCTURE <aot_str> TO <zat103>.  "CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'STARTDAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MIN_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MAX_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVL_REQ_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SHIP_MAX_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'GRAD_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVAIL_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        MOVE <alert_str_uc> TO <alert_str>-info.
        MODIFY t_alerts FROM l_alert_str INDEX sy-tabix.
        CLEAR : <alert_str>, <alert_str_uc>.
      ENDLOOP.
    I have even tried Concatenating Values,  with that method even though the NEW Values are available but they do not fall under the correct Column.
    PLEASE help me out cos I am really Stuck.
    Regards
    Abhishek Sahi

    Hi,
    I need some help for passing values into the field Catalog of an ALERT Monitor.
    The requirement is to add new fields in the ALERT Monitor and then populate them with values form the PRODUCT view.
    I have implemented method MODIFY_ALERTLIST of BADI /SAPAPO/AM_ALERTLIST. I am able to add the new columns but I am unable to add the values. Actually while debugging i found that even though the NEW values are going into the table T_ALERTS, but the space between the New Added values and the original value is HUGE. Therefore when the Field Catalog is displayed in the Alert Monitor, the NEW Values are not shown.
    I am attaching my Code
      DATA: l_table_ref TYPE REF TO data,
      l_table_ref_1 TYPE REF TO data,
      l_fieldcat_str TYPE /sapapo/am_aot_fieldcat_str,
      ls_fieldcat TYPE LINE OF lvc_t_fcat,
      ls_t_fieldcat LIKE LINE OF t_fieldcat,
      l_alert_str TYPE LINE OF /sapapo/alert_tab,
      l_str_ref TYPE REF TO data,
      l_str_ref_1 TYPE REF TO data.
      FIELD-SYMBOLS: <aot_tab> TYPE STANDARD TABLE,
      <aot_tab_1> TYPE STANDARD TABLE,
      <alert_str> TYPE /sapapo/alert_str,
      <aot_str> TYPE ANY,
      <alert_str1> TYPE c,
      <alert_str_uc> TYPE c.
      FIELD-SYMBOLS: <zat103> TYPE c. "ANY.
      DATA : l_col_pos TYPE i,
      gv_entries TYPE i,
      xlength TYPE i.
      FIELD-SYMBOLS : <info> TYPE ANY,
                      <aot_str1> TYPE ANY.
      DATA olen1 TYPE i.
      DATA: t_pegid TYPE STANDARD TABLE OF /sapapo/amopegid_tab,
            t_ordid TYPE STANDARD TABLE OF /sapapo/amoordid_tab.
      CLEAR: l_alert_str,
        l_table_ref ,
        l_table_ref_1 ,
        l_fieldcat_str ,
        ls_fieldcat ,
        ls_t_fieldcat ,
        l_str_ref  .
    *Add new column
      READ TABLE t_fieldcat INTO ls_t_fieldcat INDEX 1.
      DATA: x1 TYPE lvc_t_fcat,
           y1 LIKE LINE OF x1.
      x1 = ls_t_fieldcat-fieldcat.
      LOOP AT x1 INTO y1 WHERE reptext NE space.
        CHECK y1-fieldname NE 'DELIVERY_DATE'.
        xlength = xlength + y1-intlen.
      ENDLOOP.
      DESCRIBE TABLE  x1 LINES gv_entries.
    Appending Delivery Date
      ls_fieldcat-col_pos = gv_entries + 1.
      ls_fieldcat-fieldname = 'DELIVERY_DATE'.
      ls_fieldcat-ifieldname = 'DELIVERY_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Delivery Date'.
      ls_fieldcat-outputlen = '10'.
    ls_fieldcat-rollname = '/SAPAPO/DELIVERY_DATE' . "'DATS'.
      ls_fieldcat-domname = '/SAPAPO/CHAR20'."'/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Delivery Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Start Date
      ls_fieldcat-col_pos = gv_entries + 2.
      ls_fieldcat-fieldname = 'STARTDAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Start Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Start Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Required Shelf Life Date
      ls_fieldcat-col_pos = gv_entries + 3.
      ls_fieldcat-fieldname = 'SL_MIN_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req.SL dte'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req.SL dte'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Shelf Life Date/Required Maximum Shelf life Date
      ls_fieldcat-col_pos = gv_entries + 4.
      ls_fieldcat-fieldname = 'SL_MAX_DAT'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'SL Date 2'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'SL Date 2'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending (Availability/Requirements) Date of a Schedule Line
      ls_fieldcat-col_pos = gv_entries + 5.
      ls_fieldcat-fieldname = 'AVL_REQ_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Schedule Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Schedule Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Req Date/ Shipment end date
      ls_fieldcat-col_pos = gv_entries + 6.
      ls_fieldcat-fieldname = 'SHIP_MAX_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Req Date/ Shipment end date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Req Date/ Shipment end date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Expected Grading Date
      ls_fieldcat-col_pos = gv_entries + 7.
      ls_fieldcat-fieldname = 'GRAD_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Expected Grading Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Expected Grading Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
    Appending Available Date
      ls_fieldcat-col_pos = gv_entries + 8.
      ls_fieldcat-fieldname = 'AVAIL_DATE'.
      ls_fieldcat-tabname = '1'.
      ls_fieldcat-seltext = 'Available Date'.
      ls_fieldcat-outputlen = '10'.
      ls_fieldcat-rollname = 'DATS'.
      ls_fieldcat-domname = '/SAPAPO/DATUM'.
      ls_fieldcat-coltext = 'Available Date'.
      APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.
      MODIFY TABLE t_fieldcat FROM ls_t_fieldcat.
      DATA lvc_t_fcat TYPE lvc_t_fcat.
    *CODE FOR ADDING THE NEW VALUES*
    ASSIGN Alert Structure to Field Symbols for Unicode
      ASSIGN COMPONENT 0 OF STRUCTURE l_alert_str
                         TO            <alert_str>           CASTING.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ls_t_fieldcat-fieldcat
        IMPORTING
          ep_table        = l_table_ref.
    *assign dynamic structure
      ASSIGN l_table_ref->* TO <aot_tab>.
      CREATE DATA l_str_ref LIKE LINE OF <aot_tab>.
      ASSIGN l_str_ref->* TO <aot_str>.
      ASSIGN l_str_ref->* TO <alert_str_uc> CASTING.
      LOOP AT t_alerts INTO l_alert_str.
       READ TABLE t_fieldcat WITH KEY aot = l_alert_str-aot
       INTO l_fieldcat_str.
       CALL FUNCTION '/SAPAPO/ATAB_FIELDCAT_GET'
         EXPORTING
           aot        = l_fieldcat_str-aot
           mview      = l_fieldcat_str-mview
         IMPORTING
           table_ref  = l_table_ref
           t_fieldcat = lvc_t_fcat.
        ASSIGN l_alert_str TO <alert_str>.
    *copy alert to aot-specific structure
        MOVE <alert_str>-info TO <alert_str_uc>.
    *Write this code inside the loop
        ASSIGN COMPONENT 'DELIVERY_DATE' OF STRUCTURE <aot_str> TO <zat103>.  "CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'STARTDAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MIN_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SL_MAX_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVL_REQ_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'SHIP_MAX_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'GRAD_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        ASSIGN COMPONENT 'AVAIL_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.
        IF sy-subrc = 0.
          CLEAR <zat103>.
    *Fetch ur own custom value and move to the field symbol. This
    *dynamically populates ur structure.
          <zat103> = '22.11.1999'.
        ENDIF.
        MOVE <alert_str_uc> TO <alert_str>-info.
        MODIFY t_alerts FROM l_alert_str INDEX sy-tabix.
        CLEAR : <alert_str>, <alert_str_uc>.
      ENDLOOP.
    I have even tried Concatenating Values,  with that method even though the NEW Values are available but they do not fall under the correct Column.
    PLEASE help me out cos I am really Stuck.
    Regards
    Abhishek Sahi

  • /SAPAPO/SDRQCR21 program is not working correctly if we run the program for range of material and plant wise

    Hi APO Experts,
    In our project, we have received more sales order inconsistencies which is not clearing by CCR program and it is clearing by  program /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow, So We have decided to schedule the background job on daily basis for program /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow, performing the testing in our quality system and observed the below strange behavior. 
    When I am running the program /SAPAPO/SDRQCR21 with Range of products and some location range with option as Build Reqmts from Doc. Flow, in Background job. In output it is suggesting to delete one sales order. If I checked that Sales order in ECC, it is for an different location, that is not part of my selection and the order is open. In MD04 the Qty is showing 1 ( as per sales order) but in APO RRP3 view the order qty is showing Zero. I have run the CCR, it is coming in different in content and if I push, the different is not going to APO.
    I have tried running the program /SAPAPO/SDRQCR21 with plant which is mentioned in that sales order with option as Build Reqmts from Doc. Flow, in Background job , it is suggesting this sales order under update option correctly.   
    Can you please help me understand why it is behaving differently like the location is not part of my selection and why it is suggesting the wrong action. And also whether is it advisable to run the /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow at plant range and material range in background job.
    Thanks & Regards,
    Sundaram Radhakrishnan

    Sundaram,
    It sounds to me like the sales document records in the OLTP and in APO were created at different times.  This is common in Dev and Qual environments when the systems are commonly created at two different times, and each was a copy of an existing system that contained sales data.  The order number you see in //rrp3 is somewhat irrelevant; system generally uses the guid for many activities.
    FYI during Dev and Qual refreshes, if you are copying from a production environment that contains data, it is always best to create the OLTP and SCM images at the same time, and to copy them both to the Dev and Qual systems at the same time.  If you don't do this, you are faced with the additional tasks associated with getting the copied systems back into synch.
    If this is Dev or Qual, I suggest that you just completely wipe out all sales orders in APO and rebuild them using the CIF.
    If this is a mature production environment, the only time I have ever seen this issue is due to improperly created CIF enhancements.  Speak to your developers to find the root cause, and correct this problem.  Then, wipe out all sales orders and rebuild with CIF.
    Best Regards,
    DB49

  • Sales orders in /SAPAPO/RRP3

    Colleagues,
    I have a question regarding the display of sales orders/deliveries within the transaction /SAPAPO/RRP3.  We are currently utilising SCM7.0 and my question realtes to the following process.
    1. Sales orders are created in ECC and transferred to APO
    2. Sales orders are visible within the ransaction /SAPAPO/RRP3, with the quantity and dates being the same as the sales order
    3. Deliveries are created from the sales order in ECC and transferred to APO
    4. Deliveries are transferred to APO and also visible within the transaction /SAPAPO/RRP same date and quanity.
    My quesition is should both the Sales order and delivery be visible within the transaction /SAPAPO/RRP3, the sales order exists with zero quantity and the delivery exists with the correct quntity and date.
    I cannot find any key completion erors, or inconsistency messages in any of the logs.
    Regards
    Paul

    Hi ,
    In a simple Full Delivery scenario, you will only see a delivery for a sales order in /sapapo/rrp3 and the corresponding Sales Order will not be seen once a delivery is created. But in case you have multiple schedule lines(Delivery Proposal) and partial deliveries are allowed, you will still see the sales order and the delivery.
    Let's say you have a Sales Order with confirmation situation like below
                                                                                    Req.Qty              Conf Qty              Req.Dt     Conf.Dt
    example, Sales Order 100034/0010/001          100                       0                          05/13    
                   Sales Order 100034/0010/002                                      50                                         05/17
                   Sales Order 100034/0010/003                                      50                                         05/18
    This will look something like this in RRP3(assuming transit, pick/pack, load equals zero)
    05/13        100034/0010/001          100-       0
    05/17        100034/0010/002            0         50
    05/18        100034/0010/003            0         50
    05/13        100034/0010/001                 100-       0
    05/17        Delivery#/0010                       0         50
    05/18        100034/0010/003                   0         50
    If a delivery is created for first confirmed schedule line, you will see the sales order first schedule replaced by the delivery like shown above.
    If you don't see this behavior and if you suspect some inconsistencies, try running CCR report with Sales Orders.
    Hope it helps.
    Regards
    Mohan
    Edited by: V R Mohan  Chunchu on May 14, 2010 7:33 PM

  • Report "/SAPAPO/TS_BATCH_RUN"  ????

    Hi All,
    Can someone tell why the report "/SAPAPO/TS_BATCH_RUN" is used and what are the prerequisites before we execute this report.??
    Regards,
    Chandan

    Dear Chandan,
    with this report the macros are executed in mass processing.
    At first you should create an activity (Prerequisite: You have already defined a planning book and a data view) in customizing for Demand Planning.
    Afterwards create a planning job in transaction /SAPAPO/MC8D and schedule this planning job in transaction /SAPAPO/MC8G.
    In  the report /SAPAPO/TS_BATCH_RUN, the program process each step.
    I hope these informations can help you further.
    Regards,
    Tibor

  • /SAPAPO/VERSION_COPY job getting cancelled

    Hi,
    Whenever we schedule the /SAPAPO/VERSION_COPY job for copying versions, it terminate swith the below dump:
    TSV_TNEW_BLOCKS_NO_ROLL_MEMORY.
    ztta/roll_area is currently set to 6.5 GB, standard recommendation for AIX.
    If we increase this, would there be any other parameters that need to be modified.
    Pls. help.
    Thanks,
    Saba.

    Hi,
    Better create an OSS message.

  • 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

  • APO Planning Calendar error /SAPAPO/CAL404

    Hello friends, I am working in the transaction /sapapo/calendar trying to change a Planning Calendar and when I try to Calculate the periods in the view "Calculation Rule" i got a error message saying: Factory calendar TU not found (message number  /SAPAPO/CAL404).
    I have looked into SCAL transaction and the factory calendar is OK created and valid.
    Thank you very much in advance.
    Regards.
    Ricardo Pereira

    Hello Senthil,
    Thank you for your help!!
    In the Time Stream I have changed the field Factory Calendar for another one for testing and it worked well, I mean I could caculate the periods using another calendar. Comparing both It's all the same there is no difference beteween them.
    But when I put the one that I really have to use (the correct one) in the time stream it gives the message Calendar not found. Although it exists and appears in the match code and If I get in the SCAL in APO as well as in R/3 I can edit it.
    I have checked the calendar parameters in SCAL and also the time zone including in one of the locations that use this time stream and it's all fine.
    Do you have any other idea?
    :O(
    Thank you very much indeed.
    Regards.
    Ricardo

  • Error while activating POS - Message /SAPAPO/TSM154

    Hi,
    We have installed SCM 2007 in our landscape recently. We are facing problem in Activating the standard POS objects like 9ADPBAS, 9ASNPBAS etc., we get error as " Planning Object Structure is invalid".
    We tried to create a new MPOS in the system, but can not activate the same. We get error message /SAPAPO/TSM154. In Service Marketplace we have a note 1152453 for this kind of error, but while implementing we again get error stating "Cannot be implemented". Diagonsis states " SAP Note does not contain valid correction instructions".
    Have anyone faced similar problems? Please help us out.
    Thanks,
    Rajesh Manoharan

    Hi,
    Thanks for the reply.
    I tried to use the report "/SAPAPO/TS_PSTRU_GEN" to check, but it gives Generation Error when I run it. No diagonsis attached to that error.
    When I tried to use the transaction and check for inconsistency, it says the POS is not active.
    Please give me more pointers to check.
    Regards,
    Rajesh Manoharan

  • Error while running background deployment, program /SAPAPO/RMSDPDEP

    Hi all,
    For the second time in 3 months, I encounter this strange error while running a daily background deployment job, using program /SAPAPO/RMSDPDEP.
    The job starts correctly and does a part of its job, but then interrupt with this message in the job log :
      -->  "no valid simulation guid"  (class SAPAPO/OM_TS, n° 101)
      -->  "Unknown error"  (class SAPAPO/OM, n° 100)
      -->  "Job cancelled  after system exception ERROR_MESSAGE"  (class 00, n° 564)
    I just can't find any clue about what causes the problem...
    Did anyone encounter that kind of difficulties before ? Any help would be usefull...
    Thanks !
    Fabrice

    Hi Siva,
    In this range of time, I effectively run 13 parallel deployment jobs, as follow :
    n° 1, 2, 3, 4 and 5 : same location (factory 1) and each treats a products selection
    n° 6, 7, 8, 9 and 10 : same location (factory 2) and each treats a products selection
    n° 11 : all products of factory 3
    n° 12 : all products of factory 4
    n° 13 : all products of factory 5
    A product can only be produced in a single location, so there might not have access concurencies during parallel jobs. Do you think it could be some kind of a technical problem (not enough process available ?). Note that the problem can't come from CPU, we use CPU auto-allocation, and it works well.
    What do you think ?
    Thanks
    Fabrice

Maybe you are looking for

  • Y470 driver Windows 8 Problems

    - I can't install audio driver for windows 8 64 bit - I can't use adjust fan function

  • Font problem in Crystal report printing

    Post Author: chandansingh CA Forum: Exporting i am using CR 10.0 and .net 2.0 framework. In my report i am using unicode fonts(mangal,arial). Records in Crystal reports are of both font type but when i printing this report it shows only arial font re

  • Connect a ps3 to imac 27 i5 mid 2011

    How to connect PS3 to Imac I5 27 Mid 2011

  • Movie not recording in QT with isight cam

    Hi all, My isight is properly connected to my G4 MDD via firewire port. I get this message trying to save my movie clip," Recording failed because no data was received. Make sure media input is turned on and playing." My iSight is connected and worki

  • Calling Form on another Database

    Hi What would be the best method to open a form in a different application, on a different instance (same DB version - 10g2)? Would it not be logical for the Open_Form to have username, password, and connect string parameters along with the 'session'