Batch creation through ME21N, ME22N and MSC1N

Hi All,
Please note we are already using EXIT_SAPLV01Z_001, EXIT_SAPLV01Z_002, EXIT_SAPLV01Z_003, EXIT_SAPLCLFM_002, EXIT_SAPLV01Z_012, EXIT_SAPLV01Z_014 for Batch creation based on different logics for Material type, Plant and PO doc type and currently using these exits for logic it allows us to create new internal batch number during PO creation (ii) change already existing batch with some new number (of couse this number must not be used in some other PO) in PO change and (iii) create new internal batch number using MSC1N, by inputing plant, stor. loc etc. But currently i can create batch with 1 digit, 2 digit, and so on.
The requirement is to allow user to create batches only with 10 digits during:
(i)PO creation (ME21N)and PO change(ME22N) and also during
(ii) transaction MSC1N
currently in all three ME21N, ME22N or MSC1N it allows to create batch with 1 digit, 2 digit,3 digit and so on . i want to create batch with only 10 digit.
Please tell this is possible through configuration steps or some changes are required to be done in above said user exit.
Regards
Rahul Shukla

Hi Jurgen,
Thanks for your reply.
In ME21N i am able to assign batch in PO
(1) By clicking on 'create' button appearing just side of Batch field in item Tab "Material". I think this create button is appearing due to user exit being applied here. Here it creates and assigns internal number automatically (from range 01in Batch_Clt) based on the Material type and Plant combination (Some logic defined in user exit)
(2) By putting any random number manually (both numeric and alphanumeric)whether 1 digit, 2 digit,3 digit in Batch field in item Tab "Material" it will accept and in this case also po is saved.
same way i can do changes in batch number in ME22N and able to save.
In MSC1N also due to user exit applied if i give Material number alone  and enter, it assignes the internal batch number based on Material type and plant logic defined in user exit.here also if i input some random number manually in batch field it accepts and that random batch number is created for material.
Now i want that i should be able to put random batch number manually but that number must be out of the number ranges defined in Batch_CLT object (Also the number must be exact 10 digits length as is there in defined number ranges) and not any random alphanumeric number . Also i am not able to understand how it is accepting random alphanumeric number (like ABC111)although all number ranges defined are numeric only.Also external number range is 0008000001 - 0089999999 which is numeric only.
Regards
Rahul

Similar Messages

  • Dump While Executing ME21N, ME22N and ME23N

    Hi,
    Am getting the below Short Dump while executing ME21N, ME22N and ME23N.
    Runtime Errors         SYNTAX_ERROR
    Date and Time          08.07.2009 15:41:00
    |Short text                                                                               
    Syntax error in program "ME_PROCESS_PO_CUST============CP ".
    |What happened?                                                                               
    |    Error in the ABAP Application Program                                                                               
    |                                                                               
    |    The current ABAP program "CL_EX_ME_PROCESS_PO_CUST======CP" had to be                     
    |     terminated because it has                                                                               
    |    come across a statement that unfortunately cannot be executed.                                                  
    |                                                                               
    |    The following syntax error occurred in program                                                                             
    |     "ME_PROCESS_PO_CUST============CP " in include                                                                 
    |     "ME_PROCESS_PO_CUST============CM000 " in                                                                      
    |    line 14:                                                                               
    |    "The specified type cannot be converted into the target variables."                         
    |    " "                                                                               
    |    " "                                                                               
    |    " "                                                                               
    |                                                                               
    |    The include has been created and last changed by:                                           
    |    Created by: "SILABAP "                                                                      
    |    Last changed by: "SILABAP "                                                                 
    |    Error in the ABAP Application Program                                                        
    |                                                                               
    |    The current ABAP program "CL_EX_ME_PROCESS_PO_CUST======CP" had to be                     
    |     terminated because it has                                                                   
    |    come across a statement that unfortunately cannot be executed.                               
    |Error analysis                                                                               
    |    The following syntax error was found in the program                                          
    |     ME_PROCESS_PO_CUST============CP :                                                          
    |    "The specified type cannot be converted into the target variables."                          
    |    " "                                                                               
    |    " "                                                                               
    |    " "                                                                               
    |Trigger Location of Runtime Error                                                                
    |    Program                                 CL_EX_ME_PROCESS_PO_CUST======CP                     
    |    Include                                 CL_EX_ME_PROCESS_PO_CUST======CM001                  
    |    Row                                     1                                                    
    |    Module type                             (METHOD)                                             
    Module Name                             IF_EX_ME_PROCESS_PO_CUST~INITIALIZE
    |Source Code Extract                                                                               
    |Line |SourceCde                                                                               
    |>>>>>|method IF_EX_ME_PROCESS_PO_CUST~INITIALIZE.                                                
    |    2|  CLASS CL_EXIT_MASTER DEFINITION LOAD.                                                    
    3
    |    4|  DATA l_badi TYPE REF TO ME_PROCESS_PO_CUST.                                              
    5
    6
    7
    8
    9
    |   10|  TRY.                                                                               
    11
    |   12|    GET BADI l_badi                                                                        
    |   13|     CONTEXT me.                                                                           
    14
    |   15|    CALL BADI l_badi->INITIALIZE                                                           
    |   16|.                                                                               
    17
    18
    19
    |   20|    CATCH CX_BADI_NOT_IMPLEMENTED CX_BADI_INITIAL_REFERENCE.                               
    Please let me know is there any OSS note to resolve the Issue.
    Thanks,
    Subas

    Hi,
    when I try to do the same in my system SAP gives me an information message as follows:-
    Changes to transported Business Add-In definitions are incompatible
    Message no. ENHANCEMENT236
    Diagnosis
    This business add-in definition has already been transported. Subsequent changes could invalidate existing business add-in implementations.
    System Response
    The runtime behaviour is no longer predictable. Syntax errors or short dumps may occur.
    Procedure
    If possible, do not make these changes. Alternatively, create a new business add-in definition incorporating the changes and use it, along with the existing definition.
    It clearly indicates that the BADI definition should not be changed if active implementations already exists.
    I am really now not sure how to solve your issue.
    Try deactiviting the standard BADI implementation.
    Then again add the filter and then remove it.
    And then try activating the BADI implementation once again.
    Regards,
    Ankur Parab

  • EXIT BADI FOR ME21N ME22N AND ME23N

    Hello Boys.
    I want  to change the field 'Tax code' (MWSKZ) in a Purchase order on transaction ME21N, ME22N AND ME23N.
    I want to change thios field in a BADI, USER EXIT or ENHANCEMENT-POINT.
    But I can't find where change this field.
    thanks for your help.
    Best regards.

    Try Badi : ME_PROCESS_PO_CUST
        CALL METHOD im_item->get_data
          RECEIVING
            re_data = v_data_item.
    Your code to change the tax code
    CALL METHOD im_item->set_data( v_data_item ).
    <REMOVED BY MODERATOR>
    Edited by: Aparna Shekhar on Jun 12, 2008 11:33 AM
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:52 PM

  • Exit or enhancement for ME21, ME22, ME21N, ME22N and ME27

    Can anyone tell me an exit which can be used for ME21, ME22, ME21N, ME22N and ME27.
    I tried using EXIT_SAPMM06E_006, it did not work as the values get cleared from the internal table once out of the Exit.
    Requirement:
    Need an user exit which is common to transactions ME21, ME22, ME21N, ME22N and ME27 to block the line item of a purchase order based on following conditions:
    u2022     Document type is u2018xxu2019 or u2018yyu2019
    u2022     IF Condition type u2018aau2019 or u2018bbu2019 exist in the PO line item
    Please advice

    USe export to database indx..
    check this wiki for more info
    http://wiki.sdn.sap.com/wiki/display/Snippets/ImportandExporttoCluster+Databases

  • Hiding a customized tab (from header and item) in ME21N, ME22N and ME23N

    Hi SAP gurus,
    I need to make invisible a customized tab in Po creation(me21n), change(me22n) and display(me23n) in enjoySAP transaction for a particulat Doucument type.
    Please let me know the possibility and the solution to implement.
    Thanks,
    Kishore P

    Hi Kishore,
    The customized tab cannot be made visible or invisible conditionally. Instead you can write some text inside the tab to distinguish between different document types.
    Hope this helps.
    Regards,
    Abhijeet Kapgate

  • Batch creation Date of Manuf and Shelf life issue

    Hello,
    I am having issues when batch gets created during Process order Creation/Confirmation.
    The issue is when the Batch gets created on creation/confirmation(101 GR) the field "Date of Manuf" is not populated on the batches(with todays date) which I checked in MSC3N.
    Because of this the shelf life is not getting populated(based on Shelf life data from MM) and is causing my Batch determination process to not work in Sales order/Delivery.
    Can anyone tell me if there is a config or master data set up
    1) which will either populate the field "Date of Manuf" automatically(when I do GR or Usage)
    or
    2) If it can give a pop up during Quality Inspection(usage) or Process order confirmation that will force someone to enter the Date of Manuf.
    Also when I check my classification tab for the batch(in MSC3N), the classification data does not gets created, which afffects my Batch determination process during Sales order/Delivery process.
    I have to manually go in the Batch(MSC2N) and enter todays date for Date of manuf and create classification data.
    Any Ideas what the issue is?
    Thanks
    SAP Fans...

    Hi, what you can do i set total shelf life in Plant Data / storage 1 view in the material master. In such way the date of manufacture will be required field to enter when you produce material. Shelf life date will be calculated automatically based on the total shelf life mantained. In some transactions (we are using MFBF) when total shelf life is populated in the material master, the date of production is defaulted in the transaction (with the current date), you can check if this is applicable in your scenario.
    Best Regards, Peter
    Hi, in addition to that you can check transaction OMCV - here you can activate automatic batch classification per movement type - so the batches can be classified automatically by SAP
    Edited by: Petar Stoyanov on Feb 24, 2009 10:49 PM

  • Delivery address in PO Creation through ME21N

    Hi All,
    I want to change the Delivery Address in ME21N. By default this delivery address is the Plant address which we enter at the line item level. Now my requirement is to default the delivery address to other address based on the vendor given at the header level.
    I had tried User exit, MMDA0001 but this is not triggering, then tried BADI ME_PROCESS_PO_CUST method PROCESS_ITEM , even this does not help.
    Can anybody please let me if you had requirement like this and how you solve this problem.
    Thanks n Regards
    Maruthi

    Hi Mr A
    Please tell me which user exit did you use to resolve this issue because I have to also do extra validations and changes to some PO Items when user creates PO with ME21N.
    Thanks

  • Update batch no in ME21N

    Hi Friend,
    I want to update batch no in ME21N.
    -     At the time of saving the purchase order, a batch number should be generated as follows:
    o     XXXXX = last 5 digits from the purchase order
    o     XXXXX = Item number of the purchase order item

    check this thread you can get some idea
    Batch creation through ME21N, ME22N and MSC1N

  • Add new column in ITEM data of ME21N/ME22N/ME23N

    Hi Experts,
    We have a requirement to add a custom field in ITEM data of transactions ME21N, ME22N and ME23N. A new column is required that would appear as checkbox. We have already tried screen exit MM06E005 but it is adding a new tab and the new field under the ITEM DETAIL data. We have also read that BADI ME_GUI_PO_CUST would do the job but it will be under the ITEM DETAIL as well.
    <<text removed>>
    Thanks
    Edited by: Matt on Mar 9, 2009 11:06 AM - expressions of urgency can be perceived as rudeness

    Hi,
        If you want to make the new field to appear as check box...Go to the screen layout from its module pool program --> right click on that field and Convert it to Check Box. This would help you.
    Regards,
    Swapna.

  • SOLUTION: tab not showing in ME21N/ME22N with badi ME_GUI_PO_CUST

    Hi,
    I implemented BADI's ME_GUI_PO_CUST and ME_PROCESS_PO_CUST to show a custom tab in the header section of ME21N, ME22N and ME23N.
    But after implementing the BADI's, the tab showed up in ME23N, but not in ME21N and ME22N.
    So I started looking for a solution in the SDN forum, and I saw that there were a LOT of people with the same problem, but nobody ever posted a solution.
    So here is the solution:
    So, I added the fields I wanted to show in the structure CI_EKKODB, implemented the BADI ME_GUI_PO_CUST (the methods SUBSCRIBE and MAP_DYNPRO_FIELDS), and the BADI ME_PROCESS_PO_CUST.
    After that the tab showed up in ME23N, not in ME21N or ME22N.
    So I found an SAP note saying the following:
    Question:
    I implemented the 'ME_GUI_PO_CUST' Business Add-In to display customer-
    specific tab titles in the EnjoySAP purchase order. They are only shown in display mode (ME23N) however, not in create or change. Why?
    Solution:
    You may have forgotten to assign a field status to the user-defined fields on these tabs. As a result, the system automatically interprets the field status as 'hidden' in create and change modes. However if a tab contains only hidden fields, then the entire tab is set to hidden. In display mode, fields without a field status are automatically set to display. That is why the tab is displayed in this case.
    To assign a field status to the user-defined fields, use the methods provided for this purpose in the Business Add-In 'ME_PROCESS_PO_CUST' (compare sample source code in the FIELDSELECTION_ITEM method).
    So in my case, I had to add some code to the  FIELDSELECTION_HEADER method of the BADI ME_PROCESS_PO_CUST.
    This is the code:
    method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER.
      DATA: l_persistent TYPE mmpur_bool.
      FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
    * if the item is already on the database, we disallow to change field badi_bsgru
      l_persistent = im_header->is_persistent( ).
    *   IF l_persistent EQ mmpur_yes.
        READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_01.
        IF sy-subrc IS INITIAL.
          <fs>-fieldstatus = '*'. " Input
        ENDIF.
    *   ENDIF.
    endmethod.
    But then, I realized that this BADI was never triggered. When I entered one of the transaction codes ME21N, ME22N or ME23N, the code in the fieldselection_header method was never executed.
    So I went to transaction SE18, and entered ME_PROCESS_PO_CUST in 'Enhancement Spot' and pushed the button display.
    And there in the tab 'Enhancement Implementations', I saw an implementation that was not mine, and that did not show up in the overview of the SE18 'BADI NAME' tab for the same BADI... which to me seems strange.
    So as you may know, there can never be more than one active implementation of the BADI ME_PROCESS_PO_CUST.
    So I disactivated my implementation and put my code in the existing implementation.
    And after that it worked!

    implement first badi :ZME_GUI_PO_CUST:
    METHOD if_ex_me_gui_po_cust~subscribe.
    DATA: ls_subscriber LIKE LINE OF re_subscribers.
    * we want to add a customer subscreen on the item detail tab
       CHECK im_application = 'PO'.
       CHECK im_element     = 'HEADER'.
    * each line in re_subscribers generates a subscreen. We add one subscreen in this example
       CLEAR re_subscribers[].
    * the name is a unique identifier for the subscreen and defined in this class definition
       ls_subscriber-name = subscreen1.
    * the dynpro number to use
       ls_subscriber-dynpro = '0001'.
    * the program where the dynpro can be found
       ls_subscriber-program = 'SAPLMEPOBADIEX'.
    * each subscreen needs his own DDIC-Structure
       ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.
    * a label can be defined
       ls_subscriber-label = text-001.
    * the position within the tabstrib can be defined
       ls_subscriber-position = 4.
    * the height of the screen can be defined here. Currently we suport two screen sizes:
    * value <= 7 a sevel line subscreen
    * value > 7  a 16 line subscreen
       ls_subscriber-height = 7.
       APPEND ls_subscriber TO re_subscribers.
    ENDMETHOD.
    implement 2nd badi : ZME_PROCESS_PO_CUST:
    method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER.
       DATA: l_persistent TYPE mmpur_bool.
       FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
    * if the item is already on the database, we disallow to change field badi_bsgru
       l_persistent = im_header->is_persistent( ).
    *   IF l_persistent EQ mmpur_yes.
         READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_01.
         IF sy-subrc IS INITIAL.
           <fs>-fieldstatus = '*'. " Input
         ENDIF.
    *   ENDIF.
    endmethod.

  • On ME21N / ME22N / ME23N  PUT SOME TAB INVISIBLE.

    Hi,
    I need put the text tab on this transactions me21n me22n and me23n INVISIBLE for some users, how can i do this?
    tks.
    Carlos Siqueira.

    We had a requirement for hiding the tab Spec2000 in item detail.
    The code in the enhancement implementation AD_S2K_SUB_LMEGUIU08 in function module MEGUI_BUILD_PO_ITEM_PLUGIN was commented out to remove the extra tab as the structure that is linked to this tab was MEPO1339.
    May be the same works for you for the other tab.

  • New tab implementation at item level in ME21N/ME22N/ME23N.

    Hi Friends,
    I have implemented two badis 1. ME_GUI_PO_CUST and 2. ME_PROCESS_PO_CUST to get a new tab at item level in ME21N/ME22N/ME23N, I could see this new tab only in ME23N but not in ME21N/ME22N, and I found that Badi ME_PROCESS_PO_CUST is not getting triggered for any of these tcodes : ME21N/ME22N/ME23N. Can anybody help me getting this issue resolved with coding example as well.
    Thanks in Advance.

    Hi Know ,
    I know that we have to use the following BADIs
    ME_PROCESS_PO_CUST
    ME_GUI_PO_CUST
    But I does not know what are the methods to be implemented
    and what is the code we have to write in that methods .
    Thanks in advance ,
    Siva.

  • 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.

  • Batch Number creation through DIAPI

    Dear all,
         i tried batch number creation through DIAPI.. but its shows error message [WTR1.Whscode][Line:1],'No matching Records found(ODBC-2028)' any body helpme  in this regard..
    thanks in advance.. here i have attached my coding..
    Dim objLines As SAPbobsCOM.StockTransfer_Lines
            objForm = objAddOn.objApplication.Forms.Item(FormUID)
            Dim objStockTransfer As SAPbobsCOM.StockTransfer
            objStockTransfer =    objAddOn.objCompany.GetBusinessObjectSAPbobsCOM.BoObjectTypes.oStockTransfer)    
            objStockTransfer.DocDate = System.DateTime.Today
            objStockTransfer.TaxDate = System.DateTime.Today
            objStockTransfer.FromWarehouse = "01"
            objStockTransfer.PriceList = 1
            objStockTransfer.Lines.ItemCode = "B000001"
            objStockTransfer.Lines.Quantity = "1"
            objStockTransfer.Lines.WarehouseCode = "BAP"
            objStockTransfer.Lines.BatchNumbers.BatchNumber = "B10"
            objStockTransfer.Lines.BatchNumbers.Quantity = "1"
                  objStockTransfer.Lines.BatchNumbers.Add()
                If objStockTransfer.Add <> 0 Then
                objAddOn.objApplication.SetStatusBarMessage(objAddOn.objCompany.GetLastErrorDescription, SAPbouiCOM.BoMessageTime.bmt_Short, True)
                objAddOn.objApplication.MessageBox(objAddOn.objCompany.GetLastErrorDescription)
            Else
                objAddOn.objApplication.SetStatusBarMessage("Inventory Transfered Successfully", SAPbouiCOM.BoMessageTime.bmt_Short, False)
            End If
    With Regards
    G.shankar Ganesh

    Shankar,
    your code looks fine. just ensure that the warehouse code and batch you are specifying , do exist in owhs and oibt tables respectively, with the specified quantity. ( and the best way to check it is, try stock transfer from UI with the same parameters.)
    also, may be off topic, but, before specifying batch lines, you need to ensure that items are managed by batch or not )
    regards,
    Binita

  • Batch creation at co11n and co15

    Hi,
    I wann create auto batch creation at the time of order confirmation i.e. at co11n and co15, can anyone tell step by step wht confg shd i require?
    kindly assist

    Hi,
    If you are maintaining batch characteristics you cannnot create auto batch at the confirmation level as you have to create batch by the transaction MSC!N, then you can assign the batch number manually. IF you are not maintaining the batch characteristics then you can create auto batch at the prod order creation level that in the display mode or background, while doing confirmation you can automatically get the batch. If you want to get at the Confirmation level then the following steps
    1. Control key OP00  Allow Auto GR
    2. Scheduling profile OPKP   Auto GR
    3. Order type dependant parameters OPL8 Batch search procedure for 261 mvt type for raw material consumption.
    4. Material master MM01 workscheduling view batch reqd entry and batch managed and prod unit and prod stor loc
    5. Define batch creationn for batch creation for prod order
    6. Define batch creation for Goods movements
    7. Activate batch internal number assignment
    for 5,6,7 SPRO -- Logistics -- General -- Batch management.

Maybe you are looking for

  • Fillable Form - Can't use in Reader

    I've developed a fillable form that I saved to be able to access in reader.  Unfortunately, it doesn't seem to be working.  Here's a link... http://www.blocaldetroit.com/wp-content/uploads/2014/01/Just-Baked-F04_distributed_0001.pd f Can someone help

  • Its very urgent:How to insert data one table to another table

    Hi all, i am very new to oaf. i have employee_number(per_all_people_f) lov is there.once select the employee number and click on the submit button what ever select the employee number it ll move to new_operation_manager in custom table. plz help me h

  • How to use bonjour, how to use bonjour

    I try to use a western digital my book world edition for my home network but i am not able to configure it. Ho to do ?

  • Map files

    Hello Im making a 2D game and the maps are built up by three images and a text file. I'm now wondering if it's possible to put all these files into one, like level1.map or similar, and later extracting them. Maybe the smartest thing would be to put t

  • Satellite P305-S8832 - Media buttons don't work with Win7

    Hello Wise Friends, Recently I installed two brand new hard drives (500GB 7200 rpm OS/ 500GB 5400 rpm DATA) and I did a clean installation of Windows 7 Home Premium 32 bits on my 3 1/2 Toshiba Satellite P305-S8832. Everything but the media buttons is