SAP Knowledge Base Article - Public

2810992 - There is no cds view to fetch the email address

Symptom

For Business Partner with role supplier or customer, Fax and Email information can be maintained in the App Manage Supplier Master Data or App Manage Customer Master Data, but in the CDS view I_Supplier or I_Customer, there is only the Fax Number field and no E-mail field.

Environment

 SAP S/4HANA Cloud Public Edition

Cause

I_BusinessPartner, I_Supplier or I_Customer view does not have E-mail address attribute as it is part of another segment (Address). Hence it is not possible to extend the view with E-mail attribute.

Resolution

You have two options:

1.Use the CDS view I_BUSPARTADDRESS to retrieve the addressID and use the CDS view I_AddressEmailAddress_2 to get the email with the addressID refer to the help Email Address

2.Use the API API_BUSINESS_PARTNER

OData URI - [Host address]/sap/opu/odata/SAP/API_BUSINESS_PARTNER/$batch

Service need to be called 2 times- First Call is to get address number for the business partner and second call is to get address details(including E-mail) by passing Business Partner & Address Number.

1st Call

Content-Type: application/http
Content-Transfer-Encoding: binary

GET A_BusinessPartner(BusinessPartner='')/to_BusinessPartnerAddress.


2nd Call

Content-Type: application/http
Content-Transfer-Encoding: binary

GET A_BusinessPartnerAddress(BusinessPartner='',AddressID='Number got from 1st call')/to_EmailAddress

Keywords

S4_PC, SAP S/4HANA Cloud Public Edition, cloud, e-mail, supplier, vendor, customer, bp, core data services, business, partner, BP, mail, email, I_BusinessPartner, I_Supplier, I_Customer, A_BusinessPartnerAddress, A_BusinessPartner api_business_partner,addressid,emailaddress,businesspartneraddress,businesspartner,business partner , KBA , LO-MD-BP-2CL , Business Partners for Public Cloud , BC-SRV-ADR , Address Management / Business Address Services , LO-MD-BP , Business Partners , How To

Product

SAP S/4HANA Cloud Public Edition all versions