A BAPI to do ATP check?

All,
I want to create a program that will remove the delivery block from a number of sales orders. For this, I am using the BAPI BAPI_SALESORDER_CHANGE to remove the delivery block.
However, the sales order in currently not proposing partial deliveries because sometimes the users are clicking on the complete delivery button when they create a sales order.
What I need is either the BAPI to do partial deliveries or trigger an ATP check before the SO is saved. This would ensure that even if the users did do a mistake, the program will re-check and try to do a partial delivery if possible.
Regards

Hi Abdul,
try using BAPI_MATERIAL_AVAILABILITY. This returns the availability information and also flags if a product can be fufilled.
Hope this helps.
Colin.

Similar Messages

  • BPI req for ATP check

    Hi All,
    kindly suggest some bapi for material ATP check.
    Thanks

    Search the forum - it's been discussed many times.  A basic SE37 search or BAPI search would also give you the answer...

  • How to delete confirmed schedule lines, without executing the ATP check?

    Sales and Distribution: Concerning ATP (product allocation)
    Situation:
    Step 1: An order is created with priority low. Quantities are confirmed for line items.
    Step 2: A second order is created with a higher priority. No confirmed quantities.
    Rescheduling program (SDV03V02) is then executed. This selects and sorts the orders in the correct order.
    The confirmed quantities for the first (low priority) order should now be freed up, to be able to allocate those quantities to the second (high priority) order.
    The problem I am facing is that the confirmed quantities are NOT released.
    We cannot use BAPI_SALESORDER_CHANGE or SD_SALESDOCUMENT_CHANGE to delete or modify the schedule lines, because these function modules execute the ATP check again. And when that happens, quantities are again confirmed and assigned.
    How can we get rid of the confirmed schedule lines, without executing the ATP check?
    Thanks,
    Edwin.

    Found a solution to the problem:
    In the Rescheduling program we export a parameter to the memory, to make it possible to delete schedule lines without executing the ATP check.
    Deleting of the schedule lines is done with a BAPI, which will call the ATP check automatically for ATP relevant materials. This we want to stop from happening (only when calling the BAPI).
    After the BAPI has been called we FREE the MEMORY ID.
    The parameter is imported again in Customer-Exit EXIT_SAPLATPC_001.
    Transaction.. SMOD
    Enhancement.. ATP00001
    Component.... EXIT_SAPLATPC_001,
    Include...... ZXATPU01.
    The customer exit is used in function AVAILABILITY_CHECK_CONTROLLER, just before calling function 'AVAILABILITY_CHECK'.
    Simply refreshing the ATP tables in the customer-exit, will prevent the ATP check from being executed (because we removed the list containing the materials for which the ATP check needs to be done). As a result, the function 'AVAILABILITY_CHECK' will not be processed.

  • CO09 and BAPI_MATERIAL_AVAILABILITY for ATP Check

    Hi all,
    On R/3 4.6c...
    I am trying to find if there is a BAPI or funciton module out there which I can use to get the material availability (ATP quantity) as per the results of CO09.
    I looked at BAPI_MATERIAL_AVAILABILITY but the BAPI only accepts the checking rule. This does not have a switch to check with requirements. On CO09, there is a check box which allows us to check with requirements or not (With reqmts quants).
    For my ATP check, I would like the system to assume that the total requirements quantity is taken into account during the availability check, rather than the quantities that have already been committed.
    This is required for a system to system call hence the need for a BAPI or funciton module.
    Thanks for any help!
    Fred

    Hi,
    You can get the ATP quantity by using function module 'AVAILABILITY_CHECK'.
       ls_atpcsx-matnr  = lt_ekpo-matnr.
       ls_atpcsx-werks  = 'D001'.
       ls_atpcsx-prreg  = '01'.
       ls_atpcsx-lgort  = 'CS'.
       ls_atpcsx-idxatp = '1'.
       ls_atpcsx-chkflg = 'X'.
       ls_atpcsx-bdter  = sy-datum.
       APPEND ls_atpcsx to lt_atpcsx.
       clear ls_atpcsx.
       CALL FUNCTION 'AVAILABILITY_CHECK'
         TABLES
           p_atpcsx            = lt_atpcsx
         EXCEPTIONS
           ERROR               = 1
           OTHERS              = 2.
       IF sy-subrc = 0.
         READ TABLE lt_atpcsx INTO ls_atpcsx INDEX 1.
         it_result_cspo-atpqty = ls_atpcsx-atpm1.
         REFRESH lt_atpcsx.
         clear ls_atpcsx.
       ENDIF.

  • Spare parts ATP check

    Dear Expert,
    I meet a problem about the ATP check in CRM when create a service order.
    We need check the ATP when we create service order with spare parts.But for CRM, there is not any stock information.
    It is possible to use BAPI call to do ATP check.But our service order's quantity is huge, it will influence the performace.
    I think SAP defined two system, then I has to face this problem.
    Any suggestion will be highly appreciated.

    Stefano,
    Do you have a solution for this?
    Best regards
    Jose Marin

  • BAPI for product allocation Check gATP

    Hi all,
    I read in the SAP documentation that we can use gATP on APO to check order item coming from non R/3 OLTP on product allocations.
    Is someone test it, which BAPI or BAdi do we use?
    Many thanks in advance.

    Hello,
    Following enhancement is available for Product allocation.
    Maintain Enhancement Projects for Product Allocation
    In this IMG activity, you can edit customer exits for the global availability check.
    Product allocations
    The enhancement for the initialization is APOQT001 .
    The user exits for product allocations are divided into two different call sequences:
    Product allocations is the requirements check against the product allocation time series from planning. A complete check is executed for this call sequence.
    The enhancements for product allocations are:
    APOQT010 copy parameters
    APOQT012 product allocations control
    APOQT021 product allocations
    APOQT022 consumption at beginning situation
    APOQT023 order consumption
    APOQT032 results control
    APOQT033 sequence of product allocation procedures
    APOQT007 product allocation assignment of partial deliveries
    APOQT018 adjusting field catalog
    The comparison adjusts the results of product allocations to the results of the other basic methods. This adjustment is necessary when product allocations is not the last basic method executed.
    The enhancements for the comparison are:
    APOQT011 copy parameters
    APOQT014 product allocations control
    APOQT024 consumption
    APOQT034 results control
    APOQT035 sequence of product allocation procedures
    The sequence of the basic methods is configured in the check instructions.
    When comparing, the entries in the table for the product allocation assignment and the temporary quantity assignments (delta records) are adjusted to the final results of the ATP check.
    If the behavior of product allocations is changed by the user exits, the behavior of the comparison must be adapted accordingly in the corresponding user exits!
    Thanks and Regards

  • ATP check in BAPI_PO_CREATE1

    Hi! Experts
    I'm using BAPI_PO_CREATE1 to create stock transport orders (STOs) but encountered limitation in ATP check.
    The requirement is to create several STOs during once program excution according to the uploading data file. If any errors occur reverse any orders which has been genereated - which can be easily achived by ROLLBACK WORK statement.
    Take an example, material A has total stock 100 TO. To create 1 order with 120 TO will get message return as 'no enough quantity in plant xxxx'. However if import data file contains 6 STOs with quantity 20 TO by calling BAPI, all can be generate succesfully because every order pass the ATP check during BAPI call.
    Would like to ask for alternative solutions rather than COMMIT WORK for every time BAPI call.
    Thanks,
    Yina

    Hi! Experts
    I'm using BAPI_PO_CREATE1 to create stock transport orders (STOs) but encountered limitation in ATP check.
    The requirement is to create several STOs during once program excution according to the uploading data file. If any errors occur reverse any orders which has been genereated - which can be easily achived by ROLLBACK WORK statement.
    Take an example, material A has total stock 100 TO. To create 1 order with 120 TO will get message return as 'no enough quantity in plant xxxx'. However if import data file contains 6 STOs with quantity 20 TO by calling BAPI, all can be generate succesfully because every order pass the ATP check during BAPI call.
    Would like to ask for alternative solutions rather than COMMIT WORK for every time BAPI call.
    Thanks,
    Yina

  • GATP/ATP Check for Different Order Types for same material

    Hi :
    I have a material code X for which 2 different type of Sales Order (Say A and B )needs to be created.
    For Sales Order Type A the atp check needs to be done in APO through GATP for material code X.
    For Sales Order Type B the atp check needs to be done in SAP R/3 ECC 6.0 through availabilty check functionality for same material code X.
    It is not possible to create seperate material codes to carry out atp/gatp check seperately in R/3 and in APO.
    In real time the atp and cumulative atp position should be same in R/3 and in APO.
    Please let me know solution for this issue.
    With Regards
    Ashish Gupta

    Hi Ashish,
    Can you share with us as to how you were able to solve this issue. I have a similar issue like yours and I am totally clueless as to what needs to be done..
    My scenario goes this way:
    I have to modify the Schedule line dates for a GATP material according to a newly created date which I calculate based on the Route Schedule id (VL51, VL52) and display the same in the Sales Order schedule line items.
    Also can I get a new set of schedule line dates from the APO system for a date which I calculate based on the Goods Issue date - VALW-AULWE in any exit using a FM or a BAPI?? so that I can get these dates and populate the same in the Sales Order Schedule line??
    Thanks in advance,
    Susanth

  • ATP check for multiple materials on multiple sales document

    Hi,
    System 4.70
    Is it possible to carry out an ATP check for multiple materials on multiple sales documents.
    I have written a bespoke program and the program requires an ATP check to be performed for each material and sales document, I am currently using BAPI_MATERIAL_AVAILABILITY which is bringing back the necessary information but it's a bit slow.
    Does any one have any ideas please.
    Regards
    J-J

    The ATP Check using the BAPI is done per material and plant. If you're looping through sales documents and then materials you're probably doing the ATP check for the same material over and over again.
    Just get the list of materials you need and the corresponding plants and call the BAPI for each of them.
    Also do a run-time analysis (tcode SE30) to check exactly what slows down your program.
    regards.

  • Default ATP check for sales organization - which function?

    Hi all.
    If you for a particular sales organization make the settings in customizing, that all ATP checks should default be "Delivery proposal" for example, which function module is then checking this in sales order creation? I would like to do some debugging, but I cannot find any ABAP program/function module where this is being checked?
    Thanks for info.
    BR
    Dennis M

    Dear Dennis M,
    FM's:
    BAPI_PROCORD_CHECK_MAT_AVAIL   BAPI: Execute Material Availability Check for Process Orders
    BAPI_PRODORD_CHECK_MAT_AVAIL   BAPI: Execute Material Availability Check for Production Orders
    CF_UT_MAT_STOCK_CHECK          PRT availability check: material stock
    CO_FU_FHM_AVAILABILITY_CHECK   Availability check of a PRT                                          
    CO_FU_OPR_AVAILABILITY_CHECK   Availability check PRT for operation                                 
    CO_FU_ORD_AVAILABILITY_CHECK   Availability check PRT in the order                                  
    CO_FU_TCO11_VORGANG_DET        Determine operat. ctrl.tab availability check prod. resources and tool
    SD_SPECIAL_STOCK_ASSIGN        Determine special stock indicator for availability check
    Regards,
    Naveen.

  • ATP check for materials and ATP Confirmed Qty's

    Good morning,
    I have a question regarding the ATP.
    If I have a 100 of box a in stock and I have 2 Planned Orders for 75 (total req on box is 150).
    When I convert the first Planned Ord to a Prodution Ord, the ATP check will run and confirm that I have the 75 boxes required (as we want it), but if I then convert the second Planned Order I would expect the ATP to say that only 25 is available, but it is also telling me that the 75 boxes required are available.
    Can I set the ATP to confirm/allocate the first 75 boxes to the first Production Order and when the second order runs ATP to only commit to 25?
    Thanks in advance.
    ATP novice :o)

    Hi Guy Hall,
    Please check with, "include dependent reservation and production order" has been activated for  checking rule used for production order at "avilabilty checking scope"
    Regards
    Pradeep

  • Re: ATP check at storage location level.

    Hi All,
    NEED urgent help.
    I want to know if it is posiible to have ATP check at storage location level only.
    I do not want this check to happen at plant level.
    Please reply.
    Thanks and regards,
    Nilesh

    Hi Shankar,
    Storage location is defaulted in sales order.
    Can you tell me if there is any user exit for ATP wherein I can carry out the ATP at storage location level and not at plant level.
    Thanks and regards,
    Nilesh

  • Re: ATP check at storage location level in sales order.

    Hi ,
    I have a requirement wherein storage location is determined in my sales order,  the ATP check is done at plant level as well as storage location level , and the smaller of the two quantities is taken as the result of the ATP check.
    My requirement is that the ATP check should only be performed at storage location level .
    Please suggest if there is any standard setting available in SAP.
    iF NO , PLEASE SUGGEST SUITABLE USER EXIT, WHERE I can add my requirement.
    Regards,
    Nilesh

    Hi Nilesh,
    in SAP standard the system is always checking on plant level first and then on the storage location level, there is no possibility to change this behaviour.
    I'm also not sure if the process is correct, because if you have also requirements on plant level only then you would create negative ATP if you confirm on storage location level even though there is no ATP on plant level.
    I'm also not aware of a user-exit that would suite your requirement, additionally according to the IMG documentation the user-exits in the availability check area should only be carried out in agreement with SAP.
    Regards,
    Markus

  • Relationship about ATP check and credit check

    Dear all,
              At present,  we have credit control in sales  order. The rule is : once the sales order's amount over 1 dollar, the order will be blocked for credit check. This order has to release credit block manually in VKM4.
              Here has a problem, when a sales order has credit released with the status "D",  if i check ATP for one item in this order, the credit status will return to "B", it is not match our requirement.
              How can the credit status not change when ATP check happen in the sales order?
             Thanks in advance!

    Hi Irene,
    You can copy this requirement with new code like :
    IF yvbuk-cmgst = 'D'.
          MOVE CHARX TO BYPASS-SECURITY.
          MOVE CHARX TO BYPASS-STATIC_LIMIT.
          MOVE CHARX TO BYPASS-DYNAMIC_LIMIT.
          MOVE CHARX TO BYPASS-DOCUMENTVALUE.
          MOVE CHARX TO BYPASS-CRITICAL_FIELDS.
          MOVE CHARX TO BYPASS-REVIEWDATE.
          MOVE CHARX TO BYPASS-OPEN_ITEMS.
          MOVE CHARX TO BYPASS-OLDEST_OP.
          MOVE CHARX TO BYPASS-DUNNING_LEVEL.
          MOVE CHARX TO BYPASS-USER1.
          MOVE CHARX TO BYPASS-USER2.
          MOVE CHARX TO BYPASS-USER3.
          MOVE CHARX TO status_reset-STATIC_LIMIT.
          MOVE CHARX TO status_reset-DYNAMIC_LIMIT.
          MOVE CHARX TO status_reset-DOCUMENTVALUE.
          MOVE CHARX TO status_reset-CRITICAL_FIELDS.
          MOVE CHARX TO status_reset-REVIEWDATE.
          MOVE CHARX TO status_reset-OPEN_ITEMS.
          MOVE CHARX TO status_reset-OLDEST_OP.
          MOVE CHARX TO status_reset-DUNNING_LEVEL.
          MOVE CHARX TO status_reset-USER1.
          MOVE CHARX TO status_reset-USER2.
          MOVE CHARX TO status_reset-USER3.
        EXIT.
    ENDIF.
    If you are a problem with yvbuk-cmgst, you can use user exit MV45AFZZ to save the credit status (cmgst) into an other field.
    This new field is checked in the new requirement.
    This requirement deactivates the credit check if the credit status is released. In this case, no credit check is possible in SO.
    Regards,
    Lionel

  • Edit postDelete postReport this postReply with quote ATP check but the comm

    hi , all guys :
    when I create the pp-pi order , first i use the batch determination to allocate the component
    batch , then i do the ATP check , but the committed quantity always is zero ,the ATP alway does
    not support confirm quantity (co09 the confirm quantity always is zero),so when i create the other pp-pi order the stock quantity always cover the reqirements quantity of components
    in the mater data , i use the ATP group is 02 (the customizing is standard) i think the ATP scope is irrelative to this issue .
    in the order type control parameters , i use the ATP check
    for example :
    the componet 100-200 have three batchs :
    batch: 20100501 quantity 30 kg
    batch: 20100502 quantity 40 kg
    batch: 20100601 quantity 40 kg
    now , the requirment of component 100-200 is 100 kg
    the batch determination conditions is self expiration .
    so i throght the batch determination and batch split to allocate the bacth and quantity is
    batch: 20100501 quantity 30 kg
    batch: 20100502 quantity 40 kg
    batch: 20100601 quantity 30 kg
    after allocating , i run the ATP check ,BUT the COMMITED QUANTITY ALWAYS IS ZERO .
    I don't know why !!! ,where can configure the ATP confirm quantities (committed quantities) the in the customizing
    can you give help me!!!
    thanks!!!
    best regards

    Davis:
    Check in MRP Group settings, Availability Check session, flag activate full confirmation logic. Test activate full confirmation logic.
    Regards,
    Ricardo

Maybe you are looking for