Creation and increment of batch number

Hi,
Very urgent please.
I have one reuirement in my bdc for uploading AR OPEN ITEMS Using bdc ,
     batch(4)     bukrs(4)     kunnr(10)        hkont(10)     
     01     4000      D1000504          4010
     01     4000          165410     4010
for debit and credit we have one batch number and it has to be incremented according to document posted
1  dr      document number1
1 cr  
2 dr
2  cr   document number2
U know this has to be incremented and not updated in sap its only batch grouping the custmer .
Regards
subba
Edited by: KODAMANCHILI SUBBARAO on Sep 25, 2008 3:27 AM

SAP does not stop you from re-using an existing batch number. The message that you get is in a SAP standard delivery just a warning, as it is from a business process unusual that the same batch can be received multiple times.
If it is an error in your case, then somebody in your organization has changed the message attributes. so you should talk to them (see the change log in your DEV system) to know why this was done and  what the solution for your case could be

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.

  • Inspection type 01 - inspection lot creation based on vendor batch number

    Hi Guys,
    this topic has been discussed several times here, but I was not able to find a suitable answer for my question.
    I am facing the folowing requirement:
    I have activated inspection type 01 for a raw material.
    I am receiving a firs goods receipt from vendor A with vendor batch number 0001.
    The system creates its own goods receipt batch number 0546 based on internal numbering.
    A new inspection lot is created.
    I am posting a second goods receipt from vendor a with vendor batch 0001.
    The system creates a new batch number 0547 based on internal numbering.
    A new inspection lot is created.
    I do not want to get the second inspection lot, because I received vendor batch 0001 before and I am assuming it has been inspected or is in inspection.
    Option 1: Post the second goods receipt against the first internal batch number created.
    I am aware of this need at the moment, but a user is not always checking if there is an internal batch with the same vendor received before.
    Can I customize the system to create inspection lots based on the fact that the vendor batch number was received before?
    Or do I have to use an exit and some ABAP code to get the wanted result?
    Thanks for your advice in advance.

    You need to use one of the enhancements that Do-Wook has suggested.  There is no standard SAP way to suppress the inspection based on the vendor batch number.
    With the first enhancement you use the system to check for a previously received vendor batch and if one is found, then that batch number is proposed and not the next one from the numbering series.  In this case, the lot isn't created than due to the inspection lot control of the inspection type.
    With the second enhancement you check the vendor batch number and if it's been received you suppress the inspection lot creation and the stock goes right to unrestricted.
    You'll probably need to do one or the other.  Myself, I prefer the first enhancement.
    Craig

  • Cancelling Goods Receipt and Using of Batch Number

    Hello,
    i did a wrong goods receipt with the MIGO and canceled after two days the material document with movement typ 102.The Material uses a Batch number.
    Now i want to use the old Batch number to do the right goods receipt, but the System says that the Batch number already exists.
    I thought when i cancel the material document i can use the old Batch number.
    I would be happy about every message.

    SAP does not stop you from re-using an existing batch number. The message that you get is in a SAP standard delivery just a warning, as it is from a business process unusual that the same batch can be received multiple times.
    If it is an error in your case, then somebody in your organization has changed the message attributes. so you should talk to them (see the change log in your DEV system) to know why this was done and  what the solution for your case could be

  • Transaction COR2 release userexit , Batch number should be blank

    Hi,
         My requirement is , when i release process orderf rom COR2 tcode, the batch number should come us blank. I used EXIT_SAPLV01Z_002 from function module VB_NEXT_BATCH_NUMBER and made the batch number as blank. But after that exit, there's a condition in VB_NEXT_BATCH_NUMBER saying if batch number is blank then throw an error. Is there any way, i can get the batch number as blank after releasing the process order.
    Thanks,
    Vandana

    Hi Vandana,
    I don't recommed the use of a FM not release by SAP. You could have problems in future SAP versions or when you apply support packages.
    Regarding the main request: you can manage the Batch creation by Plant and Production Scheduling Profile.. So you don't need an exit for it. This is setup in CORY:
    Please try...
    Kidn Regards,
    Mariano

  • Advance batch number generation

    Dear All,
    One of our customer's requirement is printed batch number on Bags. So we need to sent bag for printing batch number and other details. For that we required Batch number that we will produce after some days.
    We are using internal batch number and due to buffering there may be possibility of gap in batch number.
    Is there any way to give reserve specific batch number?
    Regards,
    Nirav

    Hi,
        You can reserve a batch for order asap order created  by making setting in MSC1N.
    But if you want  a batch reserved before order creation as well or with out any stock then
    Go to OPKP & put no batch creation , and create a batch manually by MSC1n & aasign it to order.
    same for stock you need to remove automatic batch determination policy & need to give it manually.
    Thanks...............Rakesh

  • Process Order Details like batch number, mfg date flow to a new process ord

    Hi Experts,
    I have a doubt in Process Order.
    I have two stage production.
    1. Blending
    2. Packing
    I create a process order for blending and assign a batch number and manufacturing date for Blending operation.
    Release the process order.
    Final Confirmation of the process order.
    I complete all the process, Goods Reciept is done.
    Technically completed the Process Order.
    Now my 1st stage Process order is completed and ready for the 2nd stage production i.e., Packing.
    Now I create a new process order,
    here I am having the problem that I need to enter all the details like batch number, manufacturing date etc..
    I want to avoid this in the 2nd process order.
    How to do this i.e., carry forwarding the details of the 1st process order into the 2nd process order.
    Is there any setting required at the back end?
    I was told about Push operation to rectify the above problem. But I am not clear about that.
    Can any one clearly explain about that step- by - step.
    Thanks in advance,
    Regards,
    B. Praveen
    Praveen

    closing thread

  • Auto Populating of Batch number (AUPOD-CHARG)

    Dears,
    I am trying to populate the batch (field AUPOD-CHARG ) in the Process order under Tab "Goods Receipt", this needs to be picked default from the batch (field RESBD - CHARG ) which is under the BOM Item level in process order.
    Here the scenario is we have already created the BOM with line item having Batch information. The same now needs to be picked default in the Process order under Goods Receipt TAB.
    Please let me know if there is any way we can populate the AUPOD-CHARG filed default as mentioned above.
    Thanks & Regards,
    Viswanath

    Viswanath,
    I would suggest to create a custom program with a BDC to update the batch, the logic of the program should be to first select orders which are not populated with Batch Number in the Order table(selection can be restricted based on specific status), and then for every order pickup the respective component batch number from reservation table, once this data is available, within the program peform a call transaction CO02(BDC), to create and populate the batch number to the order.
    This Job can be run in background to the required frequency.
    Regards,
    Prasobh

  • Automatic batch determination with fixed batch number for production order

    Hello all,
    I want to create a production order where the batc number can be assigned for one component as Batch fixed value once the order is released.
    1.- I have created the characteristic (CT04) assigned to the table MCHA and field CHARG (Batch number) and one value: LINER.
    2.- I have created the class (CL02) and assign to this the characteristic.
    3.- I have created the sort ZSORT and the batch (MSC1N).
    4.- I have checked the classification in the material and it has assigned correctly the class and characteristic and the MRP2 view has the backflush = 1, batch entry = 3 and the prod. stor. location = COIL.
    5.- I have created the strategy (COB1, strategy type CO02) and assigned the selection criteria and sort.
    6.- I have created the order (CO01).
    7.- I was releasing the order and the batch number was assigned but, with numbers!! and I need assign this with fixed value = LINER.
    Could you help me please? How can I do it?
    Kind regards,
    SP
    Edited by: SANDRA PALOMO on Mar 15, 2011 11:28 AM

    Hi Vishwas.K
    Thank you for your respone, but, doing more researching, let me explain you with more detail:
    1.- I am going to the transaction CO02 in order to release the order, but, before it, I am checking the component by Go to > Overviews > Components.
    2.- Then, I am selecting my component and making a click in "Batch determ. " button.
    3.- The system is showing me many batch numbers and I select the "Selection criteria" button and the system said: "Selection class "LINERBATCH" does not contain any selection criteria". But, it has a characteristic that I have created before.
    4.- Then, I select in the new screen "Selection criteria: Origin..." the"create" button.
    5.- The system selection my class from the material classification and when I go back to the last screen, finally the system is showing me my batch: LINER.
    Do you know why my selection criteria with my selection class is not working in automatic?
    Thank you for your time and support.
    Kind regards,
    Sandra Palomo

  • Batch number format setup and auto batch creation during first GR

    Dear all,
    This is a batch question.
    I know that both the master batch and the stock data for the batch are created automatically during the first goods receipt. Thus, I do not need to create this data manually.
    My question are following:
    1 - what is the machnism that trigger this auto-batch creation in the system during the first goods receipt? is it from some kind of configuration?
    2 - If I want my batch number to appear in certain format, for example, first four digit is customer code, middle two code is country code (i.e. US, UK), and the remaining as goods receipt date. How do I setup this in the SAP system.
    3 - If batch classification is active, one can assign characteristic values to the batch when entering the goods receipt. HOwever, normally when I perform a goods receipt in MIGO, after putting in the production date and the batch number, I will hits the checkbox and if no problem, I will post the 101 document. WHERE in the MIGO screen I can assign the characteristic value to the batch?
    Thanks.

    My question are following:
    1 - what is the machnism that trigger this auto-batch creation in the system during the first goods receipt? is it from some kind of configuration?
    ==> Yes - See IMG activity 'Define batch creation for Goods Movements'
    2 - If I want my batch number to appear in certain format, for example, first four digit is customer code, middle two code is country code (i.e. US, UK), and the remaining as goods receipt date. How do I setup this in the SAP system.
    ==> See exit EXIT_SAPLV01Z_003
    3 - If batch classification is active, one can assign characteristic values to the batch when entering the goods receipt. HOwever, normally when I perform a goods receipt in MIGO, after putting in the production date and the batch number, I will hits the checkbox and if no problem, I will post the 101 document. WHERE in the MIGO screen I can assign the characteristic value to the batch?
    [[> See IMG activity 'Activate Batch Classification for Goods Movements in IM"

  • 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

  • No New Batch number creation at the time of Material Transfer Movement(309)

    We are upgarding from 4.6C to ECC6.0. We have an issue in regards with the material movement type 309. At the time of creating the material tranfer using the same material as issuer and receiver, the same plant and storage location ( this process is used by the business to diferentiate batches).
    In 4.6C a new batch number is created automatically when 309 movement is posted; stock and characteristics transfered are allocated at the new batch created automatically.
    The same case in ECC6.0 does not create a new batch as done in 4.6C. We have looked for any SAP note or forum discussion without success.
    If anybody has an answer for this issue, let us know.

    As a matter of fact these configuration has been checked before, additionally we compare configuration at 4.6C and ECC6.0 and it is the same but the new batch creation (for this specific case) is working at 4.6C, not at ECC6.0.

  • Updating Batch Number while delivery creation from sales document

    Hi Experts,
         I have to write code inside user exit MV50AFZZ which updates batch number during delivery creation. Suppose I have a sales having more than one line items. Each line item have different material numbers, and one material number may have more than 1 batch number. And all these batch numbers have to be updated for their corresponding material numbers. Batch  number corresponds to LIPS-CHARG. So how we can maintain values for this field more than once for a particular material number?

    Hi Pankaj,
    Were you able to update the Batch Number?
    What is the function Module that you used? and where exactly did you code in the logic?
    Thanks,
    RV

  • Duplicate Batch number creation during MIGO wrt PO

    Dear al SAP
    We have activated batch management at material level and set external number range. During MIGO say for the first line item, I have entered external batch number as 123. If I give the same batch number for the second line item of the same material code, system should throw an error message.
    Pls explain in detail SPRO setting required for this.

    In Logistics General -> Batch Management -> Creation of New Batches -> Define Batch Creation for Goods Movements select the option "E" Manual and check against external number range

  • Auto batch number creation on CO15 GR

    Hi experts,
    Can you guide me how to setup CO15, where during confirmation and auto GR of FG, system can supply a Batch Number (via specific logic in exit) automatically?
    Thank you!

    CO15 is the production order confirmation screen  and  if you acitvated AUTO GR for the order and if the material is batch managed ,  you should have configured  batch internal number active,  system will create a batch number automatically.
    Based on where you have created user-exit  ( if it is part of batch creation  BADI),  that should also kick in.
    You can also look in creation of batch at the production order level itself when the order is released. 
    cheers
    Rav
    Edited by: Rav on Jan 6, 2011 11:24 PM

Maybe you are looking for