Production order enhancement for batches

We have a scenario where the batch expiration date of the produced material in the Production order = to the earliest expiration date of one of the component batches. Once the batches of the component are allocated in the Production order, we want do a enhancement which calculates the expiration date for the produced material based on the earliest expiration date of the component batches.
This scenario is typical of a pharama industry I would think. Does anybody know if there is a BADI/user exit/function module I can use for this purpose.
thanks a lot

For this you need to have a Z program which calculates the Expiry date of the finished product based on the component materials expiry date.
There will be some specific or Key materials basing on which you calculate the Expiry date of the Finished product.
Maintian a Sort String to such materials like 'K'.
Now get a program developed in such a way that during the population of batch characteristics for finished product when process order release, it should check for these component materials expiry date and take the earliest expiry date and calculate basing on this.
There was a BADI released for this purpose, some time when I was working in my previous project. I will check and let you know.
Till then you can explore on the above said option.
Hope this helps you.

Similar Messages

  • Assign production order number to batch number automatically

    Hi All,
    I have been trying to assign production order number to batch number when clicked on create icon in t-code CO02, and successfully assigned Production order number to batch number through EXIT_SAPLV01Z_001
    Question:
    Now i want to assign same production order number to batch number automatically... is it possible"
    If yes, provide me the exit or badi.
    Best Regards,
    Krishna K

    Hi,
    Try to use any enhancement point in below mentioned  FORM.
    In Program : SAPLCOKO1
    Include : LCOKO1F3J
    Inside below FORM.
    FORM header_update.
      DATA: flg_q_upd.
      DATA: quan_old LIKE caufvd-gamng.
    ENHANCEMENT-POINT header_update_01 SPOTS es_saplcoko1 STATIC.
    ENHANCEMENT-POINT HEADER_UPDATE_05 SPOTS ES_SAPLCOKO1 .
    BR,
    Vijay

  • Production Order Number and Batch Number same during order creation

    Hi All,
    I wanted to keep the Production Order number and Batch Number same during creation.
    How I can do that during creation of order only. So during creation same number to be get assigned automatically in the background.
    One thing I can maintain ; the same number range for both.
    But how to activate other functionality.
    Regards,
    Amit

    Hi SAP2511,
    For Production order-
    1.You can define a Order type  and  Mantain the number range same as batch number range (in  OPJH transction)
    For Batch
    1.Activate Automatic internal batch assignment - (OMCZ)
    2.Number range for batch - for object - BATCH_CLT - (OMAD)
    For batch creation at time of Order creation -
    You can create Automatic batch at the time of order creation or order release
    1 Create Production scheduler Profile(OPKP) and assign in Work scheduling view of material master for which you want to create batch at the time of order creation or release.(Select automatic batch creation at the time of release or creation in OPKP)
    Things to be taken care -
    1 . What if you set deleation flag for order?
    Regards
    Girish
    Edited by: girish khobare on Aug 20, 2010 9:31 AM

  • How to find out the list of Production orders created for sales orders

    Dear All,
    Our company wants to generate a report for a List of Materials sold out in a particular Product Hierarchy. Along with that we want to know the list of Production orders created for the sales orders.
    How to identify the production orders which are created based on Sales orders.
    Kindly suggest.
    Regards,
    Mullairaja

    Check these threads
    [Sale Order & Production Order|Sale Order & Production Order;
    [Re: Linking Production Order against a Sale Order MRP run|Linking Production Order against a Sale Order MRP run;
    thanks
    G. Lakshmipathi

  • How to Find Out The Production Order Number For The Sales Order Line Items

    Hi All,
    I want to know the number of production orders for each sales order line item. I know the sales order number .Can anyone tell me how the tables can be linked to get all the production order numbers for each sales order line item.

    I think it depends on your configuration. But check fields KDAUF and KDPOS in table AUFK.  or in table AFPO.
    Regards,
    Rich HEilman

  • ABAP Code to get Production Order Quantity for a material-Status REL,CRTD

    hi all,
    I am new to SAP. I am stuck with a problem while writing a abap code for getting all the production order quantities for a material with System Status REL and CRTD. Please help me out. This is what i tried to do.
      IF t_mat[] IS NOT INITIAL.
        t_mat2[] = t_mat[].
        SORT t_mat2 BY matnr.
        DELETE ADJACENT DUPLICATES FROM t_mat2 COMPARING matnr werks.
        SELECT auaufnr afgamng af~plnbez INTO CORRESPONDING FIELDS OF
        TABLE t_ord1 FROM afko AS af INNER JOIN  aufk AS au ON
          afaufnr = auaufnr
        FOR ALL ENTRIES IN t_mat2
        WHERE af~plnbez = t_mat2-matnr
        AND   au~werks  = t_mat2-werks
        AND   af~gltrs IN s_gltrs
        AND   af~gstri IN s_gstri
        AND   au~phas0 IN s_phas0
        AND   au~phas1 IN s_phas1.
      ENDIF.
    Thanks. Regards.
    Sandeep

    Hi
    There is one std tcode COOIS where u can get the information what u have asked
    Pls check
    regards
    Vijay

  • Production order Relase status Batch is picked in Delivery

    Hi friends,
    Presently in system, Production order Relase status Batch is allocated in Delivery due to Availability checking group & rule.Now as per requirement only Confirmed  Production order  Batch should allocat in delivery,then what setting should be done in Batch search stratergy & Availability checking group & rule so that system will consider only Confirmed  Production order  Batch in Availability check.?
    Please revert ASAP.
    Thanks & regards,
    NITIN M.PAWAR

    good analysis

  • Block Production Order Creation for Particular Order Type

    Hi Experts,
    I want to disable the production order creation for a particular order type XX01 however there are some existing orders for this order type which should be processed further.
    In other words my objective is to -
    1. Block new Production order XX01 creation -
    2. Processing of order type XX01 should be possible.
    Is there standard setting available to achieve this or user exist is the only option..
    Regards,

    Hi
    You can use the user exit PPCO0006 and its function mdoule EXIT_SAPLCOZF_003 to archive that. That function module is called when the user click enter after inputting the material/plant/order type in CO01 then you just need to check the imported value CAUFVD_IMP-AUART which contains the inputted order type then rasise an error message to tell user that the order type cannot be used due to certain reason. The source code need to be written there is very simple.
    Regards.
    Leon.

  • Production order %00000000001 for schedule line in Sales order

    Hello Experts,
    We have an issue with the production order whih is created from SO
    There is a sales order and have production order for CTO parts. But the Production order is deleted before confirming. Now when we check in the sales order in schedule lins we are getting as "Production order %00000000001 for schedule line" 00010/0001 can no longer be changed.
    Could any one provided the valuable imputs for what resasons this weeor appears
    Thanks in advance...
    Regards
    Madan

    Hello Vivke,
    Please find teh delatis of the issue
    We have an SO created for the CTO parts and to corrsponding to that generally a production order will be created, But in one of the case for SO the production order is showing as %000000001 in the schedule lines in the SO apart normal number ranges for Production orders.
    Now we need to know in what case the production order appears as %000000001 in the schdule lines, are we missing any thing in order to create production orders?
    Note: Initially there was production order is created correctly when scheduled lines are confirmed, but it is deleted for some reasons and again when the schedule lines are confirming we are facing this issue
    Could you please provide any suggestion on this
    Thanks
    Madan

  • Producting order settlement and batch

    Dear all consultants!
    I have an issue. I want to manage value by batch. i use the follow way:
    -  use batch and valuation type. when good receipt from production order, i identify an certain batch and an valuation type.
    - then, about variance, i do execute production order normally . when i see result, amount of variance of production order is be settled to Material (not by batch and valuation type). I run MB52/MB5C to check stock and value of stock, but value is not be changed after executing settlement production order.
    The thing i care that how to post variance of production order to correspondent batch/valuation type.
    any idea will be appreciated.
    Thanks in advanced.

    Dear Ajay M!
    I do test as you said.
    - Do the GR and settle the Prod order - Variance is loaded and be settle to Material. But when i check stock and value both at plant level and batch level, i cant find that amount of variance. Value of stock is not change before and after i run execute. I even cant find report to display that amount.
    - Do the GR - Consume the Output to a Cost center or Prod order - Then settle the Prod order.. In this case, the variance must not be loaded on other inventory... It should be hit to PRD --> i consume finished product. then i execute settlement, but result is not different with first case.
    what should i go continue?
    the things i care that i want to control product costing (or actual  cost of good manufacture by batch).
    Thanks in advance.

  • Enhancement for Production Order Release and Batch Fixing.

    Hi Experts,
    I have assigned a enhancement for production order.The user exit is also given in the req as PPCO0001 through which i have to call a Z-Program for Batch fixing using Trans CO01 and release the order before saving once it is assigned to components.
    Now my probs is where to start working for the enhancement -is it possible to use any BAPI instead of Batch (BDC) or I can use any BADI instead User Exit.
    So if you guys have similar scenario worked on it or have similar example approach to solve it.Please do help.I will reward for all helpful answers.

    I figured out thr friends !
    Thanks,
    SriRam

  • Tables for production order number for material and Batch combination

    Dear Experts,
    Please suggest the table names for finding the production order for material and batch combination .
    Thanks in advance for your help...
    Best regards
    Nitishj

    Dear
    Please check in  AFPO-CHARG
    AFPO          Order Item Detail -Batch Number -CHARG
    AFFW         Confirmations -- Goods Movements w
    AFRD          Confirmations -- Defaults for Collective Confirmation
    AFRH          Confirmations -- Header Info for Confirmation
    Regards
    JH

  • Issue for Production Report With Production Order Details and Batch Number

    Hi Guys,
    I am looking for a  batch report.I have tried it but i didnt get the desired results.Pls any body give me some solution.
    I need to include the Batch number  in this report and when i have done the same  the values are repeating  and also need to display the Item Description for (Description in Production Order - Parent Item)
    SELECT  distinct t0.docnum,T0.[DocDate], t4.IssuedQty as 'Consumed Qty', T1.[ItemCode] as 'Circle Codee',T1.[Dscription] as 'Circle Name',t3.itemcode
    FROM [dbo].[OIGE]  T0
    INNER JOIN [dbo].[IGE1]  T1 ON T0.DocEntry = T1.DocEntry
    LEFT JOIN owor t3 on t1.baseref = t3.docnum
    left  join wor1 t4 on t3.docentry=t4.docentry
    INNER JOIN OITM T5 ON T1.ItemCode = T5.ItemCode
    INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN IBT1 T7 ON T5.ItemCode = T7.ItemCode
    INNER JOIN OIBT T8 ON T7.BatchNum = T8.Batchnum and T7.ItemCode = T8.itemcode
    where t0.docdate between  [%0] and [%1] and T6.[ItmsGrpNam] = 'Raw Materials' and t0.JrnlMemo = 'Issue for Production'
    Any body provide me some idea for achieving this....
    Regards,
    Vamsi.

    Hi Bala.
    Thanks for the query but still  not acheived the result.
    The Scenario is to know the quantity of the Coil (Raw MAterial) used IN making a product in different stages and from which batch and Whse the RawMaterial is Consumed in making of the Product(Production Order Parent Item)
    ------------- (Issue for Production )-----------------------|    Production Order Qty(IssuedQty)    Production Order       |  BatchNum
    DocNo/Date      | ( RawMaterial/Coil Code/Desription)  |   (Quantity issued for RM)                  ItemCode/Description | Batchnum
    Regards,
    Vamsi..
    Edited by: VamsamP on Dec 1, 2010 5:06 PM

  • Batch determination in production order automatically for component

    Hi Experts
    Please understand the scenario and conclude the results
    Few of RM is having Batch management where Stock are lying into different production shop floor location XXXX and those RM is used into one production order of Finished Goods where System will not picking batch into production order , that we are putting by checking availability and than putting correct Shop floor Storage location and correct Batch in which stock is lying.
    now the above activity i want to perform through automatic batch determination which will system pick by default in which stock is exist in shop floor location. please suggest me step by step procedures for the same. few idea i have but i need clear guidelines....
    Thanks in advance..
    Pankaj Agarwal

    Pankaj,
    You can define the production storage location in BOM component details under Status/Lng Text or in MRP2  production storage location so that system will do the reservation by default for this production storage location and also good issue will be from same storage location.
    Against this reservation you can transfer the stock from stores to shopfloor.
    Check below SAP note for more information
      137225 - Prod. order: Issuing storage location for component
    Br
    KK

  • FM or BAPI for production order component split batch

    Hi,
    I'm trying to split a production order component quantity into batchs with FM or BAPI.
    Using BAPI_ALM_ORDER_MAINTAIN i can create or modify components but i can't set field split batch flag SPLKZ and reference SPLVR.
    Can you help me?

    In standard product order process in CO02 when i split material with standard function I obtain several lines. These new lines refer to the originale one by fields SPLVR and SPLKZ.
    Eg. In operation 0010 i've 10 PC of MATERIAL1
    Item
    Material
    Qty
    Batch
    Batch Key (SPLKZ)
    Itm no stock (SPLVR)
    0010
    MATERIAL1
    10 PC
    In CO02 i take MATERIAL1 from BATCH1 and BATCH2 the final result is
    Item
    Material
    Qty
    Batch
    Batch Key (SPLKZ)
    Itm no stock (SPLVR)
    0010
    MATERIAL1
    1
    1
    0010
    MATERIAL1
    7 PC
    BATCH1
    2
    1
    0010
    MATERIAL1
    3 PC
    BATCH2
    2
    1
    So I'm trying to reproduce this standard behavior with BAPI or FM.
    Thaks

Maybe you are looking for