P_SalesOrderFlfmtContact2

DDL: P_SALESORDERFLFMTCONTACT2 SQL: PSOFContact2 Type: view COMPOSITE

P_SalesOrderFlfmtContact2 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_CustomerContacts, I_SalesDocument) and exposes 15 fields with key field SalesDocument.

Data Sources (2)

SourceAliasJoin Type
I_CustomerContacts CC inner
I_SalesDocument SDH from

Parameters (1)

NameTypeDefault
P_SalesOrder vbeln_va

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSOFContact2 view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument
Customer I_CustomerContacts Customer
CustomerName
FirstName I_CustomerContacts FirstName
LastName I_CustomerContacts LastName
ContactPersonFunction I_CustomerContacts ContactPersonFunction
InternationalPhoneNumber I_CustomerContacts InternationalPhoneNumber
PhoneNumber I_CustomerContacts PhoneNumber
PhoneNumberExtension I_CustomerContacts PhoneNumberExtension
InternationalMobilePhoneNumber I_CustomerContacts InternationalMobilePhoneNumber
MobilePhoneNumber I_CustomerContacts MobilePhoneNumber
EmailAddress I_CustomerContacts EmailAddress
PartnerFunction
ContactIsExternal
ContactIsInternal
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #S
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck:#NOT_REQUIRED
@AbapCatalog.sqlViewName: 'PSOFContact2'

define view P_SalesOrderFlfmtContact2
with parameters
    P_SalesOrder    : vbeln_va

as select  from I_SalesDocument as SDH  

inner join I_CustomerContacts as CC
                                    on CC.Customer = SDH.SoldToParty

{
  //Key

  key SalesDocument,
  
  //Partner

  CC.Customer,
  CC._Customer.CustomerName,
  CC.FirstName,
  CC.LastName,
  CC.ContactPersonFunction,
  CC.InternationalPhoneNumber,
  CC.PhoneNumber,
  CC.PhoneNumberExtension,
  CC.InternationalMobilePhoneNumber,
  CC.MobilePhoneNumber,
  CC.EmailAddress,
  'AG' as PartnerFunction,
  cast('X' as external_contact)  as ContactIsExternal,
  cast(''  as internal_contact)  as ContactIsInternal

  }
  where    SalesDocument =   $parameters.P_SalesOrder                                                                
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CUSTOMER",
"I_CUSTOMERCONTACTS",
"I_SALESDOCUMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/