material

Defines the material that is used for an event.

The fields in the material table are defined as a specific instance of a material type, including a link to the supplier. It can be material that is used in a repair or material that is used in a production process.

The fields in the material table are listed in the following table.

Table 1. Fields in the material table
Field Type Comments
material_cd string(50) Required
material_name string(200) Required
material_type_cd string(50) Required
supplier_cd string(50) Required
language_cd string(50) Optional. This value must reference a row in the language table.
tenant_cd string(50) Optional. This value must reference a row in the tenant table.
IS_ACTIVE 0 or 1 Optional. A value of 0 indicates that the record is inactive. No value, or a value of 1, indicates that the record is active.

material code snippet

You can use the following SQL Code snippet to retrieve master data in the format that is required by the upsert API.

For example, if you lost the original files that are used to load master data, you can use the snippet to retrieve the data, make changes, and submit the changes by using the upsert API.

The command must be on a single line, not as shown here.

SELECT M.MATERIAL_CD, M.MATERIAL_NAME, MT.MATERIAL_TYPE_CD, S.SUPPLIER_CD, 
L.LANGUAGE_CD, T.TENANT_CD, M.ISACTIVE FROM SYSREC.MASTER_MATERIAL M 
JOIN SYSREC.LANGUAGE L ON M.LANGUAGE_ID = L.LANGUAGE_ID JOIN 
SYSREC.TENANT T ON M.TENANT_ID = T.TENANT_ID JOIN 
SYSREC.MASTER_MATERIAL_TYPE MT ON M.MATERIAL_TYPE_ID = MT.MATERIAL_TYPE_ID AND 
M.LANGUAGE_ID = MT.LANGUAGE_ID JOIN SYSREC.MASTER_SUPPLIER S ON M.SUPPLIER_ID = 
S.SUPPLIER_ID  AND M.LANGUAGE_ID = S.LANGUAGE_ID;