P_Supplier_Fs

DDL: P_SUPPLIER_FS SQL: PSUPPLIERFS Type: view BASIC

P_Supplier_Fs is a Basic CDS View in SAP S/4HANA. It reads from 9 data sources and exposes 40 fields with key field Supplier.

Data Sources (9)

SourceAliasJoin Type
I_Address Address left_outer
P_Supplierbp_Fs BusinessPartner left_outer
I_Plant Plants left_outer
I_SupplierAccountGroupText SupplierAccountGroupText left_outer
I_CountryText SupplierCountry left_outer
I_SupplierIndustryText SupplierIndustryText left_outer
I_RegionText SupplierRegion left_outer
ttz5z TimeZone left_outer
lfa1 Vendor from

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PSUPPLIERFS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #BASIC view
VDM.private true view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor P_ProductObjPgSupplier view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY Supplier lfa1 lifnr
RoleOwnerEmailAddress
InternationalFaxNumber
InternationalPhoneNumber
InternationalMobilePhoneNumber
RegionName
Material PurchasingDocument Material
PlantName I_Plant PlantName
LocationTimeZone ttz5z tzone
BusinessPartner P_Supplierbp_Fs BusinessPartner
CountryName I_CountryText CountryName
SupplierCityName lfa1 ort01
SupplierIndustryName I_SupplierIndustryText SupplierIndustryName
Country lfa1 land1
AddressID lfa1 adrnr
InternationalLocationNumber3 lfa1 bubkz
PostingIsBlocked lfa1 sperr
PurchasingIsBlockedForSupplier lfa1 sperm
FaxNumber lfa1 telfx
SupplierCorporateGroup lfa1 konzs
SupplierIndustry lfa1 brsch
InternationalLocationNumber1 lfa1 bbbnr
InternationalLocationNumber2 lfa1 bbsnr
Language lfa1 spras
SupplierName lfa1 name1
AdditionalName
PhoneNumber2 lfa1 telf2
Plant lfa1 werks
POBox lfa1 pfach
SupplierRegion lfa1 regio
StreetAddressName lfa1 stras
SupplierTaxID1 lfa1 stcd1
UniformResourceLocator lfa1 lfurl
SupplierVATRegistration lfa1 stceg
SupplierAccountGroup lfa1 ktokk
AccountGroupName
FormattedName
Customer lfa1 kunnr
DocumentKeyForUnitCnvrsn
PostalCode lfa1 pstlz
@AbapCatalog.sqlViewName: 'PSUPPLIERFS'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #BASIC

@VDM.private: true

@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: 'P_ProductObjPgSupplier'

define view P_Supplier_Fs as select from lfa1 as Vendor 

join P_Purchasingdocument_Fs  as PurchasingDocument  on Vendor.lifnr = PurchasingDocument.Supplier //and PurchasingDocument.Material = PurchasingInfoRecord.Material and  PurchasingDocument.Supplier <> PurchasingInfoRecord.Supplier

left outer join I_SupplierIndustryText  as SupplierIndustryText  on Vendor.brsch = SupplierIndustryText.SupplierIndustry and Vendor.spras = SupplierIndustryText.Language

left outer join I_Address as Address on Vendor.adrnr =  Address.AddressID
//left outer join knvk as Person on Person.lifnr = Vendor.lifnr

//left outer join adr6  as EmailAddress on Vendor.adrnr = EmailAddress.addrnumber and EmailAddress.flgdefault = 'X' and EmailAddress.persnumber = Person.prsnr

//left outer join adr2  as MobilePhoneNumber  on  Vendor.adrnr = MobilePhoneNumber.addrnumber

//                                    and MobilePhoneNumber.r3_user = '3'  

//left outer join adr2  as PhoneNumber  on  Vendor.adrnr = PhoneNumber.addrnumber

//                                    and PhoneNumber.flgdefault = 'X' 

//

//left outer join adr3  as FaxNumber  on Vendor.adrnr = FaxNumber.addrnumber and FaxNumber.flgdefault = 'X' 




left outer join I_Plant as Plants on Vendor.werks = Plants.Plant 
left outer join ttz5z as TimeZone on Vendor.land1 = TimeZone.land1 and Vendor.pstlz = TimeZone.zipgene
left outer join P_Supplierbp_Fs  as BusinessPartner  on Vendor.lifnr = BusinessPartner.Supplier
left outer join I_CountryText  as SupplierCountry  on Vendor.land1 = SupplierCountry.Country and SupplierCountry.Language =  $session.system_language // Vendor.spras

left outer join I_SupplierAccountGroupText as SupplierAccountGroupText on Vendor.ktokk = SupplierAccountGroupText.SupplierAccountGroup and SupplierAccountGroupText.Language = $session.system_language
left outer join I_RegionText  as SupplierRegion  on Vendor.land1 = SupplierRegion.Country and SupplierRegion.Region = Vendor.regio and SupplierRegion.Language =  $session.system_language // Vendor.spras


 
     
 {
    @Semantics:   { contact.type: #PERSON } 
    @ObjectModel: { text.element:  [ 'FormattedName' ], readOnly: true }
     key Vendor.lifnr as Supplier, 
      @Semantics : { eMail : { type : [ #WORK ] ,
        address : true,
        from : true,
        to : true
    
        
        
        }
        
           }
          Address._DefaultEmailAddress.SearchEmailAddress as RoleOwnerEmailAddress,
          cast (Address._DefaultFaxNumber.InternationalFaxNumber as ad_fxnmbr preserving type) as InternationalFaxNumber,
               @Semantics:   { telephone.type: [ #CELL ] }
          
        // cast( Address._DefaultMobilePhoneNumber.InternationalPhoneNumber as UMB_Y_MOBILENO preserving type) as InternationalMobilePhoneNumber,

          Address._DefaultMobilePhoneNumber.InternationalPhoneNumber,
        //  Address._DefaultPhoneNumber.InternationalPhoneNumber as InternationalMobilePhoneNumber,

        cast(Address._DefaultPhoneNumber.InternationalPhoneNumber as rsh_ps_employee_mobilenumber preserving type ) as InternationalMobilePhoneNumber,
        cast(SupplierRegion.RegionName as farp_supplier_region_name preserving type) as RegionName,
  
     PurchasingDocument.Material,
    // PurchasingInfoRecord.PriorSupplier,

//        @Semantics : { eMail : { type : [ #WORK ] ,

//        address : true,

//        from : true,

//        to : true

//    

//        

//        

//        }

//        

//           }

           
           
//  max(EmailAddress.smtp_addr) as RoleOwnerEmailAddress,

//      @Semantics:   { telephone.type: [ #CELL ] }

//   max(  MobilePhoneNumber.telnr_long) as InternationalMobilePhoneNumber,

// PhoneNumber.telnr_long as InternationalPhoneNumber,

//      max (FaxNumber.faxnr_long) as InternationalFaxNumber,

//         EmailAddress.smtp_addr,

//   

//     MobilePhoneNumber.telnr_long,

         
 
 
     Plants.PlantName,
     TimeZone.tzone as LocationTimeZone,
     BusinessPartner.BusinessPartner,
     SupplierCountry.CountryName,
   
    

     Vendor.ort01 as SupplierCityName,
     SupplierIndustryText.SupplierIndustryName,
     Vendor.land1 as Country,  
     Vendor.adrnr as AddressID, 
     Vendor.bubkz as InternationalLocationNumber3, 
     Vendor.sperr as PostingIsBlocked,     
     Vendor.sperm as PurchasingIsBlockedForSupplier,   
       @Semantics:   { telephone.type: [ #FAX ] } 
     Vendor.telfx as FaxNumber,     
 
     Vendor.konzs as SupplierCorporateGroup,     
     Vendor.brsch as SupplierIndustry,     
     Vendor.bbbnr as InternationalLocationNumber1,     
     Vendor.bbsnr as InternationalLocationNumber2,     
     Vendor.spras as Language, 
     
           @Semantics:   { name.givenName: true }     
     Vendor.name1 as SupplierName,    
    // Vendor.name2 as AdditionalName,  

    cast(Vendor.name2 as farp_name2 preserving type) as AdditionalName,
      
     
     
     Vendor.telf2 as PhoneNumber2,
     Vendor.werks as Plant,
     Vendor.pfach as POBox,
     Vendor.regio as SupplierRegion, 
     Vendor.stras as StreetAddressName,
     Vendor.stcd1 as SupplierTaxID1,
     Vendor.lfurl as UniformResourceLocator,
     Vendor.stceg as SupplierVATRegistration,
     Vendor.ktokk  as SupplierAccountGroup  ,
     cast (SupplierAccountGroupText.AccountGroupName as farp_account_group_name  preserving type) as AccountGroupName,
     
     
     @Semantics:   { name.fullName: true }
  concat_with_space(Vendor.name1, Vendor.name2, 1) as FormattedName,
     
     
     
     Vendor.kunnr as Customer,
     
    // Vendor.mcod2 as DocumentKeyForUnitCnvrsn,

   cast( Vendor.mcod2 as mcdd1 preserving type ) as  DocumentKeyForUnitCnvrsn,
     Vendor.pstlz as PostalCode
   
    
     
}

//group by Vendor.lifnr,

//

//     SupplierRegion.RegionName,

//  

//     PurchasingDocument.Material,

//    

//  

//

//     Plants.PlantName,

//     TimeZone.tzone,

//     BusinessPartner.BusinessPartner,

//     SupplierCountry.CountryName,

//     Vendor.ort01,

//     SupplierIndustryText.SupplierIndustryName,

//     Vendor.land1,  

//     Vendor.adrnr, 

//     Vendor.bubkz, 

//     Vendor.sperr,     

//     Vendor.sperm,   

//     Vendor.telfx,     

////     FaxNumber.faxnr_long,

////       PhoneNumber.telnr_long,

//     Vendor.konzs,     

//     Vendor.brsch,     

//     Vendor.bbbnr,     

//     Vendor.bbsnr,     

//     Vendor.spras, 

//     Vendor.name1,    

//     Vendor.name2,  

//       

//    

//     Vendor.telf2,

//     Vendor.werks,

//     Vendor.pfach,

//     Vendor.regio, 

//     Vendor.stras,

//     Vendor.stcd1,

//     Vendor.lfurl,

//     Vendor.stceg,

//     Vendor.ktokk,

//     SupplierAccountGroupText.AccountGroupName,

//      

//     Vendor.kunnr,

//     

//     Vendor.mcod2,

//     Vendor.pstlz,

//     

     
   
    
  
                                                   
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS",
"I_ADDRESSEMAILADDRESS",
"I_ADDRESSFAXNUMBER",
"I_ADDRESSPHONENUMBER",
"I_COUNTRYTEXT",
"I_PLANT",
"I_REGIONTEXT",
"I_SUPPLIERACCOUNTGROUPTEXT",
"I_SUPPLIERINDUSTRYTEXT",
"P_PURCHASINGDOCUMENT_FS",
"P_SUPPLIERBP_FS",
"LFA1",
"TTZ5Z"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/