Skip to Content

How to get the material data from reading a bar code using bar code reader in sales order

Dear ABAP/MM Experts

I have EAN number assigned for each UOM of material in material master

10000001 BOX 8887290006217

10000001 CAR 5901583400858

10000001 PC 6287009620147

Now I am trying to create a new sales order using VA01 using international bar code reader which is just plug and play. When I read the barcode in the sales order, it is getting the EAN number in the material number field, as there is a system validation on Material number it is giving the message "Material does not exit or Material is not defined ..." . What is the better approach to get the material number from the EAN number. And the question is how to get the material data and fill in the line item in sales order. Please assist or provide guidance to proceed further

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Dec 12, 2017 at 11:13 AM

    Check FM "GET_MATERIAL_ID" and see if this can provide Material Master data based on your 'EAN' Number.

    If not, please consult SAP ONE Support as there are many SAP-KBA's on te use of EAN in the MM and SD Area, including mentions of EAN-BAdI's which you could possibly enhance for your Requirements ...


    Kind regards

    Nic T.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 14, 2017 at 06:38 AM

    Hi Nic and ABAP/MM Experts,

    Thanks for the reply and assistance. I am creating sales order using VA01 and scanning the material keeping the cursor on material number and pressing enter.

    I am able to add code in an enhancement spot to get the material number and replace the barcode number, description and UOM and trying to put default order qty as 1 by using the exit MV45AFZZ - USEREXIT_MOVE_FIELD_TO_VBAP by putting RV45A-KWMENG='1.000' to fill the line item so that the next scanned item will be read into next line item. But it is giving a warning message in spite of giving the quantity

    and when I press enter it is getting cleared.

    Could you please anybody help me? It is very urgent

    Thanks for helping me out and useful answers will be rewarded

    Best regards,

    Add comment
    10|10000 characters needed characters exceeded

    • Some suggestions :

      • See via SAP ONE Support which EAN + BAdI Results turn up. I know of BAdI "BADI_EAN_SYSTEMATIC" which has a Default (Sample) Implementation "CL_EXM_IM_BADI_EAN_SYSTEMATIC", but I don't know if it will be raised in your case ...
      • Execute your complete flow in SAP, having set a BREAK-POINT in the "CL_EXITHANDLER"-Class "GET_INSTANCE"-Method which will be raised at any (Classic) BAdI. This way, you can see what BAdI's are triggered and you will hopefully find one regarding EAN-data : link
      • If these do not provide a Solution, see what Implicit Enhancements can be used (such as in this Wiki : link)


      Hope this helps

      Nic T.

  • Jan 24 at 01:06 PM

    FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    ENHANCEMENT 1 ZSD_SO_MATNO_FLDEXIT. "active version

    "Set the default quantiy to 1

    IF SY-TCODE = 'VA01' or SY-TCODE = 'VA02'.

    IF T180-TRTYP = 'H' or T180-TRTYP = 'V'.

    IF RV45A-KWMENG IS INITIAL.


    * VBAP-KWMENG = '1000'. "This is making the qty field as display only
    VBEP-WMENG = '1.000'. "Fix for retaining the qty to 1
    RV45A-KWMENG = '1.000'. "This is giving warning and stops on qty

    ENDIF.
    ENDIF.
    ENDENHANCEMENT.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24 at 01:06 PM

    FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    ENHANCEMENT 1 ZSD_SO_MATNO_FLDEXIT. "active version

    "Set the default quantiy to 1

    IF SY-TCODE = 'VA01' or SY-TCODE = 'VA02'.

    IF T180-TRTYP = 'H' or T180-TRTYP = 'V'.

    IF RV45A-KWMENG IS INITIAL.


    * VBAP-KWMENG = '1000'. "This is making the qty field as display only
    VBEP-WMENG = '1.000'. "Fix for retaining the qty to 1
    RV45A-KWMENG = '1.000'. "This is giving warning and stops on qty

    ENDIF.
    ENDIF.
    ENDENHANCEMENT.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24 at 01:09 PM

    Answered

    Add comment
    10|10000 characters needed characters exceeded