BAPI : MATERIAL MASTER - Internal Number generation

Dear Experts,
                    I am using BAPI_MATERIAL_SAVEDATA to update material master,Material number should be generated
internally.If iam not including Material number,Bapi returns errror mesage.How can i do this?
Regards,
Sujay .

From the function module documentation:
                                                                                o   MATERIAL                                                            
     Only external number assignment is supported for the material number
     (MATERIAL). If you want the material number to be assigned          
     internally, the method BAPI_MATERIAL_GETINTNUMBER must first be     
     called. This method determines an internal number for the material  
     to be created. You must enter this internal number in field         
     HEADDATA-MATERIAL.                                                  
Hope this helps,
-Mark

Similar Messages

  • Create material master using BAPI .(Mat. internal number range)

    I would like to create the material using BAPI. (Material is internal number range).
    I am trying to create the material using BAPI  BAPI_MATERIAL_SAVEDATA, but material number is required field as per BAPI documentation .
    Can you please suggest me the function modules or BAPI to load materials which are in internal number range.
    Regards
    Badari

    Hi ,
    Use FM 'MATERIAL_NUMBER_GET_NEXT' to get next available material #.
    You can use that material # in BAPI 'BAPI_MATERIAL_SAVEDATA'.
    Cheers,
    Vikram

  • Wrong Serious of Customer Master Internal Number Range

    Dear All,
    I have created Customer Master Internal Number Range from 10000000 to 19999999.
    My first customer number is 10000000..Next customer system is giving the number as 10000005..(Instead of 10000001)..This serious is going like 10000010,10000015 etc..
    Kindly give me the solution for the same.
    Barathi

    hI
    Goto SNUM and enter the object as DEBITOR and click on change and now if any value is there in number range buffereing
    regards

  • Material Master External Number Range problem

    Material Master External Number Range that allows numerics only and combo of numerics, Alpha and Characters
    I have the following issue. My client wants to use a purely External Numbering System in SAP
    - They only use one Material Type (HALB).
    The range must be able to manage material numbers that:
    1. Are up to 18 CHAR
    2. Have Leading Zero's(Numeric Only) - example 0123, 0000223, etc
    3. Purely numeric (no zeros) - ex 56788, 1235456
    4. Have Leading Zero's with (Alpha Numeric) - ex 00A456
    5. Alpha numeric (No Zeros) ex T123542
    6. Leading Zero's with a '.' in the Mat Number
    Four examples
    005.009.23
    0000A.123.5544 M1
    000.593.33234
    0.1234
    I have the Lexiographical Setting Checked
    Leading Zero's Checked
    Range is - 000000000000000000 to ZZZZZZZZZZZZZZZZZZ
    The issue I have is with the last two examples in 6 above 'Leading zero's with a '.' in the Mat Number.
    It seems the system has an issue with zero's then a decimal point without having another number of letter in between. It will allow 00000002.1223 but not 000000.1223. The only way I can get the system to take the leading zero then '.' entries is to check 'X' the 'External Number Assignment w/o Check in the Material Type HALB. When I do that I am no longer allowed to create purely numeric numbers. Any help?
    Creating another material type is not an option. Also the '.' can be in any position in the layout.
    Thanks in Advance!
    --Chris

    ASCII and UNICODE values of period (.) are lower that 0.
    Solution: Change your number range like this
    From
    Range is - 000000000000000000 to ZZZZZZZZZZZZZZZZZZ
    To
    Range is  - - - - - - - - - - - - - - - - - - to ZZZZZZZZZZZZZZZZZZ
    (replace zeroes with hyphen, because the value of hyphen is lower than period)
    [ASCII table|http://www.asciitable.com/] for reference.
    Edited by: Jeevan Sagar on Nov 29, 2011 1:04 PM

  • FM for internal number generation

    Hi Friends,
    I want to generate one internal number and print the same for my Gate Pass Form...this number should be alloted to the particular delivery document which i called for and it goes like other delivery document number for follow-ups.
    If i call the same delivery number for multiple print out...the gates pass no should be same as generated once.
    Example in FORM****
          Gatepass No:1
           Invoice No: 98300012
       then in next FORM
          Gatepass No: 2
          Invoice No: 98301247
    Pls advise with some sample code of FM.
    thanks & regards
    sankar.
    Edited by: sankar babu on Jan 31, 2008 9:13 AM
    Edited by: sankar babu on Jan 31, 2008 12:26 PM

    Step 1)
    Create a Number Range in SNRO Transaction.
    Step 2)
    Create a Z Table with two fields Delivery Number and Gate Pass Number.
    Step 3)
    In your form, write the code as per the following guidelines.
    select single * from ZTABLE where DELIVERY = P_DELIVERY.
    if sy-subrc <> 0.
    Use the FM NUMBER_GET_NEXT to get the next available
    number.
    ztable-delivery = p_delivery.
    ztable-gatepassno = <Number that was returned by the FM>.
    modify ztable from ztable.
    endif.
    Regards,
    Ravi Kanth Talagana

  • Bapi  material master create

    heloo gurus,
    when i execute the below code
    it throws a short dump error
    can u please correct my code if there is anything wrong in it
      DATA: headdata    TYPE bapimathead.
      DATA: clientdata  TYPE bapi_mara.
      DATA: clientdatax TYPE bapi_marax.
      DATA: plantdata  TYPE bapi_marc.
      DATA: plantdatax TYPE bapi_marcx.
      DATA: descdata    TYPE TABLE OF bapi_makt WITH HEADER LINE.
    *data: return  type table of bapiret2 with header line.
      DATA: returnm TYPE TABLE OF bapi_matreturn2 WITH HEADER LINE.
      DATA: imat    TYPE TABLE OF bapimatinr WITH HEADER LINE.
      CALL FUNCTION 'BAPI_MATERIAL_GETINTNUMBER'
        EXPORTING
          material_type          = 'ZMED'
      INDUSTRY_SECTOR        = 'M'
        TABLES
          material_number        = imat.
      READ TABLE imat INDEX 1.
      IF sy-subrc = 0.
        headdata-material = imat-material.
      ENDIF.
      headdata-ind_sector      = 'Z'.
      headdata-matl_type       = mtart.
      headdata-basic_view      = 'X'.
      headdata-purchase_view   = 'X'.
      clientdata-base_uom      = meins.
      clientdatax-base_uom     = 'X'.
      clientdata-old_mat_no    = bismt.
      clientdatax-old_mat_no   = 'X'.
      clientdata-matl_group    = matkl.
      clientdatax-matl_group   = 'X'.
      clientdata-document      = zeinr.
      clientdatax-document     = 'X'.
      clientdata-size_dim      = groes.
      clientdatax-size_dim     = 'X'.
      clientdata-std_descr     = normt.
      clientdatax-std_descr    = 'X'.
      clientdata-basic_matl    = wrkst.
      clientdatax-basic_matl   = 'X'.
      clientdata-del_flag      = lvorm.
      clientdatax-del_flag     = 'X'.
      descdata-langu = sy-langu.
      descdata-matl_desc = maktx.
      APPEND descdata.
      plantdata-pur_group     = ekgrp.
      plantdatax-pur_group    = 'X'.
      plantdata-auto_p_ord    = kautb.
      plantdatax-auto_p_ord   = 'X'.
      plantdata-plant         = werks.
      plantdatax-plant        = 'X'.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          headdata                   = headdata
          clientdata                 = clientdata
          clientdatax                = clientdatax
          plantdata                  = plantdata
          plantdatax                 = plantdatax
      FORECASTPARAMETERS         =
      FORECASTPARAMETERSX        =
      PLANNINGDATA               =
      PLANNINGDATAX              =
      STORAGELOCATIONDATA        =
      STORAGELOCATIONDATAX       =
      VALUATIONDATA              =
      VALUATIONDATAX             =
      WAREHOUSENUMBERDATA        =
      WAREHOUSENUMBERDATAX       =
      SALESDATA                  =
      SALESDATAX                 =
      STORAGETYPEDATA            =
      STORAGETYPEDATAX           =
       IMPORTING
          return                     = return
        TABLES
          materialdescription        = descdata
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
          returnmessages             = returnm
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    CHECK sy-subrc  = 0.
      IF sy-subrc EQ 0.
        return-number     = 0.
        return-type       = 'S'.
        return-id         = 'Z1'.
        return-message    = 'Successfully updated'.
        return-message_v1 = ''.
        return-message_v2 = ''.
        return-message_v3 = ''.
        return-message_v4 = sy-mandt.
      ELSE.
        return-number     = 0.
        return-type       = 'E'.
        return-id         = 'Z1'.
        return-message    = 'Not updated'.
        return-message_v1 = ''.
        return-message_v2 = ''.
        return-message_v3 = ''.
        return-message_v4 = sy-mandt.
      ENDIF.
    <b>Error analysis</b>
        An exception occurred. This exception is dealt with in more detail bel
        . The exception, which is assigned to the class 'CX_SY_DYN_CALL_ILLEGA
         was neither
        caught nor passed along using a RAISING clause, in the procedure
         "ZTEST_BAPI_MM01" "(FUNCTION)"
        Since the caller of the procedure could not have expected this excepti
         to occur, the running program was terminated.
        The reason for the exception is:
        The call to the function module "BAPI_MATERIAL_SAVEDATA" is incorrect:
        In the function module interface, you can specify only
        fields of a specific type and length under "RETURN".
        Although the currently specified field
        "RETURN" is the correct type, its length is incorrect.
    Thamks
    senthil

    i have uncommented the line
    data: return  type table of bapiret2 with header line.

  • Change number in material master required steps to use

    Hi All.
    Thanks in advance sap  mm dudes.
    Need steps in sap mm material master change number.
    creation of change number  and usage  of change number
    Display of list of changes.
    Regards.
    parameshwar

    Dear Parameshwar,
    1.I assume you have created a change number without release key in CC01.
    2.In CC02,for the same change number goto object types and include the check box against material for the first 3 check box and
    save the change number.
    3.Now check in MM02 for any material master changes or I would suggest you to create a new change number with valid from
    date as current date,include the settings for material under object types and then check in MM02.
    Check and revert.
    Regards
    Mangalraj.S

  • Duplicate material master records ?

    There are duplicate material master for the same material. In some cases there are more than two master data for the same material.?

    Hi,
    They material are internal number or external number.
    If internal number then only the discription might be the same with 2 or more material number.
    If external numbet then check the 2 same material how the difference in material number.
    If you want to delete or block then check the inventory status in the material.
    then do the further action.
    SAM

  • LSMW - internal number range MM01

    Hi All,
    How to upload Material Master with MATERIAL NO as internal. I have all other datas in Notepad except material no which will be generated internally. How to upload in LSMW.
    Could you please help me on this in DETAIL please

    hi
    u will have to leave material number field blank
    but be veru carefull while uploding material wioth internal number
    as this material master will depend on othe master upload also like most cretial bom
    plan properly for it
    if in mater date for materi i have fine where
    1
    2
    3
    4
    5
    6
    7
    8
    material i have in file
    and in bom i have under 8 in have 3,4,5
    so i have created masters for bom also
    while uploading master any of the line miss the all ur templet for bom will change
    so to avoide this
    first upload all material with only basic view so that there will be many less chances of missing any number
    then u can upload reast of the views
    reward if usefule

  • MDM Internal number Assignment

    Hi Experts,
    Need your guidence on the below scenario.
    1. how is the internal number assignment configuration done in MDM ( where the number is generated as soon as you save the records in the repository)
    2. ECC has internal number generation for FERT Material, and i am creating a record in MDM which also has internal number generation whose number range match with the ECC number range for material type FERT. what is the configuration required to syndicate the record from MDM to ECC ( as ECC has internal number generation).
    Thanks in Advance.

    Hi Sandhya,
    Its a difficult thing to comment why the design is like this,there is a purpose why it is made such.
    Suppose you create a Material in MDM system 100010002000(say) and ECC system is defined for internal number generation.
    You send the material through PI to ECC as idoc.
    And torrow MDM system goes down or there is a business requirement because of which you have to create Material in ECC.
    This will require huge manual intervention and possibility of error is quiet high if Number range is defined as external.
    Whereas if it is Internal (as in your case) ECC takes care of the number range and the sequence.
    The ALE processing of idoc does not update the status of the current number range used.You can goto MMNR to check this for Material,xkn1 for Vendor.And this is the major concern with external number generation definition in ECC.
    For further detaills regarding Material number range please go through :
    http://saptechsolutions.com/pdf/MaterialNumberRangesAndFormatting.pdf
    Hope this helps!
    Thanks,
    Ravi

  • Material Master - Urgent

    Hi Abapers,
    There is an issue needing resolution relating to the functionality for handling UPC codes and GTIN numbers on the material master record.
    we need to carry both the UPC code and the GTIN codes on the same record. The UPC code is  typically a 12 digit number and the GTIN code is the same number of length 14 by adding two leading zeros.
    SAP is checking numbers being entered in the EAN/UPC field on Basic Data 1 screen of the material master record (MARA-EAN11) as absolute number only i.e.., its considering 49000024661 even if we give 00049000024661.
    How can we maintaing leading zeros for this field. referred OSS note: 545520 but couldnt find any solution.
    Please suggest as what need to be done inorder to maintain leading zeros as well. how can we achieve this?
    Does it require abap coding or functional configuring?
    Please do the needfull. Points are sure for all usefull answers..
    Thanks in advance...

    Hi,
    In programs  u can use func modules
    CONVERSION_EXIT_ALPHA_INPUT
    CONVERSION_EXIT_ALPHA_OUTPUT.
    For changing number assignment to mm01 check these exits.
    Enhancement/ Business Add-in            Description
    Enhancement
    MGA00001                                Material Master (Industry): Checks and Enhancements
    MGA00002                                Material Master (Industry): Number Assignment
    MGA00003                                Material Master (Industry and Retail): Number Display

  • Addition of new TAB at Material Master screen

    Hi Experts,
    I want to add one new tab in between "Descriptions" and "Unit of Measure" tab (under "Additional Data" section in material master). That should hold few language dependent "Brand and Product" data. But, I have no idea is it possible or not. 
    Please let me know the process if it is possible.
    Thank You.

    Transaction Code - MM01                     Create Material &
    Exit Name           Description
    MGA00001            Material Master (Industry): Checks and Enhancements
    MGA00002            Material Master (Industry): Number Assignment
    MGA00003            Material Master (Industry and Retail): Number Display
    No of Exits:          3
    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
    USER EXIT
    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

  • Exit for Material Master UPdate

    Hi Friends,
    could anyone let me know any user exit for Material Master UPdate.
    Thanks in Advance
    Regards

    hi
    good
    MGA00001            Material Master (Industry): Checks and Enhancements
    MGA00002            Material Master (Industry): Number Assignment
    MGA00003            Material Master (Industry and Retail): Number Display
    thanks
    mrutyun^

  • Internal number assignment in mm

    Hi,
        My client requirement is for each material,the internal number assignment should be character field like  KS00023. for example material is manufactured by kawasaki KS00023 n if the material is from tata
    the TT00024.They want along with internal number, code of the manufactured company.
    is it possible in sap through enhancements.
    please help me as soon as possible.
    Thx in advance,
    Neelima.N

    Hi Neelima,
                     Go to the transaction SNRO and give the Object as MATERIALNR and go for Number ranges and  Display intervals.These number ranges would be assigned by the functional guys. For more information go for object types for Materials in the SNRO transaction M*.
            U can also create ur own intervals in the transactin SNRO by going to option Number Ranges
    Regards,
    Vijaya Lakshmi
    Edited by: Vijaya Lakshmi on Jan 21, 2009 8:34 AM

  • User Exit or BADI for Material master

    When save in MM1 or MM02,  we need a user exit or Badi to <u><b>get ECM data</b></u> (which is saved in AENR or AEOI table). Please help for this.

    Hi Krishna,
    Enhancement/ Business Add-in            Description
    Enhancement
    MGA00001                                Material Master (Industry): Checks and Enhancements
    MGA00002                                Material Master (Industry): Number Assignment
    MGA00003                                Material Master (Industry and Retail): Number Display
    Business Add-in
    MG_MASS_NEWSEG                          User-Specific Fields & Segments in Mass Maintenance
    MATGRP_SKU_UPD
    CDT_CHECK_MATERIAL                      Checks for Existence of a Material in a CDT
    BADI_MM_MATNR
    BADI_MAT_F_SPEC_SEL                     BAdI for Material Special Field Selection
    BADI_MATNR_CHECK_PVS
    BADI_MATERIAL_REF                       Addition of customer-defined default data for material
    BADI_MATERIAL_OD
    BADI_MATERIAL_CHECK                     Enhanced checks for material master table
    BADI_GTIN_VARIANT
    BADI_EAN_SYSTEMATIC
    o.of Exits:          3
    o.of BADis:         11
    These ar ethe avilable exits and badis.
    Rgds,
    P.Naganjana Reddy

Maybe you are looking for

  • How to Capture warning message in SHDB recording

    Hi SDN, I am getting problem in Recording FB03 through SHDB. when i am clicking on save as complete button i am getting a warning message as duplicate entry. when click on enter button the actuval object got saved bu from recording it is not captured

  • How to deal with inconsistent font sizes?

    I sign every post at my blog (using the type tool). Even if I use the same fontsize in photoshop the result in actual size varies (I realize this has to do with cropping it in camera raw), Is there a way of getting a consistent font size (i.e size in

  • What to use to lookup label for a given value and just render the label ?

    Which component or function to best use to render a label as an outputText in a table regarding the value that is loaded from the iterator. I'm searching for something like a lov but just to render the corresponding label as an outputText. Does somet

  • Restart Message request authentication!

    hi all,     When we restart messages in sxmb_moni, XI ask me for the user and password. I thing that is becase of  we have changed some service user's password and some where we forgot change in ABAP or JAVA stack.      Hope you can help me!      Tha

  • Import MPEG from Kodak EasyShare

    My wife has a Kodak EasyShare Z700. We recently used it to make some short MPEG clips. iPhoto 4 doesn't seem to import them. In addition, when we connect the camera to the computer it doesn't appear as a USB-mounted disk so I can't rummage around loo