P_Bpcontacts_Func_Dept

DDL: P_BPCONTACTS_FUNC_DEPT SQL: P_MD_BPCFUNCDEPT Type: view BASIC Package: ODATA_MASTER_DATA_COMMON

Business Partner Contacts Function And Department

P_Bpcontacts_Func_Dept is a Basic CDS View that provides data about "Business Partner Contacts Function And Department" in SAP S/4HANA. It reads from 1 data source (but051) and exposes 13 fields with key fields relnr, BusinessPartner1, BusinessPartner2, ContactPersonFunction, ContactPersonDepartment. It has 2 associations to related views. Part of development package ODATA_MASTER_DATA_COMMON.

Data Sources (1)

SourceAliasJoin Type
but051 but051 from

Associations (2)

CardinalityTargetAliasCondition
[1..*] I_ContactPersonDepartmentT _ContactPersonDepartment $projection.ContactPersonDepartment = _ContactPersonDepartment.ContactPersonDepartment
[1..*] I_ContactPersonFunctionT _Contactpersonfunction $projection.ContactPersonFunction = _Contactpersonfunction.ContactPersonFunction

Annotations (3)

NameValueLevelField
AbapCatalog.sqlViewName P_MD_BPCFUNCDEPT view
VDM.private true view
VDM.viewType #BASIC view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY relnr but051 relnr BP Rel. Number
KEY BusinessPartner1 but051 partner1 Busn. Partner
KEY BusinessPartner2 but051 partner2 Busn. Partner
KEY ContactPersonFunction but051 pafkt Function
KEY ContactPersonDepartment but051 abtnr Department
PhoneNumber but051 tel_number Telephone
PhoneNumberExtension but051 tel_extens Extension
FaxNumber but051 fax_number Fax Number
FaxNumberExtension but051 fax_extens Extension
EmailAddress but051 smtp_address E-Mail Address
reltyp but051 reltyp Relatshp Cat.
_ContactPersonDepartment _ContactPersonDepartment
_Contactpersonfunction _Contactpersonfunction

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_Bpcontacts_Func_Dept.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: P_MD_BPCFUNCDEPT

CREATE VIEW P_Bpcontacts_Func_Dept AS
SELECT
  but051.relnr AS relnr,
  but051.partner1 AS BusinessPartner1,
  but051.partner2 AS BusinessPartner2,
  but051.pafkt AS ContactPersonFunction,
  but051.abtnr AS ContactPersonDepartment,
  but051.tel_number AS PhoneNumber,
  but051.tel_extens AS PhoneNumberExtension,
  but051.fax_number AS FaxNumber,
  but051.fax_extens AS FaxNumberExtension,
  but051.smtp_address AS EmailAddress,
  but051.reltyp AS reltyp
FROM but051
LEFT OUTER JOIN I_ContactPersonDepartmentT AS _ContactPersonDepartment ON ContactPersonDepartment = _ContactPersonDepartment.ContactPersonDepartment  -- association [1..*]
LEFT OUTER JOIN I_ContactPersonFunctionT AS _Contactpersonfunction ON ContactPersonFunction = _Contactpersonfunction.ContactPersonFunction  -- association [1..*]
;