APO BAPI

Hi All,
   I am working on APO Demand Planning.
I am using the BAPI is BAPI_PBSRVAPS_GETDETAIL2  and the inputs of this BAPI are
1. Planning Book =DP_PLNB
2.Data View=COLLABORATIVE
3. Planning Version=000
4.Selection ID=MAT
5.Period Type:Cor B (C for month and B for week , depence on selection)
6.Date From=08/2007
7.Date To=08/2008
when I give the above inputs to the bapi i am getting perfect data.
When go for the xMII transaction I am giving the same Inputs but when I give the Period Type "C"or "B" I am not able to get the data.
with out the Period Type Input I am getting all the data what ever in the Planning book. But I want only one year data which i can select by weeks or by months.
my Date inputs in xMII are  like below
From Date is xml formata: datefromxmlformat(dateadddays(datenow, -365), "MM/yyyy")
To Date is xml format : datefromxmlformat((datenow), "MM/yyyy")
If any one have an idea on this please reply .
Thanks
Muvva

Hi Muvva,
What does the execution window show as far as errors when you run the transaction?  Are you getting any response data back at all or is the entire response segment empty?  If you are getting some response, there should be a RETURN segment which would contain error messages.  If the response is completely empty, then there is probably a problem with the input data being passed in the Request segment.  The input data is likely causing the entire BAPI to fail on the SAP side of things. 
Please put a couple of tracers after the JCo Interface action block and link the Request Segment to one and the Response segment to the other.  Review the values contained in the two segments and post them here.  Use curly braces and code to allow the xml to be viewed.
And if MAT is really a material number (MATNR), then make sure it has leading zeroes (18 characters total).  Almost all BAPIs need to have their ID numbers ( batch, order, material, etc.) pre-pended with leading zeroes.  Do a search on zero and you will find some helpful topics here discussing this subject.
Good luck,
Mike

Similar Messages

  • APO Bapi - ERROR - No entry found in transportation indicator table for fol

    Hi
    Experts .. need help on a APO bapi
    Iam being doing BAPI for transportation lane to add new material through the bapi BAPI_TRLSRVAPS_SAVEMULTI
    iam passing  the following to BAPI
        Logical system
        model
    and in tables .
        TRANSPORT_LANE
        TRANSPORT_LANEX
        PROD_PROCUREMENT
        PROD_PROCUREMENTX
        LOCATION_FROM    = '1010'.
        LOCTYPE_LOC_FROM = '1001'.   
        LOCATION_TO =   '1101'.
        LOCTYPE_LOC_TO =  '1001'.
    the above data is common for passing all the four bapi tables and in
    addition iam passing
    prod-valfr =  Converted value by passing to FM - IB_CONVERT_INTO_TIMESTAMP.
    prod-valto =  Converted value by passing to FM - IB_CONVERT_INTO_TIMESTAMP.
    prod-product = material number.
    AFter excuteing bapi iam getting an error
    No entry found in transportation indicator table for following objects
    the above error occured when passed the given data to bapi table -  PROD_PROCUREMENT  
    if we pass the data to   PROD_PROCUREMENT and   PROD_PROCUREMENTX
    then there is no error in  table return of bapi but the data is not uploaded in transportation lane.
    I will really appreciate if some guide me where iam wrong or some other solution for this .
    Regards .
    Thanks .

    Hi,
    I am writing bdc code for uploading changing inspection plan data using qp02 . I saw your post in sdn .I think you have solution .can you tell the solution .
    Regards
    Nandan.

  • Use of APO BAPIs

    I am using APO V5.
    I have two questions regarding the use of BAPIs:
    1. For BAPI PlanningBookAPS, what is the scope of this BAPI? Is it time series key figures only, or is it also orders livecache key figures?
    2. Is there a BAPI for reading/writing Notes associated with cells in planning books?
    Thanks,
    Bob Austin

    Hi Sarah,
    Hope all is well with you.
    Do you have any experience of creating notes in this way? I am trying to identify how to relate the note to the planning book cell. I have been debugging the planning book transaction but it is difficult to see where the relationship is.
    I can see my note text in table STXH. STXH-TDNAME seems to be used to store a key which I presume some how relates to the planning book cell?
    Any info would be helpful.
    Thanks
    Gary

  • R/3 to APO!!

    Hi,
    I have a Z-report which needs to call some bapi in APO and pass the data retrieved in R/3 to APO Bapi ....whats the way out?
    bapi to be called in R/3 is BAPI_POSRVAPS_GETLIST3...
    and need to fill my internal table with the data retrieved from this Bapi..
    any pointers?
    Regards
    Gunjan

    HI,
    As per my understanding, you got a clear picture what to do with..
    Ask for the data mapping sheet for the BAPI :"BAPI_POSRVAPS_GETLIST3" from your functional consultant..
    Pass the data retrieved from the R/3 to this BAPI and this BAPI posts the data into APO./.
    There are return tables from the BAPI,, which you can loop and push into your internal table..
    Post us clearly what you need we can help you,
    regards,
    nazeer

  • Question on use of shared memory objects during CIF executions

    We have a CIF that runs in background via program RIMODACT that is invoked from our external job scheduler.  (The schedulere kicks off a job - call it CIFJOB - and the first step of this job executes RIMODACT.)
    During the execution of RIMODACT, we call a BAdI (an implementation of SMOD_APOCF005.)
    In the method of this BAdI, we load some data into a shared memory object each time the BAdI is called. (We create this shared memory object the first time the BAdI is called.)
    After program RIMODACT finishes, the second step of CIFJOB calls a wrapper program that calls two APO BAPI's.  
    Will the shared memory object be available to these BAPIs?
    Reason I'm asking is that the BAPIs execute on the APO app server, but the shared memory object was created in a CIF exit called from a program executing on the ECC server (RIMODACT).
    Edited by: David Halitsky on Feb 20, 2008 3:56 PM

    I know what you're saying, but it doesn't apply in this case (I think.)
    The critical point is that we can tie the batch job to one ECC app server.  In the first step of this job (the one that executes RIMODACT to do the CIF), we build the itab as an attribute of the "root" shared memory object class.
    In the second step of the batch job, we attach to the root class we built in the first step, extract some data from it, and pass these data to a BAPI that we call on the APO server.  (This is what I meant by a "true" RFC - the APO BAPI on the APO server is being called from a program on the ECC server.)
    So the APO BAPI never needs access to the ECC shared memory object - it gets its data passed in from a program on the ECC server that does have access to the shared memory object.
    Restated this way, is the solution correct ???

  • Function module to read/write notes in the planning book

    Hi All,
    Can you guyz tell me the FMs to read / write NOTES in the planning book. Notes as in you can right click on a cell of PB and do display notes.
    win full points for the answer.
    Thanks - Chandan

    Check FM /SAPAPO/MSDP_NOTE_WRITE and Use of APO BAPIs page in SCM Wiki.
    Thanks,
    Somnath

  • BAPI to read and change schedule lines in APO

    Hello experts,
    We want to firm schedule lines inside the firm zone of the APO procurement scheduling agreements with a daily job. For this we are trying to use BAPI BAPI_POSRVAPS_GETLIST3 and BAPI_POSRVAPS_SAVEMULTI3. The getlist one does not return schedule lines, it returns purchase orders and purchase requisitions. Are these the right bapis to read and change schedule lines in APO? or is there anyother one we can use?
    Thanks and regards,
    Ergul

    Hi,
             You can use the below code to read the schedule lines.
    Checking a session exists
        CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
          IMPORTING
            ev_simsession = gv_sims
            es_gen_params = gv_params.
    If not create a new session and read it
        IF gv_sims IS INITIAL.
          CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_CREATE'
            IMPORTING
              ev_simsession = gv_sims.
          CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
            IMPORTING
              ev_simsession = gv_sims
              es_gen_params = gv_params.
          g_cre_chk = 'X'.
        ENDIF.
    CALL FUNCTION '/SAPAPO/CMDS_TPSRC_GET'
        EXPORTING
          iv_ebeln                       = p_l_t_acknh_ebeln
          iv_ebelp                       = p_l_t_acknh_ebelp
        TABLES
          et_tpsrc_all                   = lt_tpsrc
        EXCEPTIONS
          matid_not_found                = 1
          locfrom_not_found              = 2
          locto_not_found                = 3
          scheduling_agreement_not_found = 4
          error_selecting_schedagreement = 5
          OTHERS                         = 6.
      IF sy-subrc = 0.
    reading the scheduling agreement records
        READ TABLE lt_tpsrc INTO ls_tpsrc INDEX 1.
        CALL FUNCTION '/SAPAPO/PWB_BZQID_GET_ORDER'
          EXPORTING
            iv_simid               = '000'
            iv_bzqid               = ls_tpsrc-bzqid
          IMPORTING
            ev_ordid               = lv_iordid
          EXCEPTIONS
            lc_connect_failed      = 1
            no_elements            = 2
            unit_conversion_failed = 3
            OTHERS                 = 4.
        IF sy-subrc = 0.
          CALL FUNCTION '/SAPAPO/PWB_GET_RELATED_ORDERS'
            EXPORTING
              iv_ordid             = lv_iordid
              iv_order_type     = '16'
              iv_simid            = '000'
            IMPORTING
              ev_ordid          = lv_eordid
            EXCEPTIONS
              order_not_found   = 1
              lc_connect_failed = 2
              no_elements       = 3
              OTHERS            = 4.
          IF sy-subrc = 0.
            APPEND lv_eordid TO lt_ordid.
            CALL FUNCTION '/SAPAPO/DM_PO_READ'
              EXPORTING
                iv_simsession     = gv_sims
                is_gen_params     = gv_params
                it_ordid          = lt_ordid
              IMPORTING
                et_schedule       = p_lt_sched
              EXCEPTIONS
                lc_connect_failed = 1
                lc_com_error      = 2
                lc_appl_error     = 3
                OTHERS            = 4.
          ENDIF.
        ENDIF.
      ENDIF.
    Use '/SAPAPO/CMDS_SNP_MM_ORD_MODIFY' function module to change the schedule lines (Pass '16' to iv_order_type parameter).
    Let me know if u have any issues.
    Regards,
    Siva.

  • BAPI Function Module for SCM APO Tcode /SAPAPO/AC42

    Hi,
      I want to know the BAPI Function Modules for SCM APO Tcode /SAPAPO/AC42.
       This BAPI FM should return the column values "Remaining Prod Alloc"  and "Incoming Order Quantity" when we give
       below details as inputs for the Tcode /SAPAPO/AC42
            Product Allocation Group
            Product
            Allocation Procedure
            prod Alloc step
            Product Alloc Object (Characteristics of Product Alloc Group)
            Plant (Characteristics of Product Alloc Group)
            Customer Group 5 (Characteristics of Product Alloc Group)
        Reward points if helpful.
    Thanks,
    Mich

    Hi,
    You should be able to get the information using the standard BAPI (Assuming you are using SCM5.0) BAPI_APOPAL_INSERT in the transaction BAPI.
    ProductAllocationAPO.DataInsert
    Interface to Import Product Allocation Data  Functionality
    This method is used to adopt data from OLTP systems for product allocation in the global availability check.
    You can do the following using the method:
    Adopt new data
    You can adopt new characteristics combinations or new time series. Newly created characteristics combinations have the status Active and are therefore included in the product allocation check.
    Change existing data
    You can overwrite existing data if you have set the interface parameter ALLOW_UPDATE. You can set the status of existing characteristics combinations to Active if you set the interface parameter UPDATE_STATUS. If the characteristics combination does not exist, the system creates it.
    The product allocation quantity is overwritten for existing time series. If you also want to change the incoming orders quantity, you must set the interface parameter UPDATE_INCOMING_ORDER_QTY. If the time series does not exist, the system creates it.
    Prerequisite
    To be able to use this method, you must have made all the Customizing settings for product allocation. For more information, see the Implementation Guide (IMG) for SAP APO under Global Available-to-Promise -> Product Allocation.
    Regards
    Vinod

  • BAPI Function Module for SCM APO Trans code /SAPAPO/AC42

    Hi,
       Is there any BAPI Function Modules for SCM APO Tcode /SAPAPO/AC42.
       This BAPI FM should return the column values "Remaining Prod Alloc"  and "Incoming Order Quantity" when we give
       below details as inputs for the Tcode /SAPAPO/AC42
            Product Allocation Group
            Product
            Allocation Procedure
            prod Alloc step
            Product Alloc Object (Characteristics of Product Alloc Group)
            Plant (Characteristics of Product Alloc Group)
            Customer Group 5 (Characteristics of Product Alloc Group)
        Reward points if helpful.
    Thanks,
    Mich

    Hi,
    You should be able to get the information using the standard BAPI (Assuming you are using SCM5.0) BAPI_APOPAL_INSERT in the transaction BAPI.
    ProductAllocationAPO.DataInsert
    Interface to Import Product Allocation Data  Functionality
    This method is used to adopt data from OLTP systems for product allocation in the global availability check.
    You can do the following using the method:
    Adopt new data
    You can adopt new characteristics combinations or new time series. Newly created characteristics combinations have the status Active and are therefore included in the product allocation check.
    Change existing data
    You can overwrite existing data if you have set the interface parameter ALLOW_UPDATE. You can set the status of existing characteristics combinations to Active if you set the interface parameter UPDATE_STATUS. If the characteristics combination does not exist, the system creates it.
    The product allocation quantity is overwritten for existing time series. If you also want to change the incoming orders quantity, you must set the interface parameter UPDATE_INCOMING_ORDER_QTY. If the time series does not exist, the system creates it.
    Prerequisite
    To be able to use this method, you must have made all the Customizing settings for product allocation. For more information, see the Implementation Guide (IMG) for SAP APO under Global Available-to-Promise -> Product Allocation.
    Regards
    Vinod

  • Table name and  BAPI to view/modify APO Resource capacity profile data

    Please advise the table where the data of APO resource capacity profile stores and BAPI which help to extract and modify the break duration and utlization rate for a resource.
    Steps to view APO resource capacity data
    1. Use transaction /SAPAPO/RES01 and enter as below
    Resource <Resource Name>
    Location XXXX
    Planning Version 000
    2. On the display screen, click button "Capacity Profile" to view the
    data of start, end, break duration and utilizaiton %.
    Appreciate your help!!

    Hi Kurt,
               You can use the below tables/views in which Resource and Capacity Profile related data is stored.
    Tables:
    /SAPAPO/RES_INTQ - Resource Capacity Intervals
    /SAPAPO/RES_INTV - Resource Capacity Intervals
    /SAPAPO/RESCAP - Capacity Profile: Resource Time Capacity
    /SAPAPO/RESDIM - Dimensions and Capacity of a Resource
    /SAPAPO/RESDOWN - Resource Downtime
    /SAPAPO/RESDOWNT - Resource Downtime
    /SAPAPO/RESKEY - Reset Key for Resource to UID
    Views:
    /SAPAPO/V_RESVER- Resource Capacity Variants
    /SAPAPO/VRESINTQ - Resource Interval of Available Capacity Quantity Model
    /SAPAPO/VRESINTR - Resource Interval of Available Capacity Rate Model
    BAPIs available to read:
    BAPI_RSSRVAPS_GETCAPAPRO - Read Resource Capacities Profile
    BAPI_RSSRVAPS_REQUESTCAPAPRO - Query: Selection of Capacities for Resource and Result Transfer
    BAPI_RSSRVAPS_GETLIST - Selection of Resources
    I hope this will help you to get the data which you want to read.
    Regards,
    Saurabh

  • APO DP - use of BAPI PlanningBookAPS

    I am using APO DP V5.
    I am using the standard BAPI PlanningBookAPS to update data in my DP planning area using Method ChangeKeyfigureValue2.
    If I have a successful update, I would expect a 'success' message to be returned by the BAPI, but instead I just have 'no entries' in the RETURN table of the BAPI.
    If I have an unsuccessful update, then the RETURN table includes all the relevant error messages.
    Is there a way of ensuring that a 'success' message is in fact returned?
    Thanks,
    Bob Austin

    Hi Bob - this particular BAPI will only return error messages. If sy-subrc = 0 and return is initial then you had a successful change. There is no way to turn on a success message. There is a BADI in the FM but it happens before the change (at the beginning of the BAPI) and during the error processing (towards the end of the BAPI). Errors that do occur do not stop the processing, each char combo is processed individually so the error messages that you see will be for all of the char combos that have an error. Following this logic, to produce a success message for each char combo that is succesful would create a very large return table.
    Regards
    Andy

  • BAPI to get Planned orders from SNP,PPDS in APO

    Hi Sap Gurus,
    i want to find out a BAPI to fetch the planned orders from SNP,PPDS in APO BY PASSING THE parameters like Resource id ,Start time and End time.

    hi,
    check out this , if u find any new BAPI , just add to this list.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/scm/apo-technical
    regards
    Prabhu

  • BAPI- To Pick DEpendent Demand  in APO

    Hi All,
           I am working in APO-ABAP.I Am Using a Bapi to Get The Dependent demand for a Product.Bapi is BAPI_MOSRVAPS_GETLIST2.But this is not picking the same for ATPCAT-AU,AV,AX,EL,AY,AZ.Does anyone know any other BAPI to pick the same.Urgent
    regards
    Ahasan

    Dear Ashok
    Your requirement can be met using DP BOM. I am not sure about parent child CVC's , but DP - BOM should work.
    You need to first create and activate PPM/ PDS for DP with usage D (BOM Demand Planning).
    Assign it to model and create a  planning object structure with DP BOM relevant.
    Create the master and CVC based on MPOS
    Create a PA with 2 different KF( one for finished product, another for dependent BOM). Initilize the PA and version.
    Config the forecast settings for PA.
    Pl see through the below link
    [http://help.sap.com/saphelp_scm50/helpdata/en/e8/d47139f5a04c61e10000000a114084/frameset.htm]
    Rewards points if it helps
    Regards
    Nav

  • APO Historical & Future forecast BAPIs

    Hello Experts,
    We are integrating SAP SCM / APO with a third party application for safety stock calculation. For this we would require the historical and future forecast data from SAP. We are using BAPIs to get this data.
    From the available documentation we could find that the BAPIs BAPI_PIRSRVAPS_GETLIST provides the forecast data.
    Can anyone kindly tell us how exactly to use this BAPI can be used to get forecast data aggregated per week?
    Thank you,
    Dilip

    Hi,
       The forecast program assumes that the flat file is loaded in the application server for the APO system.  You do not need to create an interface but load data from the application server on to live cache.
    This dpocument may be useful to get you started:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cc78cb7e-0701-0010-f990-940ca789f51e
    cheers
    Aveek

  • FM/Transaction/BAPI to delete sales order line item in APO

    Hi,
    Could you please share the details of FM / Transaction / BAPI to delete sales order line item in APO?
    Tcode - SDORDER_DEL / FM - BAPI_SLSRVAPS_SAVEMULTI2 delete the complete order with all its order items.
    Even the OM function modulesdelete the complete order. We could not locate a BAPI/FM for deleting only specific line items of a Sales order...
    Thanks,
    Arvind.S

    Hi Arvind,
    Can you try the below:-
    Function module : BAPI_SLSRVAPS_REMOVEITEMS
    Bapi object type: BUS10501
    Using this, one can delete One or More Sales Order Items / Schedule Lines.
    Please confirm
    Regards
    R. Senthil Mareeswaran.

Maybe you are looking for

  • Links in JPG & GIF images.

    Hello board, I'm making some JPGs & animated GIFs for my website, and my CMS allows images to link to only a single link; e.g. it links the whole image.  Is it possible to embed multiple links in a single image THEN upload to one's CMS?  If so, how?

  • I keep getting an unknown error when trying to connect to the store. I ran diagnostics and it says secure link to itunes store failed.

    I keep getting an unknown error when trying to connect to the store. I ran diagnostics and it says secure link to itunes store failed. I've tried all suggestions from apple and nothing will work. Please Help

  • Why does Safari only display the first page of PDFs

    When I use Safari to view PDFs attached to a web site I manage only the first page of the PDF displays. There is no problem if I use other browsers. Also the problem is specific to my machine as other Mac users can view all pages of the PDF on their

  • Asset - GL Account

    Hi all, I am a SD consultant, but due to some reason i am now handling FI for time being..... The thing is my client wants to view asset quantities, but in AS02 / AS03 tcodes i was able to see the values and not the quantities. So i thought viewing t

  • Temporary Solution for screen flicker r9 280x

    After performing various tests I've fixed the screen flickering on my msi r9 280x, I hope this can be useful for all here with the same problem and with different patterns of R9 family, that I have running on my pc and I have not had even the slighte