Skip to Content
avatar image
Former Member

Mapping handling unit IDs to material numbers

Dear Gurus,

I want to map handling unit IDs to material numbers (MATNR from /SAPAPO/MATKEY). How can I do this? Which tables do I need to join with /SCWM/ORDIM_C?

I found attribute MATID in table /SCWM/ORDIM_C which contains 32 digits and is a hex code. There's also an attribute MATID in /SAPAPO/MATKEY but this one has 22 digits and is a string.

Regards,

Mike

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Mar 15, 2015 at 07:20 PM

    Hi Mike,

    To be able to map matid from /scwm/ordim_c to /sapapo/matkey you need to convert it.

    Pls use the code below:

    data lv_matid like /sapapo/matkey-matid.

    CALL FUNCTION 'GUID_CONVERT'

      EXPORTING

    *   IV_GUID_X16                  =

    *    IV_GUID_C22                  =

       IV_GUID_C32                  = /scwm/ordim_c-matid

      IMPORTING

    *    EV_GUID_X16                  =

       EV_GUID_C22                  = lv_matid

    *   EV_GUID_C32                  =

    * EXCEPTIONS

    *   NO_UNICODE_SUPPORT_YET       = 1

    *   PARAMETERS_ERROR             = 2

    *   OTHERS                       = 3

              .

    IF SY-SUBRC <> 0.

    * Implement suitable error handling here

    ENDIF.

    I hope this will be working for you.

    Petr

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 16, 2015 at 05:40 AM

    Hi!

    To convert GUID you can use fm /SCMB/MDL_GUID_CONVERT

    BR, Alex.

    Add comment
    10|10000 characters needed characters exceeded