# RV_CUSTOMER_MATERIAL_READ — Read Customer-Material Info Record

> Reads the customer-material info record (KNMT) for a sales organization, distribution channel and customer, by the customer's own material number or by the SAP material number. It is used in interfaces that map orders arriving with the customer's own material codes (EDI, e-commerce, Excel) to SAP materials, and in delivery note and invoice forms to print the customer material number. If no record exists the KNMT_NOT_FOUND exception is raised; you may need to treat this as information rather than an error.

- Modules: SD
- Type: Function module
- Function group: V10A
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/rv-customer-material-read/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| CMR_KUNNR | KNMT-KUNNR | Customer number | Yes |
| CMR_VKORG | KNMT-VKORG | Sales organization | Yes |
| CMR_VTWEG | KNMT-VTWEG | Distribution channel | Yes |
| CMR_SPART | TVTA-SPART | Division | Yes |
| CMR_KDMAT | KNMT-KDMAT | Customer material number | Yes |
| CMR_MATNR | KNMT-MATNR | SAP material number | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| CMR_KNMT | KNMT | Customer-material info record |

## Exceptions

- KNMT_NOT_FOUND: Info record not found

## Call template (ABAP)

```abap
CALL FUNCTION 'RV_CUSTOMER_MATERIAL_READ'
  EXPORTING
    cmr_kunnr = lv_cmr_kunnr
    cmr_vkorg = lv_cmr_vkorg
    cmr_vtweg = lv_cmr_vtweg
    cmr_spart = lv_cmr_spart
    cmr_kdmat = lv_cmr_kdmat
  IMPORTING
    cmr_knmt = lv_cmr_knmt
  EXCEPTIONS
    knmt_not_found = 1
    OTHERS = 2.
```

## Related tables

KNMT

