Material Determination - quantity check in sales order

Hi everyone.
Hope all is good.
I have a doubt in Material Determination.
If I need to substitute a product in Material Determination, how can I come to know whether the quantity of the replacement material that is replacing the substitute material is available or not.
I know while creating a delivery the system will show quantity not available.
However, how we can see the result while placing a order?
Because there can be a scenario the material which is replacing the different material, we might dont have their quantity also available. So, it will be a waste to create a order and then wait for the results in delivery.
Another situation.
In MD process, what my client is looking for is
Substitute Reason- Availability
If material X does not have quantity it should be replaced with Material Y.
However if Material X has quantity, then MD should not take place. No replacement should happen.
The reason is there is a huge in and out of stock every now and then.
Do both the scenarios can be worked out in standard SAP?
Please suggest.

Hi Joan,
Thank you for the reply. I understood the subsitute reason.
But my question is We have substituted Y for X.
Now what I am asking is what if Y is also not available. Can in the order itself we can come to know whether quantity of Y is available or not instead of delivery.
Second if the subsitute reason is "quantity not available"- not in front of the system so not sure about the code. Same Y for X and now if quanity for X is available the material should not be susbtituted.
Please correct if I am wrong.
Regards

Similar Messages

  • ATP check partial Quantity allocation to Sales Orders

    Hi,
    Our client has three different sales order types for processing sales differently for the same materials.
    While doing ATP check they have a order of priority i.e ZOR1 -> ZOR2 -> ZOR3 with ZOR1 highest priority.
    For sales order type ZOR2 currently they donot have partial quantity allocation to sales orders.i.e if two orders, Order 1 created with 100 Qty and other Order 2 with 50 Qty and if ATP is 50 Qty.
    System is allocating material to Order 2 which has order quantity 50 ( Which equals ATP Qty )
    Now the client requirement is to configure system such that it does partial allocation to Order 1 ( order qty 100, where as ATP Qty is 50 ) i.e system should allocate even partial quantity to sales orders, that too in FIFO ( system should allocate ATP qty to order created first then next and so on )
    Please let me know what changes i need to do to achieve the above functionality in SAP system.
    Thanks
    Venkata Rama Reddy.K

    Dear Venkat,
    Please check the customer master for the customer which you have maintained in the 1st order. If the customer allows partial delivery, them the system will allocate the stock to the order which is created at first.
    At the time of ATP check(In Availability Screen), you do need to choose, One-time or System proposal, which will allocate the stocks partially to the 1st order as you don't have enough stock.
    Check out the settings in the customer master (for the customer in the 1st sale order) under Shipping Tab.
    Partial delivery per item  D/A/B
    Max. partial deliveries    >0
    (And more thing, you mentioned that sales document type is having priority. As of I know - there won't be any setting which will set particular sales document type with high priority. If you are really doing that kind of setting - update the same in this forum - it may help others..)
    Hope it may help you.
    (Venkat: Has your issue solved? Kindly update in the forum - if your question is answered)
    Thanks,
    Venkatesh.S.P.

  • Update the material quantity in the sales order using LSMW...

    Hi Guru's,
    I created one sales order using BAPI..now i wanted update the material quantity in the sales order using LSMW...
    could you please provide the step by step process....
    if anyone of you provide the program logic similar to requirement that would be helpfull to me...
    thanks in advance
    Srinivas....

    Hi Sri,
    Hope it may help you.
    First do the recording for VA02 transaction, in that give the existing sales order number
    and update the Quantity and save it. Remaining steps are same what we used(LSMW) to upload data to applications.
    Regards,
    Vishvesh
    if helpful, rewards it.

  • BAPI/Function module TO block material which is mentioned in sales order

    Hi All
    Is there any BAPI to block material which is mationed in sales order....
    I am using BAPI_MATERIAL_AVAILABILITY to check material availibility
    how to block quantity if it is available whicl creating sales order via
    "BAPI_SALESORDER_CREATEFROMDATA2"
    ..Thanks

    The normal SAP ATP done in the sales orders use the figure ''committed qty'' meaning that if the ATP has been done and confirmed, that quantity will not appear in the next sales order as available.
    So if You're using the normal BAPI to create the sales order, the normal ATP function will be called in the processing.
    Nevertheless another solution to this issue is to have the MTO (Make-to-order) solution where the requirements are ''attached'' to one sales order/line only.....like this the problem of the stock being taken to another customer disappears.
    To do this you'll have to configure the following :
    - Go to SPRO and go to Sales and distribution -> Basic functions -> Availability check and transfer of requirements -> Determination of requirements using transaction - Here insert the entry with your sales order type - MRP type (from material master - you might want to consider create one only for this solution) and you should use one of the following:
      - KEL      Make-to-order, mat. variants
      - KELV     Make-to-ord.variant + consump
      - KP       Make-to-order with project 
    and choose the origin of your requirement - 1 - Item category + MRP Type
    - Than configure the association of the requirement type above to the requirement class (normally is the same code) transaction *OVZH*
    - Than configure the requirement class (this is what will tell the system the MTO) transaction *OVZG* - On the screen in the field Special stock - E - Sales order stock and please ask for help from an FI consultant because the area of *Account assignment is very important to be well configured*
    About the BAPI you're using - Its correct - That's the normal BAPI to be used, taking only into consideration the product allocation issue - MARA-KOSCH
    Explaining a little the BAPI you're using :
    The program should check if the selected material is allocated or non-allocated.
    This information is stored in a field MARA-KOSCH.
    We should check this field and if the field is not empty then material is allocated, otherwise is not:
           select kosch into l_kosch
            from mara
           where matnr = <VBAP-MATNR>. " Selected material
            if subrc = 0.
               if l_kosch is initial.
                  +" Perform calculation for non-allocated materials+
               else.
                  +" Perform calculation for allocated materials+
              endif.
           else.
         " Material not found, skip it ...
          endif.
    For allocated materials it will be checked allocation for the netting market of that Order.
    The calculation rules for allocated and non-allocated materials are different.
    For Non-allocated materials
    BAPI 'BAPI_MATERIAL_AVAILABILITY' should be used for getting the ATP quantity.
    Bapi should be called as follows --
    data: lfl_bapiwmdvs type bapiwmdvs,
    lit_bapiwmdvs type standard table of bapiwmdvs,
    lfl_bapiwmdve type bapiwmdve,
    lit_bapiwmdve type standard table of bapiwmdve,
    l_dialogflag type bapicm61v-diafl.
    call function 'BAPI_MATERIAL_AVAILABILITY'
    exporting
    plant = <VBAP-WERKS>
    material = <VBAP-MATNR>
    unit = <VBAP- VRKME>
    check_rule = 'A'
    +* STGE_LOC =+
    +* BATCH =+
    +* CUSTOMER =+
    importing
    +* ENDLEADTME =+
    +* av_qty_plt =+
    DIALOGFLAG = l_dialog
    +* RETURN =+
    tables
    wmdvsx = lit_bapiwmdvs
    wmdvex = lit_bapiwmdve.
    Please note that table lit_bapiwmdvs is the input table and to this following input should be passed -
    lfl_bapiwmdvs-req_date = sy-datum. "Current date
    lfl_bapiwmdvs- REQ_QTY = <Unconfirmed Quantity> in Sales Order Unit
    append lfl_bapiwmdvs to lit_bapiwmdvs.
    The return value l_dailog will be --
    ' ' --- Quantity can be Delivered -- Item to be displayed in the Report!
    'X' --- Complete quantity cannot be delivered -- ATP failed, Item not to be displayed.
    'N' --- Material not relevant for ATP --- Item not to be displayed in the Report.
    For Allocated materials
    For the allocated Materials, we have to first do the ATP check in same fashion as for Non-allocated Materials and then in addition to this ATP check, we have to also check for Allocation from SIS table S941.
    If ATP check fails, straight away the Item should be ignored from Output display.
    If ATP check passes, we further check allocation as follows --
    Valid entry should select from S941 as -
    data: l_period like s941-spbup,
    l_BUPER LIKE T009B-POPER,
    l_GJAHR LIKE T009B-BDATJ,
    lfl_s941 type t_s941.
    data: l_bukrs type tvko-bukrs,
    l_periv type t001-periv.
    * Select company code
    select single bukrs into l_bukrs
    from tvko
    where vkorg = <VBAK-VKORG>.
    * Select fiscal year variant
    select single periv into l_periv
    from t001
    where bukrs = l_bukrs.
    * Get Period
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    EXPORTING
    I_DATE = sy-datum
    I_PERIV = l_periv
    IMPORTING
    E_BUPER = l_buper
    E_GJAHR = l_gjahr
    EXCEPTIONS
    INPUT_FALSE = 1
    T009_NOTFOUND = 2
    T009B_NOTFOUND = 3
    OTHERS = 4
    IF SY-SUBRC <> 0.
    * Ignore entry and skip further processing
    ENDIF.
    concatenate l_gjahr l_buper+1(2) into l_period.
    select single kcqty aemenge from s941
    into corresponding fields of lfl_s941
    where SPBUP = l_period
    and KONOB = 'OBJ_ALL_MATERIALS'
    AND MATNR = <VBAP-MATNR>
    and zzcnetmark = <VBAK-ZZCNETMARK>
    and VRSIO EQ '000'.
    IF SY-SUBRC <> 0.
    *Ignore entry and skip further processing
    ENDIF.
    Remaining Allocation = difference between product allocation quantity and incoming order quantity
    i.e. (S941-KCQTY - S941-AEMENGE). Now we have to compare this qty with the Unconfirmed qty.
    Ensure same Material UOM for quantity comparison as follows --
    IF <VBAP-VRKME> NE <S941-BASME>.
    CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
    EXPORTING
    i_matnr = <VBAP-MATNR>
    i_in_me = <VBAP-VRKME>
    i_out_me = <S941-BASME>
    i_menge = <Unconfirmed qty in Sales UOM>
    IMPORTING
    e_menge = l_menge
    EXCEPTIONS
    error_in_application = 1
    error = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    * Ignore entry and skip further processing
    ENDIF.
    ELSE.
    *If both Units are same no need for conversion
    l_menge = <Unconfirmed qty in Sales UOM>
    ENDIF.
    Then, compare if Remaining Allocation > = l_menge i.e. Unconfirmed quantity converted to S941-BASME unit, then there is enough allocation for this Material for the Unconfirmed quantity and should be displayed in the report.
    Else, the Item should be ignored.

  • Confirmed quantity in the sales order coming as 3.5 ea

    Hi Gurus
    The confirmed quantity in the sales order coming as 3.5 ea where the order quantity was 10ea.I checked CUIN for EA the decimal places is given as 0 which is very much correct moreover I checked the material master in additional data I have not find anything abnormal.The order was created by a batch job.Please help.

    Hai,
    The system has concluded that 3.5 EA for the confirmed quantity means the remaining part of the stock are already allocated to some other sales orders.Out of 10 EA only 3.5 EA are  in the stock.
    You can view through the MD04 and then enter the plant ,material and then check the quantity that are allocated to the various orders.
    Please revert for any.
    Kalyan

  • Availabilty Check at sales order level

    hi,
    I have the following scenario:
    Myt customer requires that the required delivery date be checked against stock (planned and production orders), however it must not reserves stock. however at delivery stage, the system must reserve stock ? any suggestions???

    Dear Reshigan
    Go to OVZ9, select your Availability Check and Checking Rule and untick against "Include sales requirements".  By doing so,  if stock is available say for example 100 nos.of  Material A1 and you creating sale orders with 100 each, for both the sale orders, quantity will be confirmed.
    However, if you create delivery for a particular order and save it without PGI, then the stock will be reserved against that particular order.
    Hope this is what your requirement is and reward suitable if so.
    thanks
    G. Lakshmipathi

  • Manual quantity allocation per sales order

    Hi All,
    The requirement is as follows.
    My client want users to allocate quantity for sales order manually so that they can control quantity allocation for sales orders when there is shortage of stock.
    We do not want to use product allocation for this, So can anyone suggest if there is any other way to allocate the stock manually for sales order.
    Thanks in advance,
    JM

    Hi,
    This can be acheived by enhancement.
    You can use userexit MV45AFZB -userexit_source_determination for this.
    You need to maintain the Z-table for all the bottleneck material with confirmation quatity column.
    So everytime when you create a sale order for bottleneck material, system will check this table & irrespective of any order quantity, it will confirm the quantities mentioned in the table.
    This way you can maintain the logic & fullfil the above requirement
    thank you

  • Availability check in sales order for DIEN materials.

    Hello,
    Is it possible to make availability check in sales orders for a service material e.g.: type DIEN? How can i customize it?

    The DIEN material type is not stock managed, so it does not make sense to check the availability. If you need to do something similar you could use material type UNBW, this material is quantity managed but not valuated, so maybe this can help you !
    Regards
    Roberto Mazzali

  • Changing Availability Checks in Sales orders

    hi there,
    Can i easily change the Availability Check in a sales order?
    i have 5 sales orde rtypes, and I sometimes want to change the Availability Check, how can i manage this?
    thanks

    There are three types of availability checks
    1. Availability Check with ATP Logic or Against Planning
    2. Availability Check Against Product Allocation
    3. Rule-based Availability Check
    For ATP logic, the Checking group and Checking rule combination determines the availability check parameters. The checking group is maintained in the material master, and not to Sales order type. Hence you can control by having different groups attached to different materials.
    If you have Advanced Planner Optimiser (APO) then you can use the Rule based availability check. You can attach a Business transaction to a Sales document type and thus control the availability check in sales order level also.
    Refer the below extracts:
    <b>Define business transaction</b>
    Path : spro -- img -- sd -- BF -- Av chk and TOR --- Rule based availabilty check
    In this step you can define the business transactions. These transactions must also be available in the APO planning system. Here the availability check control is carried out for the transactions.You can find the business transactions in the APO planning system (Field BPROC) under:
    Global ATP -> Settings -> Rule-based ATP -> Conditions -> Assign rule strategy.
    <b>Assign business transaction to sales order type</b> t code VOV8
    In this IMG activity, you assign the actions you defined previously to the order types. This activates the availability check settings for this order type, that were maintained in the APO planning system.
    Regards,

  • Disable Availability Check on Sales Order  But Activate on Outbound Delv

    Greetings all experts !
    Currently, there's a new request to create a new processes whereby during the sales order creation, no availability check will be in place but material will still be posted to production planning ( TOR ).
    Availability check instead should be activated  during the creation of outbound delivery.
    I have already configured in such a way that the relevant sch line item ( VOV6 ) - availability check is unchecked and TOR is checked.
    But during creation of sales order, availability check is still in place for material specified.
    I have check on the necessary requirement class and requirement type settings. Fyi, requirement class used - availability check is ticked. Could this be the reason even though i have disabled availability check on sch line ?
    I have tried to untick the availability check setting in requirement class  ( OVZG ), and while this can disable the availability check in Sales order, but that configuration will also disable availability check in outbound delivery.
    My queries :
    1 ) What are the configurations that I need to look into to cater to the above request. To disable availabilty in sales order but instead, run availability in outbound delivery ?
    2 ) Is there any way I can disable the availability check on based on sales order type using userexit or function module ?
    3 ) Is there any additional function module/bapi/userexit that i can implement to force outbound delivery to run availability check ?
    My apologies for such lenghty message here but really really need some valuable feedback here as I'm totally at lost with the new requirement for now.
    Many thanks in advance.
    Warmest Regards,
    Edie O

    In SPRO
    goto SD>Schedule line>Define schedule line categories
    here check if the schedule line category associated with your mentioned order has a flag ticked for Availability.
    Availability check for sales
    You must carry out an availability check for the following transaction.
    The indicator is determined as a proposal in conjunction with the respective requirements type. It can be changed in individual shipping transactions. However, only one restriction is effective.
    Example
    You do not set an indicator for maintaining the requirements type. In this case, no availability check is carried out. This is independent of the selection in the respective transaction.
    You set an indicator for maintaining the requirements type. In this case you can decide whether or not you require an availability check for the relevant transaction.
    reward points if it helps
    regards
    Biju

  • User exit in ATP Check for sales Order to trigger notification

    Hi All
    please let me  know is there any user exit after ATP check or in ATP check for sales order to trigger a notication mail.
    Regards
    Kishore

    Hi,
    User Exits For Availability Check are given below:-
    The user exits named here are planned for projects that are to be carried out in agreement with SAP development as they may only be used in consultation with SAP.
    USEREXIT_PLANT_SELECTION in program RV03VFZZ is an exception to this rule (see below).
    User exits in program FV45VFZZ
    USEREXIT_ADD_FIELD_TO_HEADER
    USEREXIT_ADD_FIELD_TO_LINE
    User exits in program FV45VFZY
    USEREXIT_DELIVERY_GROUPS
    USEREXIT_MVERF_INIT
    USEREXIT_QUOTA_KEY_VALUE
    User exits in program RV03VFZZ
    USEREXIT_AVAILABILITY_IN
    USEREXIT_AVAILABILITY_OUT
    USEREXIT_DARA_REFRESH
    USEREXIT_PLANT_SELECTION
    This user exit is used to adjust the flow during plant transfer. A list of permitted plants, where this material is created, is determined and checked in the standard R/3 delivery. A dialog box appears where you can select the plants. The user exits allow you to modify the plant table so that plant selection takes place in advance for every flagged selection and a dialog box becomes unnecessary.
    regards
    Vivek.

  • How to syatem determine delivery date in sales order

    hi sap gurus
    how to syatem determine delivery date in sales order
    Thanks and regards
    ram

    Hi Friend,
    There are many things which determines the delivery dates.
    01. PICK TIME+ PACK TIME +LOADING TIME
    02. LEAD TIME in days (VOV8)
    03. Shipping point
    04. Scheduling line
    05. Kind of availblity check
    06. If the above things are maintained as blank then the current date will be the delivery date
    However whether it must be proposed by the system or not is determined by one check box there find in VOV8 in requesteed delivery date determination tab.

  • How system determine delivery date in sales order

    Hi, sap gurus
    I am new to sdn forum please help me regarding my question
    1) how the system will determine delivery date in sales order
    2) what are factors effects to conform sales order stock
    3) what is different between static check and damanic check in credit mgt
    Thanks and regards
    nishad

    hi,
    Reg question:1 - System determines the Requested Delivery Date based on the Scheduline assigned to the item category of the item in sales order.the schedule line in the order transfers the requirements trhu MRP (can be individual or collective) . If its ruch order , you configure the order type "Deliver Immediately".
    In Detail:
    The TOR depends on the Requirement Type (MMR), Requirement Class(MMR), Checking group(MMR) and the Sc line category (Line Item). For the TOR to happen u need Plant at line item, scheduline category markd for TOR, Requirement Class marked for TOR and Checking group in MMR (Availability check)
    What all stocks need to be checked during Availability check is controlled by using the checking rule.. for example for AV -02 Ind Requirements a checking rule will be assigned and this checking rule- and then what all stocks need to be considered to determine the delivery can be maintained here.
    Rgds
    Sai

  • How To Get The Total Delivered Quantity of a Sales Order

    Hello All,
    I have a requirement of getting the total delivery quantity of the sales order .I have checked it in LIps table but I am getting partially delivered quantity for a schedule line item.Can any one tell me how to get the total delivered quantity.
    Regards,
    Pavani.

    Hi
    Check the Table:
    VBEP  - Sales Document: Schedule Line Data.
    Inside the table check the Quantity Fields.
    Regards,
    Sreeram

  • Partial Delivery when the complete delivery flag is checked in Sales Order

    We do the ATP check in APO when we create a sales order in R/3. We have "complete delivery" flag checked in Sales Order. But when we create batch orders say may be of 20, one of 20 is confirming with partial delivery.
    We thought the issue is with ATP locking and we increased the re-attempts, but invain. We still have this partial confirming problem.
    Appreciate your co-operation.
    Thanks,
    Sarath.

    Have you maintained the following setings in R3:
    Material Blocks in R3:
    MenuPath: SAP Customizing Implementation Guide ® Sales and Distribution ® Basic Functions ® Availability Check and Transfer of Requirements ® Availability Check ® Availability Check with ATP Logic or Against Planning ® Define Material Block For Other Users
    Global Settings in APO for Availability Check:
    MenuPath: SPRO>APO>GATP>General Settings>Maintain Global Settings for Product Availabilty 
    Questions for you:
    (1)R3--Does the Availability CHecking Group you are using for your material and the initiator-A has the block checked.
    (2)APO-- Has the TQA box checked in the global settings for Availability in APO
    (3)Also what happens when AVAILABILITY CHECK is done manually for one of the partial confirmed order with Complete Delivery indicator set.
    Regards
    Kumar Ayyagari
    null

Maybe you are looking for

  • Error Stack Monitoring.

    Hi In my BI system, i am using lot of DSOs and required to use error stack for most of them. What i know that each DSO has its own error stack table, but daily i can't check all the requests or error stack tables. I am looking for 1 centralized Error

  • Data Load in Production

    Hi Gurus ! I need to perform the data load activities for year 2007, 2008, 2009 & 2010. I already performed deleting & filling of the SETUP tables. But its pulling only 0 records in the BI. Please reply at the earliest. Its very critical. Points will

  • Capture Deck Fun

    hi all, capturing dv tapes using a sony dvcam deck. everything is going swimmingly until i started batch capturing a clip that i logged and the deck refused to stop when the out point happened, spilling into the next section which was logged separate

  • Mapping of currency to company code

    *hi any body help me how to do it*

  • Internal Audio Output suddenly doesn't work.

    My internal speakers no longer work. When I go to the Sound control panel and select Built in Speakers, I get a message that says "The selected device has no output controls." The menu bar shows full volume as does the Control Panel but the volume co