[SAP CAR] – Query Material Master from SAP CAR

Hi Guys,

In this topic, i will show you step by step to use SAP CAR API to get article master directly and via SAP PO. You can find standard API from SAP CAR [1]

1/ Scenario: Consume SAP CAR API Directly

SystemRemarks
SAP ERP, SAP S/4 HANAReplicate master data to SAP CAR via SLT (System Landscape Transformation) [2]
The list of replication tables can find here [3]
SAP CARSAP CAR expose REST API web services to a third-parties system that can access Odata services directly

API Information

Object NameValue
OData URLhttp://<domain-name&gt;:<port-number>/sap/is/retail/car/int/odata/CARServices.xsodata/MaterialInternationalArtlNmbrQuery(P_SAPClient='<client-number>’)/Results?$format=json&$filter=Material eq ‘<material-number>’
Input ParametersP_SAPClient: SAP Client
filter: Here you can input filter condition with single or multi-fields

Response fields

Field NameDescription
GenID
SAPClientSAP Client Number
MaterialSAP Material Number
MaterialNameSAP Material Name
BaseUnitBase Unit of Measure
UnitOfMeasure_EUnit of Measure English
UnitOfMeasureLongNameUnit of Measure Long Name
SequenceNumberSequence Number
InternationalArticleNumberInternational Article Number
InternationalArticleNumberCatInternational Article Number Category
IsMainInternationalArticleNmbrIs Man International Article Number

How to test

Download POSTMAN Testing tools here [4]

Postman parameter nameValue
MethodGET
URLhttp://<domain-name&gt;:<port-number>/sap/is/retail/car_s4h/int/odata/CARServices.xsodata/MaterialInternationalArtlNmbrQuery(P_SAPClient=’200′)/Results?$format=json&$filter=InternationalArticleNumber eq ‘2000800014601’

For “filter” you can filter with any fields as result response like Material eq ‘000000000010000000’ and InternationalArticleNumber eq ‘2000800014601’
Authorization TypeBasic Authorization
CredentialSAP Hana User Name and Password

2/ Scenario: Consume SAP CAR API via SAP PI/PO

We can use SAP PI/PO as Enterprise Service Bus to expose SOAP Webservice to thrid-parties systems.

SystemRemarks
SAP ERP, SAP S/4 HANAReplicate master data to SAP CAR via SLT (System Landscape Transformation) [2]
The list of replication tables can find here [3]
SAP CARSAP CAR expose REST API web services to a third-parties system that can access Odata services directly
SAP PI/POSAP PI/PO will consume SAP CAR Rest API service and export to SOAP Webservice
Field NameDescription
GenID
SAPClientSAP Client Number
MaterialSAP Material Number
MaterialNameSAP Material Name
BaseUnitBase Unit of Measure
UnitOfMeasure_EUnit of Measure English
UnitOfMeasureLongNameUnit of Measure Long Name
SequenceNumberSequence Number
InternationalArticleNumberInternational Article Number
InternationalArticleNumberCatInternational Article Number Category
IsMainInternationalArticleNmbrIs Man International Article Number

Data Types

Data TypeRemarks
DT_LEGACY_MATERIAL_EAN_RQLegacy request data type
DT_SAP_MATERIAL_EAN_RQSAP Request data type
DT_LEGACY_MATERIAL_EANLegacy response data type
DT_SAP_MATERIAL_EANSAP response data type

Message Type

Message TypeRemarks
MT_LEGACY_MATERIAL_EAN_RQLegacy request message type
MT_SAP_MATERIAL_EAN_RQSAP Request message type
MT_LEGACY_MATERIAL_EANLegacy response message type
MT_SAP_MATERIAL_EANSAP response message type

Service Interface: SI_MATERIAL_EAN_IN

Service Interface: SI_MATERIAL_EAN_INAttribute Value
CategoryInbound
ModeSynchronous
RequestMT_SAP_MATERIAL_EAN_RQ
ResponseMT_SAP_MATERIAL_EAN

Service Interface: SI_MATERIAL_EAN_OUT

Service Interface: SI_MATERIAL_EAN_OUTAttribute Value
CategoryOutbound
ModeSynchronous
RequestMT_LEGACY_MATERIAL_EAN_RQ
ResponseMT_LEGACY_MATERIAL_EAN

Message Mapping: MM_MATERIAL_EAN_RQ

Source Message TypeDestination Message Type
MT_LEGACY_MATERIAL_EAN_RQMT_SAP_MATERIAL_EAN_RQ

Message Mapping: MM_MATERIAL_EAN

Source Message TypeDestination Message Type
MT_SAP_MATERIAL_EANMT_LEGACY_MATERIAL_EAN

Operation Mapping: OM_MATERIAL_EAN

NameValue
Operation NameOM_MATERIAL_EAN
Source OperationSI_MATERIAL_EAN_OUT
Target OperationSI_MATERIAL_EAN_IN
Source Message RequestMT_LEGACY_MATERIAL_EAN_RQ
Target Message RequestMT_SAP_MATERIAL_EAN_RQ
Request Message MappingMM_MATERIAL_EAN_RQ
Source Message ResponseMT_SAP_MATERIAL_EAN
Target Message ResponseMT_LEGACY_MATERIAL_EAN
Message Mapping ResponseMM_MATERIAL_EAN

Integration Builder: Rest receiver channel

Integration Builder: Sender channel

Integrated Configuration


[1] – SAP CAR OData services Material EAN https://help.sap.com/viewer/e95c8443f589486bbfec99331049704a/5.0.1/en-US/3560c553c9513563e10000000a4450e5.html

[2] – SAP System Landscape Transformation https://www.sap.com/sea/products/landscape-transformation.html

[3] – Replication Tables https://help.sap.com/viewer/product/CARAB/5.0/en-US?task=implement_task

[4] – Download Free REST API testing tools https://www.postman.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.