In SAP EWM the material ID is stored in /SAPAPO/ tables using the data element /SAPAPO/MATID which is a CHAR 22. In the other hand, /SCWM/ tables use the data element /SCWM/DE_MATID which is a RAW 16. All the standard code I've seen, uses the class CL_SYSTEM_UUID and for instance the method IF_SYSTEM_UUID_STATIC~CONVERT_UUID_C22 to map a C22 material ID to a X16.
This is preventing me to join tables directly without first selecting, then converting the material ID and finally selecting.
Is there a way to execute a SELECT joining two tables with the different type of ID?
The system is running a HANA database and ABAP 7.50.
The 2 tables I want to join are: /SAPAPO/MATKEY and /SCWM/PVPAKC
I would like to execute a select similar to this:
SELECT FROM /scwm/pvpakc AS pack_spec
INNER JOIN /sapapo/matkey AS material ON material~matid = pack_spec~matid
FIELDS pack_spec~pvguid as ps_guid,
material~matnr as material_num
INTO TABLE @DATA(lt_pack_spec_material).
Of course the above join is not possible since the MATID between tables needs to be converted
