cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping handling unit IDs to material numbers

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Hi!

To convert GUID you can use fm /SCMB/MDL_GUID_CONVERT

BR, Alex.

Former Member
0 Kudos

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