Blocking duplicate batches during GR (101's)

Hi All;
I have a requirement to prevent duplicate batch postings during Goods Receipt (101).
My scenario is:
A GR (101) posting will be performed for material “A” using Batch “B” with quantity 5tons.
Another incorrect movement (duplicate – 101mvt) will be entered with the same combination (material “A” using Batch “B” with quantity 10tons.
I need to block the duplicate 101mvt. However, it must still be possible to reverse (102mvt) the original 101 in case the qty was entered incorrectly.
The unique check should therefore be on Material movement, Material & Batch combination.
Also, if we decide to use a report to reveal duplicates (instead of system block), which tables will be useful? I’ve investigated MCHB, but only the qty is updated (no duplicate record created). The only table I can think of is MSEG (and that’s a lot of data to search…)
Thanks

Hi,
   You may maintain the message M7 668 as Error (E) in the path: OLMB - Define Attributes of System Messages -  with a message version, say Z1 as shown below:
   Now, go to SU3 transaction for the user profile of the users who are doing 101, and maintain the parameter ID: MSV with value as the message version (z1) as shown below:
   Now, the message M7 668 will be error message for only the users with the above parameter ID and will be warning message for all others. Please check the same and revert back.
Regards,
AKPT

Similar Messages

  • Stored Procedure for Batch Number Format and Block Duplicate Batch Number

    Hi Experts !
    I am new one in forum asking question.. I want Stored procedure for Batch Number Format. I want fix one Batch number format in Stored Procedure.
    Example :
    My Batch number format Like  BATCH00001 - It should be first five digit is text format and next five is Numeric.
    IF create Goods receipt PO or Goods receipt stage I create batch number like BATCH 00001 or any other number means don't add that document and also duplicated batch number also does not allowed. please give me the solutions. I am sorry for my bad english .

    Dear Nagarajan K.
                         Thanks for your replay ..
    IF @transaction_type IN ('A','U') AND (@object_type = '106' )
    BEGIN
    set @item = LEFT( @list_of_cols_val_tab_del, CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,1) - 1)
    set @batch = substring(@list_of_cols_val_tab_del, len(@item)+1, (CHARINDEX(CHAR(9),  @list_of_cols_val_tab_del,len(@item)+2)) - (len(@item)+1))
    --set @base =( select basetype from ibt1 where batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    set @count = (select count(*) from oibt quantity > 0 and where  batchnum = ltrim(rtrim(replace(@batch,char(9),''))))
    if @count > 1
    begin
    set @error = 1
    set @error_message = 'Please enter different Batch Code for batch ''' + @batch + ''' for item ' + @item 
    select @error, @error_message
    END
    END
                  I used above Stored Procedure. here we can use one batch number for different item but  i want to block one batch we should use one item and one time only after than we never use that batch number for same item and another item.
             After that I want format for Batch, we should follow unique Batch number for all items.

  • Sessions from apex are blocking by batch job

    Hi All,
    In my 10.2.0.3 linux with apex 3.1.1
    We have a batch job using a package,that is doing DML operation in tables depends upon some condition.And this job will run daily 5 hours.
    The sessions from apex that is also using some procedures in the same package.Some days the sessions from apex are blocking by batch job.While blocking wait event from apex sessions are 'library cache pin'.Once the batch job completes then automatically removes the block.
    What may be the reason?
    Thanks in Advance,
    Sunil

    The query against v$lock is not relevant if the blocked sessions are waiting on "library cache pin" - so you seem to have two separate problems.
    If you have a session waiting on another session's transaction slot in mode 4 there are several possible causes - often related to indexes, but there are a couple of "internal" problems as well. If you see this locking issue again some of the simplest things to check for would be session 1 inserting (without commit) some rows in a table with a unique key, and session 2 then trying to insert a duplicate. Session 2 has to wait for session 1 to commit or rollback before deciding whether to return a "duplicate key" error, or to continue processing.
    The "library cache pin" waits suggest that the package had become invalid while the batch job is running it, and one of the Apex jobs is trying to recompile it. But if the batch job is currently running (hence pinning) the "executable", then the Apex job can't get the necessary exlusive pin until the batch job ends and releases its pin.
    Read the notes in the script $ORACLE_HOME/rdbms/admin/catblock.sql about creating views that let you see more of the information about library cache (KGL) locks and pins.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Auto creation of Stor Location and Batch during stock upload via MI09

    Hi Experts!
    Please guide me to configure automatic creation of storage location and batch during stock count through mi09.  Eg : I got material A in storage location 1000 and got batch 123 for this material. Then when i want to do the stock count, if i enter the storage location 2000 and batch 122 for this material, then system will auto create this storage location and batch in the master data.
    I tried to configure it in OMJJ for storage location but it is not working. Please anyone guide me step by step how to configure it. Storage location and Batch.
    Thanks.
    Crystal.

    hi
    check this
    Create Storage Location Automatically
    In this step, you specify whether the automatic creation of storage location data is allowed for goods issues and transfer postings.
    This is advisable if you work with negative stocks and a material's first movement may be an outward movement.
    Note that the reversal movement for a goods issue, for example, movement type 202 or 262, is not considered as an issue but as a receipt. If you only use the automatic creation of storage location data for reversals of goods issues, you do not have to allow negative stocks.
    You have to allow automatic creation per plant first of all. You then have to explicitly allow the creation of storage location data for each movement type.
    The storage location data is only created if the quantity is posted to 'standard' storage location stock. It is not created for receipts into a special stock (for example, into sales order stock).
    Default settings
    The standard system is set in such a way that the storage location data is created automatically for all types of receipts (goods receipt with/ without reference, stock transfers, intial entry of stock balances, reversal of goods issues, etc.).
    Activities
    1. Enter for each plant whether the automatic creation of storage location data is generally allowed.
    2. Specify the movement types for which storage location data is created automatically.

  • User Defined Characteristics not populating for Batch during GR of SC PO

    We have a requirement to populate the one characteristic ( Country of origin ) of batch during GR.
    After GR the characteristics value should be displayed in Classification Tab of MSC3N transaction.
    So that I have implemented the Enhancement MBCFC004 .
    Two conditions here for Populating the Country of Origin
    1) During GR of Standard Purchase Order the Characteristics (Country of Origin) value should be mseg-oic_oland1 ( Country from Extenal Details )
        For this condition the User Exit code is working perfectly and also updating classification in MSC3N .
        NO ISSUE for Standard Purchase Order.
    2) During GR of Subcontract Purchase Order the Characteristics (Country of origin value ) should be populated from the characteristics value of Batch of
          component Material .
        For this condition the User Exit Code is working perfectly , But NOT updating classifcation in MSC3N .
        This happens for Subcontract PO.
    Can anyone suggest solution , why this happening for Subcontract Purchase Order.

    Hi Sumit,
    I am not sure about your question, but if you want to populate the classification data during goods receipt then you need to maintain characteristics values in material master for classification tab under class type batch i.e. 022. After then it will apper during goods receipt for characteristics value for batch.
    Regards,
    Bhagat

  • User  exit  needed (Problem related to duplicate batch entry in Migo(GR))

    Dear all,
                  I need a help from you.we facing problem in Goods receipt in MIGO.
    where we want to apply a check on batch which has already been assigned to a raw material in MIGO  .we are using manual
    batch entry .we don't want to make duplicate entry of same batch
    against any material.
    I tried to find out the user exit for that but i have not succeed .
    what is solution to
    avoid duplicate batch entry.

    Transaction Code - MIGO                     Goods Movement
    Exit Name           Description
    MBCF0002            Customer function exit: Segment text in material doc. item
    MBCF0005            Material document item for goods receipt/issue slip
    MBCF0006            Customer function for WBS element
    MBCF0007            Customer function exit: Updating a reservation
    MBCF0009            Filling the storage location field
    MBCF0010            Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011            Read from RESB and RKPF for print list in  MB26
    MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.
    No of Exits:          8
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • Avoid duplicate batch (batch managment)

    dear all,
    We are facing problem related to batch managment .we are using manual batch entry .we don't want to make duplicate entry of same batch (which have already assign to material) against any material.what is solution to avoid duplicate batch entry.
    can u tell me the settings and any user exit in which we can avoid the duplicate batch.
    regards

    Hi hema,
                   in our scenario user  manually enter  batch of raw material in MIGO when we do good recipte in MIGO againts purchase order we enter batch manually.but we need that a batch which has already assign to raw material can not be assign again .if user enter the previous batch then system gives a error that batch has already exist.
    may be u know the prob

  • How can I eliminate duplicate Batch Numbers?

    SBO allows serial numbers to be unique, but not batch numbers. The system allows the same batch number to be used for a different part. I have a medical company that requires unique Batch numbers accross the board, regardless of part number. Any suggestions? I tried to do this with a formatted search that would identify a duplicate Batch for me, but my search crashed and burned.
    Here is the Formatted Search I tried to connect to the Batches Setup Form:
    SELECT 'Batch allready used!' FROM IBT1 T0 WHERE T0.[BatchNum] = $[$3.3.0]
    Anyone out there know how to force unique batch numbers?
    Thanks!
    Mike
    Edited by: Mike White on May 7, 2008 7:07 PM

    What I am saying is, I never want a duplicate Batch number even if the parts are different. In your example, Item A could not have the same Batch number as Item B. Unfortinately, SBO allows duplicate batch numbers as long as the part numbers are different.
    The reason for this is two fold. 1) This medical company cannot, never have the same batch number, and 2) reporting from the OIBT and IBT1 tables gets a bit complicated with duplicate batch numbers.
    So my thought is to simply create a formatted search which runs from the Batches Setup Form, checking to see if this Batch Number has allready been used, then replacing the entry if TRUE with something like "Batch Allready Assinged".
    Mike
    Edited by: Mike White on May 7, 2008 7:36 PM

  • TransNotif block duplicate vendor ref

    Hi experts,
    Im using this TransNotif to block duplicate Vendor Ref in the sales order but i only want it for doc series 1 and 6, how can i achieve this.
    if @object_type = '17' and (@transaction_type in ('A' ,'U'))
    begin
    declare @RefNo as varchar (100)
    declare @CardCode as varchar (100)
    declare @Series smallint
         if (@object_type = '17')
              begin
                 select @RefNo = NumAtCard, @CardCode = CardCode from ORDR T0 where docentry = @list_of_cols_Val_tab_del
                 begin
                   if (@RefNo is not null)
                     begin
                       if 1!= (select count (docentry) from ORDR  where (NumatCard = @RefNo) and (cardcode = @CardCode))
                         begin
                            select @error = 10
                            select @error_message = 'Conduce Duplicado'
                         End
                       End
                   End
              End
    End

    Hi Leonardo E. Martinez
    Try This you can include the series in the where condition
    If @object_type = '17' and (@transaction_type in ('A' ,'U'))
    begin
    declare @RefNo as varchar (100)
    declare @CardCode as varchar (100)
    declare @Series smallint
         if (@object_type = '17')
              begin
                 select @RefNo = NumAtCard, @CardCode = CardCode from ORDR T0
                        where docentry = @list_of_cols_Val_tab_del and T0.Series IN (1,6)
                 begin
                   if (@RefNo is not null)
                     begin
                       if 1!= (select count (docentry) from ORDR  where (NumatCard = @RefNo) and (cardcode = @CardCode))
                         begin
                            select @error = 10
                            select @error_message = 'Conduce Duplicado'
                         End
                       End
                   End
              End
    End
    Hope Helpful
    Regards
    Kennedy

  • Add new batch during count entry (for cycle count by quant LICC)

    Hi! We are using LICC for cycle counting by quant as we have mixed storage and do not want to count all the materials in a single bin. Most of the materials involved are batch-managed. One issue we have is we may discover other batches during stock take. In this case, how can we add this to the stock adjustment since we cannot add new item when we use cycle counting by quant?
    Appreciate your suggestion in this case.
    Cheers!
    SF

    Hi,
    Whenever you find discrappancies, in this case founds, you will note these down and first do an analysis whether this particular batch has been written off in the past as lost. When not, you will make a MB1À or MIGO booking to add this found batch to stock. When yes, you could do a reversal of the issue or do a new receipt.
    MdZ

  • How to block duplicate invoice posting in MIRO

    Hello,
    How to block duplicate invoice posting in MIRO?
    Regards,

    Hi Niteen,
    In addition to the expert's comment use the note 305201
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=305201]
    Please check and revert.
    Thanks,
    Hrishi

  • Automatically create batch during return delivery

    Dear SD Gurus,
    Good Day!
    Is there any way to make the system to create batch automatically during return delivery??
    The requirement is, to get the system to work like MM where batch can be set to be created automatically by movement type. During return delivery, we don't have to select the batch but system will automatically create a batch.
    Thanks and have a nice day.
    Best Regards,
    Soo

    Hi,
    It is possible to activate batch during delivery/return delivery. However this again needs to be configured by the MM team. If you work along with the MM team, they should be able to enable this functionality.
    Certain functions like Batch Mngt, Outputs etc are independent of the module and they work based on teh applications.
    Hope this helps you
    YOu can reward if it helps you

  • Reg blocking of batch on expiry date

    Dear all,
    What are the selections to be done in QA07 for blocking a batch on expiry date which is 3 days from today, we also have batch status active.
    Thanks in advance
    Madhav

    Hi
    In QA07 select
    1. Block batch at lot creation.
    2.Initial Run  in days : 3 or maore
    3.click on the check box of Block batch
    Also Mainatin shelf life data in MM and keep expiry date 3 days later.
    schedule the batch run in the background.
    I hope this will add some values
    Regards
    Sujit

  • Change Batch during TO Confirmation

    Hello
    I am looking at a problem regarding batches, we have a Warehouse with materials that are batch controlled, and they need to be that, but our problem is that there are several different batches in one bin, and the FIFO princip is not necesary, since this is mostly steel components like plates and pipes, and we need to now which batch went where, we trried the LIFO set up, but the handling of the materials are a bit random so this does not work, so I am trying to find a way to change the batch during confirmation Is there any way, or must i call in the abap man?
    Regards
    Ivar

    Hi,
    please refer below links...
    WM Batch change in Transfer Order
    Change batch during Transfer Order confirmation for Delivery
    Hope it may help you.
    Kuber

  • Batch gets skipped or duplicate batch number appears

    Hi all,
    What should I have to do if Batch gets skipped or duplicate batch number appears while releasing Process Order?

    Hi,
    619913
    I can only tell you something about the skipping.
    You cannot prevent this completly in standard, please see note 619913 question 6.
    6.  Question:
         How can you achieve a chronological assignment of batch numbers
         without any gaps?
         Answer:
         A chronological batch number assignment without any gaps is
         impossible.
         Chronological batch numbers are achieved by using the internal batch
         number assignment. The absence of gaps cannot be guaranteed, however
         (cancelled entries, termination, /N, etc.).
         Gaps in batch number assignment can be eliminated by explicitly
         searching for them in the user exits for batch number assignment
         (EXIT_SAPLV01Z_001 through _004) - they can also be determined in a
         job and stored in a customer-specific table.
    Regards,
    Sabine

Maybe you are looking for