C_PurReqnItemDeliveryAddress

DDL: C_PURREQNITEMDELIVERYADDRESS SQL: CPRREQITMDELADD Type: view CONSUMPTION

Consumption View for Purchase Reqn Delivery address

C_PurReqnItemDeliveryAddress is a Consumption CDS View that provides data about "Consumption View for Purchase Reqn Delivery address" in SAP S/4HANA. It reads from 1 data source (I_Purchaserequisitionitem) and exposes 60 fields with key fields PurchaseRequisition, PurchaseRequisitionItem. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_Purchaserequisitionitem _Purchaserequisitionitem from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_OrganizationAddress _OrganizationAddress $projection.DeliveryAddressID = _OrganizationAddress.AddressID and _OrganizationAddress.AddressPersonID = '' and _OrganizationAddress.AddressRepresentationCode = ''
[0..1] I_AddrCurDefaultFaxNumber _CurrentDfltFaxNumber $projection.DeliveryAddressID = _CurrentDfltFaxNumber.AddressID
[0..*] I_AddressPhoneNumber_2 _PhoneNumber $projection.DeliveryAddressID = _PhoneNumber.AddressID and _PhoneNumber.PhNmbrIsCurrentOverallDefault = 'X'

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName CPRREQITMDELADD view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Consumption View for Purchase Reqn Delivery address view
Metadata.ignorePropagatedAnnotations true view

Fields (60)

KeyFieldSource TableSource FieldDescription
KEY PurchaseRequisition I_Purchaserequisitionitem PurchaseRequisition
KEY PurchaseRequisitionItem I_Purchaserequisitionitem PurchaseRequisitionItem
AddressID _OrganizationAddress AddressID
DeliveryAddressID I_Purchaserequisitionitem DeliveryAddressID
Plant I_Purchaserequisitionitem Plant
ManualDeliveryAddressID I_Purchaserequisitionitem ManualDeliveryAddressID
ItemDeliveryAddressID I_Purchaserequisitionitem ItemDeliveryAddressID
PurchasingGroup I_Purchaserequisitionitem PurchasingGroup
PurchaseRequisitionType I_Purchaserequisitionitem PurchaseRequisitionType
PurchasingOrganization I_Purchaserequisitionitem PurchasingOrganization
CareOfName _OrganizationAddress CareOfName
AdditionalStreetSuffixName _OrganizationAddress StreetSuffixName2
CorrespondenceLanguage _OrganizationAddress CorrespondenceLanguage
PrfrdCommMediumType _OrganizationAddress PrfrdCommMediumType
POBox _OrganizationAddress POBox
POBoxIsWithoutNumber _OrganizationAddress POBoxIsWithoutNumber
POBoxPostalCode _OrganizationAddress POBoxPostalCode
POBoxLobbyName _OrganizationAddress POBoxLobbyName
POBoxDeviatingCityName _OrganizationAddress POBoxDeviatingCityName
POBoxDeviatingRegion _OrganizationAddress POBoxDeviatingRegion
POBoxDeviatingCountry _OrganizationAddress POBoxDeviatingCountry
DeliveryServiceTypeCode _OrganizationAddress DeliveryServiceTypeCode
DeliveryServiceNumber _OrganizationAddress DeliveryServiceNumber
AddressTimeZone _OrganizationAddress AddressTimeZone
FullName _OrganizationAddress AddresseeFullName
CityName _OrganizationAddress CityName
District _OrganizationAddress DistrictName
CityCode _OrganizationAddress CityNumber
HomeCityName _OrganizationAddress VillageName
PostalCode _OrganizationAddress PostalCode
CompanyPostalCode _OrganizationAddress CompanyPostalCode
StreetName _OrganizationAddress StreetName
StreetPrefixName _OrganizationAddress StreetPrefixName1
AdditionalStreetPrefixName _OrganizationAddress StreetPrefixName2
StreetSuffixName _OrganizationAddress StreetSuffixName1
HouseNumber _OrganizationAddress HouseNumber
HouseNumberSupplementText _OrganizationAddress HouseNumberSupplementText
Building _OrganizationAddress Building
Floor _OrganizationAddress Floor
RoomNumber _OrganizationAddress RoomNumber
Country _OrganizationAddress Country
Region _OrganizationAddress Region
County _OrganizationAddress SecondaryRegionName
FormOfAddress _OrganizationAddress FormOfAddress
BusinessPartnerName1 _OrganizationAddress AddresseeName1
BusinessPartnerName2 _OrganizationAddress AddresseeName2
Nation _OrganizationAddress AddressRepresentationCode
PhoneNumber _PhoneNumber PhoneAreaCodeSubscriberNumber
FaxNumber _CurrentDfltFaxNumber FaxAreaCodeSubscriberNumber
SearchTerm1 _OrganizationAddress AddressSearchTerm1
StreetSearch
CitySearch
BusinessPartnerName3 _OrganizationAddress AddresseeName3
BusinessPartnerName4 _OrganizationAddress AddresseeName4
TaxJurisdiction _OrganizationAddress TaxJurisdiction
TransportZone _OrganizationAddress TransportZone
Person _OrganizationAddress AddressPersonID
FormOfAddressName
_FormOfAddress _OrganizationAddress _FormOfAddress
_Region _OrganizationAddress _Region
@AbapCatalog.sqlViewName: 'CPRREQITMDELADD'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@EndUserText.label: 'Consumption View for Purchase Reqn Delivery address'
@Metadata.ignorePropagatedAnnotations: true
//define view C_PurReqnItemDeliveryAddress as select from I_PurchaseReqnDeliveryAddress as _PurchaseReqnDeliveryAddress

//{

//    key PurchaseRequisition,

//    key PurchaseRequisitionItem,

//    @UI.identification: { position: 10, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address1', position: 10, label: 'Title', importance: #HIGH}]

//    FormOfAddress,

////    @UI.identification: { position: 10, importance: #HIGH }

////    @UI.fieldGroup:[{qualifier: 'Address1', position: 20, label: 'Full Name', importance: #HIGH}]

////    BusinessPartnerName1,

////    @UI.identification: { position: 20, importance: #HIGH }

////    @UI.fieldGroup:[{qualifier: 'Address1', position: 40, label: 'Name 2', importance: #HIGH}]

////    BusinessPartnerName2,

//    @UI.identification: { position: 20, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address1', position: 40, label: 'Name 2', importance: #HIGH}]

//    FullName,

//    @UI.identification: { position: 30, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address1', position: 50, label: 'Postal Code', importance: #HIGH}]

//    POBoxPostalCode,

//    @UI.identification: { position: 20, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address1', position: 60, label: 'Street', importance: #HIGH}]

//    StreetName,

//    @UI.identification: { position: 20, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address2', position: 20, label: 'City', importance: #HIGH}]

//    CityName,

//    @UI.identification: { position: 20, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address2', position: 30, label: 'House Number', importance: #HIGH}]

//    HouseNumber,

//    @UI.identification: { position: 20, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address2', position: 40, label: 'Country', importance: #HIGH}]

//    Country,

//    @UI.identification: { position: 20, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address2', position: 50, label: 'Region', importance: #HIGH}]

//    Region,

//    _PurchaseReqnDeliveryAddress._PurchaseReqnItem.PurchaseRequisitionType as PurchaseRequisitionType,

//    _PurchaseReqnDeliveryAddress._PurchaseReqnItem.PurchasingGroup as PurchasingGroup,

//    _PurchaseReqnDeliveryAddress._PurchaseReqnItem.PurchasingOrganization as PurchasingOrganization,

//    _PurchaseReqnDeliveryAddress._PurchaseReqnItem.Plant as Plant

//}

define view C_PurReqnItemDeliveryAddress as select from I_Purchaserequisitionitem as _Purchaserequisitionitem
//association [0..1] to I_Address as _Address on  $projection.DeliveryAddressID = _Address.AddressID 

  association [0..1] to I_OrganizationAddress    as _OrganizationAddress    on  $projection.DeliveryAddressID                  = _OrganizationAddress.AddressID
                                                                            and _OrganizationAddress.AddressPersonID           = ''
                                                                            and _OrganizationAddress.AddressRepresentationCode = ''    
//Address Associations for fax and phone  

 association [0..1] to I_AddrCurDefaultFaxNumber      as _CurrentDfltFaxNumber       on  $projection.DeliveryAddressID = _CurrentDfltFaxNumber.AddressID
  
 association [0..*] to I_AddressPhoneNumber_2         as _PhoneNumber               on  $projection.DeliveryAddressID = _PhoneNumber.AddressID     
                                                                                     and  _PhoneNumber.PhNmbrIsCurrentOverallDefault = 'X'
                                                                                                      
{

    key _Purchaserequisitionitem.PurchaseRequisition,
    key _Purchaserequisitionitem.PurchaseRequisitionItem,
        //_Address.AddressID,

        _OrganizationAddress.AddressID,
        case
        when _Purchaserequisitionitem.ManualDeliveryAddressID <> ''
          then cast ( 'U' as purreqnaddrtype)
        when _Purchaserequisitionitem.ManualDeliveryAddressID = '' and _Purchaserequisitionitem.ItemDeliveryAddressID = '' 
                    and _Purchaserequisitionitem.DeliveryAddressID <> ''
          then cast ( 'P' as purreqnaddrtype)
        else
          cast ( 'P' as purreqnaddrtype)
        end                                                         as  AddressType,
        
        _Purchaserequisitionitem.DeliveryAddressID,
        _Purchaserequisitionitem.Plant,
        _Purchaserequisitionitem.ManualDeliveryAddressID,
        _Purchaserequisitionitem.ItemDeliveryAddressID,
        _Purchaserequisitionitem.PurchasingGroup,
        _Purchaserequisitionitem.PurchaseRequisitionType,
        _Purchaserequisitionitem.PurchasingOrganization,
// 2308CL : Use of new address interface I_ADDRESS_2 (I_OrganizationAddress)  

/*        
        _Address.CareOfName,  
        _Address.AdditionalStreetSuffixName, 
        _Address.CorrespondenceLanguage, 
        _Address.PrfrdCommMediumType, 
        _Address.POBox, 
        _Address.POBoxIsWithoutNumber,       
        _Address.POBoxPostalCode, 
        _Address.POBoxLobbyName, 
        _Address.POBoxDeviatingCityName, 
        _Address.POBoxDeviatingRegion, 
        _Address.POBoxDeviatingCountry, 
        _Address.DeliveryServiceTypeCode, 
        _Address.DeliveryServiceNumber, 
        _Address.AddressTimeZone, 
     @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 40, label: 'Full Name', importance: #HIGH}]        
        _Address.FullName, 
     @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 20, label: 'City', importance: #HIGH}]        
        _Address.CityName, 
        _Address.District, 
        _Address.CityCode, 
        _Address.HomeCityName, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 30, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 50, label: 'Postal Code', importance: #HIGH}]          
        _Address.PostalCode, 
        _Address.CompanyPostalCode, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 60, label: 'Street', importance: #HIGH}]        
        _Address.StreetName, 
        _Address.StreetPrefixName, 
        _Address.AdditionalStreetPrefixName, 
        _Address.StreetSuffixName, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 30, label: 'House Number', importance: #HIGH}]        
        _Address.HouseNumber, 
        _Address.HouseNumberSupplementText, 
        _Address.Building, 
        _Address.Floor, 
        _Address.RoomNumber, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 40, label: 'Country/Region', importance: #HIGH}]        
        _Address.Country, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 50, label: 'Region', importance: #HIGH}]        
        _Address.Region, 
        _Address.County, 
//    @UI.identification: { position: 10, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address1', position: 10, label: 'Title', importance: #HIGH}]        

        _Address.FormOfAddress as FormOfAddress, 
        //_FormOfAddressText.Langauge,

        _Address.BusinessPartnerName1, 
        _Address.BusinessPartnerName2, 
        _Address.Nation, 
        _Address.PhoneNumber, 
        _Address.FaxNumber, 
        _Address.SearchTerm1, 
        _Address.StreetSearch, 
        _Address.CitySearch, 
        _Address.BusinessPartnerName3, 
        _Address.BusinessPartnerName4, 
        _Address.TaxJurisdiction, 
        _Address.TransportZone, 
        _Address.Person,
         @ObjectModel.readOnly: true
    @UI.identification: { position: 10, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 10, label: 'Title', importance: #HIGH}]         
        _Address._FormOfAddress._Text[1:Language = $session.system_language].FormOfAddressName as FormOfAddressName,
        
        //Associations 

        _Address._FormOfAddress,
        _Address._Region
*/
// 2308CL : Use of new address interface I_ADDRESS_2 (I_OrganizationAddress)

        _OrganizationAddress.CareOfName,  
        _OrganizationAddress.StreetSuffixName2           as AdditionalStreetSuffixName, 
        _OrganizationAddress.CorrespondenceLanguage, 
        _OrganizationAddress.PrfrdCommMediumType, 
        _OrganizationAddress.POBox, 
        _OrganizationAddress.POBoxIsWithoutNumber,       
        _OrganizationAddress.POBoxPostalCode, 
        _OrganizationAddress.POBoxLobbyName, 
        _OrganizationAddress.POBoxDeviatingCityName, 
        _OrganizationAddress.POBoxDeviatingRegion, 
        _OrganizationAddress.POBoxDeviatingCountry, 
        _OrganizationAddress.DeliveryServiceTypeCode, 
        _OrganizationAddress.DeliveryServiceNumber, 
        _OrganizationAddress.AddressTimeZone, 
     @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 40, label: 'Full Name', importance: #HIGH}]        
        _OrganizationAddress.AddresseeFullName            as FullName, 
     @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 20, label: 'City', importance: #HIGH}]        
        _OrganizationAddress.CityName, 
        _OrganizationAddress.DistrictName                 as District, 
        _OrganizationAddress.CityNumber                   as CityCode, 
        _OrganizationAddress.VillageName                  as HomeCityName, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 30, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 50, label: 'Postal Code', importance: #HIGH}]          
        _OrganizationAddress.PostalCode, 
        _OrganizationAddress.CompanyPostalCode, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 60, label: 'Street', importance: #HIGH}]        
        _OrganizationAddress.StreetName, 
        _OrganizationAddress.StreetPrefixName1           as StreetPrefixName, 
        _OrganizationAddress.StreetPrefixName2           as AdditionalStreetPrefixName, 
        _OrganizationAddress.StreetSuffixName1           as StreetSuffixName, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 30, label: 'House Number', importance: #HIGH}]        
        _OrganizationAddress.HouseNumber, 
        _OrganizationAddress.HouseNumberSupplementText, 
        _OrganizationAddress.Building, 
        _OrganizationAddress.Floor, 
        _OrganizationAddress.RoomNumber, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 40, label: 'Country/Region', importance: #HIGH}]        
        _OrganizationAddress.Country, 
         @ObjectModel.readOnly: true
    @UI.identification: { position: 20, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address2', position: 50, label: 'Region', importance: #HIGH}]        
        _OrganizationAddress.Region, 
        _OrganizationAddress.SecondaryRegionName          as County, 
//    @UI.identification: { position: 10, importance: #HIGH }

//    @UI.fieldGroup:[{qualifier: 'Address1', position: 10, label: 'Title', importance: #HIGH}]        

        _OrganizationAddress.FormOfAddress,                
        //_FormOfAddressText.Langauge,

        _OrganizationAddress.AddresseeName1               as BusinessPartnerName1, 
        _OrganizationAddress.AddresseeName2               as BusinessPartnerName2, 
        _OrganizationAddress.AddressRepresentationCode    as Nation, 
        _PhoneNumber.PhoneAreaCodeSubscriberNumber        as PhoneNumber, 
        _CurrentDfltFaxNumber.FaxAreaCodeSubscriberNumber as FaxNumber, 
        _OrganizationAddress.AddressSearchTerm1           as SearchTerm1, 
        ''                                                as StreetSearch, 
        ''                                                as CitySearch, 
        _OrganizationAddress.AddresseeName3               as BusinessPartnerName3, 
        _OrganizationAddress.AddresseeName4               as BusinessPartnerName4, 
        _OrganizationAddress.TaxJurisdiction, 
        _OrganizationAddress.TransportZone, 
        _OrganizationAddress.AddressPersonID              as Person, // NULL data 

         @ObjectModel.readOnly: true
    @UI.identification: { position: 10, importance: #HIGH }
    @UI.fieldGroup:[{qualifier: 'Address1', position: 10, label: 'Title', importance: #HIGH}]         
        _OrganizationAddress._FormOfAddress._Text[1:Language = $session.system_language].FormOfAddressName as FormOfAddressName,
        
        //Associations 

        _OrganizationAddress._FormOfAddress,
        _OrganizationAddress._Region

        }
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRCURDEFAULTFAXNUMBER",
"I_ADDRESSPHONENUMBER_2",
"I_FORMOFADDRESS",
"I_FORMOFADDRESSTEXT",
"I_ORGANIZATIONADDRESS",
"I_PURCHASEREQUISITIONITEM"
],
"ASSOCIATED":
[
"I_ADDRCURDEFAULTFAXNUMBER",
"I_ADDRESSPHONENUMBER_2",
"I_FORMOFADDRESS",
"I_ORGANIZATIONADDRESS",
"I_REGION"
],
"BASE":
[
"I_ORGANIZATIONADDRESS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/