SD Function module Used the same way in S/4HANA

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.

Function group
V10A
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
CMR_KUNNRKNMT-KUNNRCustomer numberYes
CMR_VKORGKNMT-VKORGSales organizationYes
CMR_VTWEGKNMT-VTWEGDistribution channelYes
CMR_SPARTTVTA-SPARTDivisionYes
CMR_KDMATKNMT-KDMATCustomer material numberYes
CMR_MATNRKNMT-MATNRSAP material number—

Exporting parameters

ParameterTypeDescription
CMR_KNMTKNMTCustomer-material info record

Exceptions

  • KNMT_NOT_FOUND — Info record not found

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

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

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report