I_UserContactCard

DDL: I_USERCONTACTCARD SQL: IUSERCTC Type: view COMPOSITE

User Contact Card

I_UserContactCard is a Composite CDS View that provides data about "User Contact Card" in SAP S/4HANA. It reads from 1 data source (usr21) and exposes 18 fields with key field ContactCardID. It has 6 associations to related views. It is exposed through 89 OData services (C_BUSPARTRELSHPSRCEPCKGTP_SRV, C_BUSPARTSOURCEPACKAGETP_SRV, C_MASTERDATAIMPORTTP_2SD, ...). It is used in 38 Fiori applications: Manage Dispute Cases (Version 2), Manage Journal Entries - New Version, Manage Internal Orders (Version 2), ....

Data Sources (1)

SourceAliasJoin Type
usr21 _User from

Associations (6)

CardinalityTargetAliasCondition
[0..1] adrp _Person _Person.persnumber = $projection.Person and _Person.persnumber <> '' and _Person.nation = ''
[0..1] adcp _OrgData _OrgData.addrnumber = $projection.AddressID and _OrgData.persnumber = $projection.Person
[0..1] adr2 _DefaultPhoneNumber _DefaultPhoneNumber.addrnumber = $projection.AddressID and _DefaultPhoneNumber.persnumber = $projection.Person and _DefaultPhoneNumber.r3_user = '1'
[0..1] adr3 _DefaultFaxNumber _DefaultFaxNumber.addrnumber = $projection.AddressID and _DefaultFaxNumber.persnumber = $projection.Person and flgdefault = 'X'
[0..1] adr2 _DefaultMobilePhoneNumber _DefaultMobilePhoneNumber.addrnumber = $projection.AddressID and _DefaultMobilePhoneNumber.persnumber = $projection.Person and _DefaultMobilePhoneNumber.r3_user = '3'
[0..1] adr6 _DefaultEmailAddress _DefaultEmailAddress.addrnumber = $projection.AddressID and _DefaultEmailAddress.persnumber = $projection.Person and _DefaultEmailAddress.flgdefault = 'X'

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IUSERCTC view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label User Contact Card view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.representativeKey ContactCardID view
Search.searchable true view

OData Services (89)

ServiceBindingVersionContractRelease
C_BUSPARTRELSHPSRCEPCKGTP_SRV C_BPRELSHPSRCEPCKGTP_SRV V2 C1 NOT_RELEASED
C_BUSPARTSOURCEPACKAGETP_SRV C_BUSPARTSRCEPACKAGETP_SRV V2 C1 NOT_RELEASED
C_MASTERDATAIMPORTTP_2SD C_MASTERDATAIMPORTTP_2_V4 V4 C1 NOT_RELEASED
FAC_ACE_DSP_PERDC_ACCR_AMT_SRV FAC_ACE_DSP_PERDC_AMT_SRV V2 C1 NOT_RELEASED
FAP_DPR_VERIFICATION_INBOX FAP_DPR_VER_INBOX V2 C1 NOT_RELEASED
FAP_DPR_VERIFICATION_WORKLIST FAP_DPR_VER_WORKLIST V2 C1 NOT_RELEASED
FAR_CUSTOMER_LIST_V2 FAR_CUSTOMER_LIST_V2 V2 C1 NOT_RELEASED
FCO_ACTUAL_SETTLEMENT UI_FCO_ACTL_SETTLEMENT_O2 V2 C1 NOT_RELEASED
FCO_EB_PROD_COST_CLTR_DET FCO_EB_PROD_COST_CLTR_DET V2 C1 NOT_TO_BE_RELEASED_STABLE
FCO_SETTLEMENT_DOCUMENT UI_FCO_SETL_DOCUMENT_SRV V2 C1 NOT_RELEASED
FML_CHANGE_MATERIAL_PRICES FML_CHANGE_MATERIAL_PRICES V4 C1 NOT_RELEASED
FML_DSPMATLPRCHGDOCS FML_DSPMATLPRCHGDOCS V4 C1 NOT_RELEASED
JOURNALCASE JOURNALCASE V4 C1 NOT_RELEASED
JOURNALCASEPOSTINGPOLICY JOURNALCASEPOSTINGPOLICY V4 C1 NOT_RELEASED
MANAGEPROJBILLGREQUEST_SD UI_MNGPROJBILLGREQ_SB_V2 V2 C1 NOT_RELEASED
MASTERDATAATTCHLINKSD MASTERDATAATTCHLINKSRV V4 C1 NOT_RELEASED
MASTERDATACHANGEPROCESSSD MASTERDATACHANGEPROCESSSB V2 C1 NOT_RELEASED
PROJECTBILLINGREQUEST_SD UI_PROJBILLGREQUEST_SB_V2 V2 C1 NOT_RELEASED
QM_FMEA_MNG_SRV_DEF QM_FMEA_MNG_SRV V2 C1 NOT_RELEASED
TEST_INCOMING_FORMAT_SRV TEST_INCOMING_FORMAT_SRV V2 C1 NOT_RELEASED
UI_ACCRUALS_MANAGE UI_ACCRUALS_MANAGE V2 C1 NOT_RELEASED
UI_ACCRUALS_PERDCAMT_MANAGE UI_ACCRS_PERDCAMT_MANAGE V2 C1 NOT_RELEASED
UI_BANKACCOUNTINSTANTBALANCE UI_BKACCOUNTINSTANTBALANCE V2 C1 NOT_RELEASED
UI_C_DFS_ALLWNCPLAN UI_C_DFS_ALLWNCPLAN V2 C1 NOT_RELEASED
UI_C_DFS_ALLWNCREQ UI_C_DFS_ALLWNCREQ V2 C1 NOT_RELEASED
UI_C_DFS_DCNCDOPSSUBSCRPNTP UIC_DFS_DCNCDOPSSUBSCRPNTP V4 C1 NOT_RELEASED
UI_C_DFS_MAINT_PLATFORM UI_C_DFS_MAINT_PLATFORM V2 C1 NOT_RELEASED
UI_CACLEARINGLOCK_ANALYSIS UI_CACLEARINGLOCK_ANALYSIS V2 C1 NOT_RELEASED
UI_CAPAYMENTLOCK_ANALYSIS UI_CAPAYMENTLOCK_ANALYSIS V2 C1 NOT_RELEASED
UI_CASHBANK_MANAGE UI_CASHBANK_MANAGE V4 C1 NOT_RELEASED
UI_COLL_MD_MANAGE UI_COLL_MD_MANAGE V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_CRDTMGMTACCOUNT_MANAGE UI_CRDTMGMTACCOUNT_MANAGE V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_CUSTOMER_CONTACT_MANAGE UI_CUSTOMER_CONTACT_MANAGE V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_CUSTOMER_WARRANTYCLAIM UI_CUSTOMER_WARRANTYCLAIM V2 C1 NOT_RELEASED
UI_DFS_DCNCDOPSINBOUND UI_DFS_DCNCDOPSINBOUND V4 C1 NOT_RELEASED
UI_DFS_MEASURE UI_NBD_DFS_MEASURE V2 C1 NOT_RELEASED
UI_DFS_SCENARIO UI_DFS_SCENARIO V2 C1 NOT_RELEASED
UI_DISPUTECASE_MANAGE UI_DISPUTECASE_MANAGE V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_DRCTACTYALLOCATION_MANAGE UI_DRCTACTYALLOC_MANAGE V2 C1 NOT_RELEASED
UI_FML_CHG_MATERIAL_PRICES UI_FML_CHG_MATERIAL_PRICES V2 C1 NOT_RELEASED
UI_INTERNALORDER_MANAGE UI_INTERNALORDER_MANAGE V2 C1 NOT_RELEASED
UI_INTORDSETTLEMENTRULE_MANAGE UI_INTORDSETTLRULE_MANAGE V2 C1 NOT_RELEASED
UI_JOURNALENTRY_MANAGE UI_JOURNALENTRY_MANAGE V2 C1 NOT_RELEASED
UI_MAINTENANCEORDER_MANAGE UI_MAINTENANCEORDER_MANAGE V4 C1 NOT_RELEASED
UI_MAINTMBLAPPLPUSHNOTIFMANAGE UI_MAINTMBLAPPLPUSHNOTIFMANAGE V4 C1 NOT_RELEASED
UI_MAINTMBLAPPLSYNCOBJECTLINK UI_MAINTMBLAPPLSYNCOBJECTLINK V4 C1 NOT_RELEASED
UI_MAINTMBLAPPLSYNCOBJLNKMNG UI_MAINTMBLAPPLSYNCOBJLNKMNG V4 C1 NOT_RELEASED
UI_MAINTMBLTRANSACTIONHISTORY UI_MAINTMBLTRANSACTIONHISTORY V4 C1 NOT_RELEASED
UI_MANAGE_WARRANTYCLAIM UI_MANAGE_WARRANTYCLAIM V2 C1 NOT_RELEASED
UI_MANUALACCRS_MNG UI_MANUALACCRS_MNG V2 C1 NOT_RELEASED
UI_MANUALSPREADING UI_MANUALSPREADING V4 C1 NOT_RELEASED
UI_MDQLTYDRVTNSCENARIO_DEFINE UI_MDQLTYDRVTNSCEN_DEFINE V2 C1 NOT_RELEASED
UI_MDQLTYDRVTNSCENEXPRT_MANAGE UI_MDQDRVTNSCENEXPORT_MNG V4 C1 NOT_RELEASED
UI_MDQLTYDRVTNSCENIMPRT_MANAGE UI_MDQDRVTNSCENIMPORT_MNG V4 C1 NOT_RELEASED
UI_MEMORECORD_IMPORT UI_MEMORECORD_IMPORT V4 C1 NOT_RELEASED
UI_MEMORECORD_MANAGE UI_MEMORECORD_MANAGE V4 C1 NOT_RELEASED
UI_MIGRATE_TAX_ITEMS UI_MIGRATE_TAX_ITEMS_V2 V2 C1 NOT_RELEASED
UI_ORGANIZATIONALCHANGE UI_ORGANIZATIONALCHANGE_O2 V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_OVD_CHARC_COMBN_MNG UI_OVD_CHARC_COMBN_MNG V2 C1 NOT_RELEASED
UI_PAYMENT_REQUEST UI_PAYMENT_REQUEST V2 C1 NOT_RELEASED
UI_PRICEALLOCATION UI_PRICEALLOCATION V4 C1 NOT_RELEASED
UI_PROCESSERRORITEMS UI_PROCESSERRORITEMS V2 C1 NOT_RELEASED
UI_PROCESSRECEIVABLES_MANAGE UI_PROCESSRECEIVABLES_MAN V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_PROCMTPROJECT_MANAGE UI_PROCMTPROJECT_MANAGE V4 C1 NOT_RELEASED
UI_PROCMTPROJECT_MANAGE UI_PROCMTPROJECTV2_MANAGE V2 C1 NOT_RELEASED
UI_PRODSUBSTITUTION_MANAGE UI_PRODSUBSTITUTION_MANAGE V2 C1 NOT_RELEASED
UI_PRODSUBSTN_CTRL_MANAGE UI_PRODSUBSTN_CTRL_MANAGE V2 C1 NOT_RELEASED
UI_PRODSUBSTN_EXCLN_MANAGE UI_PRODSUBSTN_EXCLN_MANAGE V2 C1 NOT_RELEASED
UI_PRODSUBSTN_GRP_MANAGE UI_PRODSUBSTN_GRP_MANAGE V2 C1 NOT_RELEASED
UI_PRODSUBSTN_RSN_MANAGE UI_PRODSUBSTN_RSN_MANAGE V2 C1 NOT_RELEASED
UI_PROJSETTLMTRULE_MANAGE UI_PROJSETTLMTRULE_MANAGE V2 C1 NOT_RELEASED
UI_PROMISETOPAY_MANAGE UI_PROMISETOPAY_MANAGE V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_PURCHASEORDERACCRS_DISPLAY UI_PURCHASEORDERACCRS_DSP V2 C1 NOT_RELEASED
UI_PURCONTRRENEGTTN_MANAGE UI_PURCONTRRENEGTTN_MANAGE V2 C1 NOT_RELEASED
UI_RESUBMISSIONS_MANAGE UI_RESUBMISSIONS_MANAGE V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_REVERSERUNID UI_REVERSERUNID V4 C1 NOT_RELEASED
UI_RFM_MNG_ASSTMT_MODULES UI_RFM_MNG_ASSTMT_MODULES V2 C1 NOT_RELEASED
UI_RFM_MONITOR_ASM_ERRORS UI_RFM_MONITOR_ASM_ERRORS V2 C1 NOT_RELEASED
UI_SHORTTERMCASHPOS_DISPLAY UI_SHORTTERMCASHPOS_DISP V2 C1 NOT_RELEASED
UI_SOURCING_PROJECT_COMPARE UI_SRCGPROJ_COMPARE V2 C1 NOT_RELEASED
UI_SOURCINGPROJECT_MANAGE UI_SOURCINGPROJECT_MANAGE V2 C1 NOT_RELEASED
UI_SRCGPROJ_CONTRIBUTE UI_SRCGPROJ_CONTRIBUTE V2 C1 NOT_RELEASED
UI_SRCGPROJAWDSCEN_MANAGE UI_SRCGPROJAWDSCEN_MANAGE V2 C1 NOT_RELEASED
UI_SRCGPROJNEGTTN_MANAGE UI_SRCGPROJNEGTTN_MANAGE V2 C1 NOT_RELEASED
UI_SRCGPROJQUOTATION_MANAGE UI_SRCGPROJQTN_MANAGE V2 C1 NOT_RELEASED
UI_SUBSTVOLRETRCKG_MANAGE UI_SUBSTVOLRETRCKG_MANAGE V4 C1 NOT_RELEASED
UI_SUPLRCOSTBRKDWNTEMPL_MANAGE UI_SUPLRCBDTEMPLATE_MANAGE V2 C1 NOT_RELEASED
UI_SUPPLIERLIST_MANAGE UI_SUPPLIERLIST_MANAGE V2 C1 NOT_RELEASED
UI_SUPPLYPROTECTION UI_SUPPLYPROTECTION V2 C1 NOT_RELEASED

Fiori Apps (38)

App IDApp NameTypeDescription
F0702A Manage Dispute Cases (Version 2) Transactional Use this app to analyze and further process existing dispute cases. This involves dispute cases that are related to open receivables for your customers.
F0717A Manage Journal Entries - New Version Transactional With this app you can analyze journal entries, create reversals or make adjustments.
F1604A Manage Internal Orders (Version 2) Transactional With this app, you can display internal orders master data. This app enables you to: - Display internal orders. - Navigate to other apps for internal orders.
F1653A Analyze Clearing Locks (Version 2) Transactional, Analytical An application to analyze clearing locks based on a snapshot of the locked open business partner items.
F2640 Display Customer List Transactional This App provides list of Customers and it's master data relevant for AR and cash collection departments. Key user role for Display Customer List is AR accountant. App provides also functionality of checking missing data (multiple fields could be checked at once). Additional functions typical for smart table template available.
F4333 Manage Preferred Supplier Lists Transactional An application to maintain a list of suppliers for one or more material groups and company codes
F4569 Configure Supply Protection Transactional An application to manage supply protection quantities that are working as virtual reservations in the ATP logic.
F4596 Manage Credit Accounts Transactional
F4661 Manage Allowance Requests Transactional The allowance enables force element structures to request authorized materials or products over a time period without influencing the current force planning.
F4662 Manage Allowance Plans Transactional The allowance enables force element structures to request authorized materials or products over a time period without influencing the current force planning.
F4697 Manage Planning Scenarios Transactional A scenario consists of one or more possible alternatives. Alternatives can be alternative response options to a threat or natural disaster. Each alternative includes a set of objects related to a capability code, and they are combined with active force elements at alternative task level. A scenario is used in capability-based planning and development processes. It collects different objects related to the capability and actual active force elements (or reference force elements) and allows the user to compare the scenario alternative requirement defined by the capabilities assigned to it with active force elements that could possibly fulfil the requirements. A planner can view the crucial personnel, material and training requirements (job, FMPO, METL) linked to each required capability code in a scenario alternative task. This allows the planner to evaluate whether the identified unit is now ready and prepared to perform the operation at hand. This scenario master data set is also used as the basis for any tailored and complex readiness and preparedness evaluations, reporting or simulations. Two types of scenarios are available: 1. Preparedness monitoring scenario 2. Capability development scenario The Preparedness monitoring scenario is a scenario that is monitored periodically. The aim is to identify shortcomings in capabilities and provide input for different downstream processes, such as material replenishments or any human resources management activities. The capability development scenario relates to the introduction of new or upgraded capabilities in defense.
F4707 Manage Customer Contacts Transactional Use this app to manage the customer contacts for your business partners, which are created by collections specialists as result of a customer contact. You use these contacts in the collection process with the Process Receivables app.
F4709 Manage Resubmissions Transactional Use this app to manage resubmissions for business partners that were created for outstanding receivables. You use these resubmissions in the collection process with the Process Receivables app.
F4710 Manage Promises to Pay Transactional Use this app to manage promises to pay of customers, which were created in the collection process using the Process Receivables app. You can display, edit, and withdraw promises to pay.
F4734 Manage Platform Codes Transactional This application is one of two SAP Fiori applications for managing the business object Platform Code. Organizations can create hierarchies of Platform Groups and Platform Codes, and assign relevant Business Objects, such as Material, WBS Element or Cost Center to Platform Codes. These assignments can then be the basis for customer-specific reports and aggregations on Platform Code level of various data in the areas of e.g. cost accounting or maintenance activities. Functions provided by the "Manage Platform Codes" application are: • Search for platform groups and codes. • Display platform groups and codes in list or hierarchy view. • Create a hierarchy of platform groups and codes. • Assign owner information to platform groups and codes. • Attach documents to platform groups and codes. • Activate or deactivate platform groups and codes. • Delete platform groups and codes. • Implement and execute customer-specific checks when saving, such as checks for field dependencies or mandatory fields. • Display business objects assigned to a specific platform code. • Display material for which a specific platform code is defined as the leading platform.
F4785 Manage Substitutions - Products Transactional An application to manage product substitutions
F4786 Manage Exclusions - Products Transactional An application to manage product exclusions
F4787 Manage Substitution Controls - Products Transactional An application to maintain configuration data for product substitution or exclusion where the user can manage substitution controls
F4788 Manage Substitution Groups - Products Transactional An application to maintain configuration data for product substitution or exclusion where the user can manage substitution groups
F4789 Manage Substitution Reasons - Products Transactional An application to maintain configuration data for product substitution or exclusion where the user can manage substitution reasons
F4861 Manage Sourcing Projects Transactional An application to create and manage sourcing projects.
F4891 Monitor Assortment Postprocessing Errors Transactional An application to monitor errors that occur during the product master data generation, that is, the postprocessing of the assortment definition.
F4892 Manage Assortment Modules Transactional An application to manage assortment modules.
F5303 Manage Characteristic Combinations Transactional Manage Characteristic Combinations
F5380 Short-Term Cash Positioning Transactional, Analytical This app facilitates cash managers and cash specialists to see short-term cash position based on direct bank balances. How cash position will be displayed depends on the selected profiles that are defined in app Define Cash Position Profiles.
F5400 Manage Collections Master Data Transactional Use this app to activate customers for Collections Management processes. For activated accounts, you can maintain Collection Groups per Collection Segments as well as assign Specialists on Collection Segment level.
F5423 Manage Manual Accruals Transactional With this app, you can create, import, edit, and copy accrual objects as well as change their status. You can use this app to: - Display and edit accrual objects. - Create new accrual objects. - Copy accrual objects. - Import accrual objects from a spreadsheet file. - Change the status of an accrual object by pausing, suspending, or resuming its accrual subobjects. - Prematurely finish accrual subobjects by terminating them or undo premature termination. - View the parameters assigned to an accrual object. - View a detailed summary of changes made to the accrual object, comparing the old and new values of the accrual object fields.
F5550 Manage Awarding Scenarios Transactional An application to manage awarding scenarios.
F5551 Manage Negotiations Transactional An application to manage the negotiation of Sourcing Project Quotations.
F5714 Manage Renegotiations Transactional An application to create and manage renegotiations of central purchase contracts
F5932 My Inbox - Approve Awarding Scenario Transactional
F5934 Display Sourcing Project Transactional An application to approve Sourcing Projects.
F6134 Analyze Payment Locks (Version 2) Transactional, Analytical An application to analyze payment locks based on a snapshot of the locked open business partner items.
F6489 Change Material Prices Transactional With this app, you create, analyze, simulate, and post material price changes. It allows you to change inventory prices, including sales order stock and project stock. You can change current material valuation prices retroactively or at the current date. To do so, enter the posting date and company code in the selection screen. You can change the price for a single reference valuation, then convert those changes to some or all valuations of the same material, or change prices for valuations individually. As you make changes, you can see the impact of the changes on price and valuation as percentages. You can also simulate material price changes to check for errors, warnings, and inconsistencies before posting.
F6960 Test Incoming Format Mappings Transactional
F6965 Product Cost Collector Details - Event-Based Analytical You can only use Product Cost Collector Details - Event-Based if you have activated the business function Universal Parallel Accounting (FINS_PARALLEL_ACCOUNTING_BF, short: UPA). With this app you can see a breakdown of event-based cost postings for repetitive manufacturing orders (order category 05 - product cost collectors). The app provides a detailed cost comparison of actual and target costs for product cost collectors that are running with the Event-Based Production Cost Posting solution (3F0).
F7320 Process Error Documents - Error Correction and Suspense Accounting Transactional Process Error Documents - Error Correction and Suspense Accounting
F7757 Contribute to Sourcing Projects Transactional The app is an application to contribute to sourcing projects as an additional user.

Manage Dispute Cases (Version 2)

Business Role: Accounts Receivable Accountant

Use this app to analyze and further process existing dispute cases. This involves dispute cases that are related to open receivables for your customers.

Manage Journal Entries - New Version

Business Role: General Ledger Accountant

With this app, you can manage and analyze journal entries. You can find, filter, sort, and group journal entries according to the requirements of your business. The app is your entry point for many important journal entry management functions, allowing you to create, copy, verify, edit, and reverse entries. Additionally, you can initiate correspondence, analyze change and reversal logs, and display entries in t-account views or document flows. You navigate to the details of individual journal entries to display more information, such as transaction data, line items, associated journal entries, and other related documents.

Manage Internal Orders (Version 2)

Business Role: Cost Accountant - Overhead

With this SAP Fiori app, you can create, view, and edit master data of internal orders. You can also navigate to other apps for managing internal orders.

Analyze Clearing Locks (Version 2)

Business Role: Accounts Payable and Receivable Manager (FI-CA)

With the Analyze Clearing Locks app, you display existing clearing locks for receivables and payables. Using the app, you can display the amounts related to the selected locks in different currencies.As data volume in Contract Accounting can be very high, to improve performance, a new version of the app evaluates a system snapshot of receivables and payables instead of the current live data.

Display Customer List

Business Role: Accounts Receivable Accountant

This App provides list of Customers and it"s master data relevant for AR and cash collection departments. Key user role for Display Customer List is AR accountant. App provides also functionality of checking missing data (multiple fields could be checked at once). Additional functions typical for smart table template available.

Fields (18)

KeyFieldSource TableSource FieldDescription
KEY ContactCardID usr21 bname
Person usr21 persnumber
BusinessPartnerUUID usr21 bpperson
FirstName _Person name_first
LastName _Person name_last
FullName
UserDescription
AddressID usr21 addrnumber
PhoneNumber
MobilePhoneNumber
FaxNumber
EmailAddress
Department _OrgData department
FunctionalTitleName _OrgData function
ContactCardRole
ContactCardType
ContactCardNavLinkSemanticObj
ContactCardNavLinkQueryPart
@AbapCatalog.sqlViewName: 'IUSERCTC'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY // never expose this view directly, only via associations

@EndUserText.label: 'User Contact Card'
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: 'C'
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.representativeKey: 'ContactCardID'
@Search.searchable: true
define view I_UserContactCard
  as select from usr21 as _User
  association [0..1] to adrp as _Person                   on  _Person.persnumber = $projection.Person
                                                          and _Person.persnumber <> ''
                                                          and _Person.nation     =  ''

  association [0..1] to adcp as _OrgData                  on  _OrgData.addrnumber = $projection.AddressID
                                                          and _OrgData.persnumber = $projection.Person

  association [0..1] to adr2 as _DefaultPhoneNumber       on  _DefaultPhoneNumber.addrnumber = $projection.AddressID
                                                          and _DefaultPhoneNumber.persnumber = $projection.Person
                                                          and _DefaultPhoneNumber.r3_user    = '1'

  association [0..1] to adr3 as _DefaultFaxNumber         on  _DefaultFaxNumber.addrnumber = $projection.AddressID
                                                          and _DefaultFaxNumber.persnumber = $projection.Person
                                                          and flgdefault                   = 'X'

  association [0..1] to adr2 as _DefaultMobilePhoneNumber on  _DefaultMobilePhoneNumber.addrnumber = $projection.AddressID
                                                          and _DefaultMobilePhoneNumber.persnumber = $projection.Person
                                                          and _DefaultMobilePhoneNumber.r3_user    = '3'

  association [0..1] to adr6 as _DefaultEmailAddress      on  _DefaultEmailAddress.addrnumber = $projection.AddressID
                                                          and _DefaultEmailAddress.persnumber = $projection.Person
                                                          and _DefaultEmailAddress.flgdefault = 'X'
{
      @ObjectModel.text.element : [ 'UserDescription' ]
      @Semantics.contact.type: #PERSON
  key _User.bname                                                                                 as ContactCardID,
      _User.persnumber                                                                            as Person,
      _User.bpperson                                                                              as BusinessPartnerUUID,

      @Semantics.name.givenName: true
      _Person.name_first                                                                          as FirstName,

      @Semantics.name.familyName: true
      _Person.name_last                                                                           as LastName,

      @Semantics.name.fullName: true
      cast(coalesce( _Person.name_text , _User.techdesc ) as ad_namtext preserving type )         as FullName,

      @Semantics.text: true
      @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
      cast( _User.techdesc as vdm_userdescription preserving type )                               as UserDescription,

      _User.addrnumber                                                                            as AddressID,

      @Semantics.telephone.type:  [ #WORK ]
      cast(_DefaultPhoneNumber.telnr_long as contactcardphonenumber preserving type )             as PhoneNumber,

      @Semantics.telephone.type:  [ #CELL ]
      cast(_DefaultMobilePhoneNumber.telnr_long as contactcardmobilephonenumber preserving type ) as MobilePhoneNumber,

      @Semantics.telephone.type:  [ #FAX ]
      cast(_DefaultFaxNumber.faxnr_long as contactcardfaxnumber preserving type )                 as FaxNumber,

      @Semantics.eMail.type:  [ #WORK ]
      @Semantics.eMail.address: true
      cast(_DefaultEmailAddress.smtp_addr as contactcardemailaddress preserving type )            as EmailAddress,

      @Semantics.organization.name: true
      _OrgData.department                                                                         as Department,

      @Semantics.organization.role: true
      _OrgData.function                                                                           as FunctionalTitleName,

      @UI.hidden:true
      'Creator'                                                                                   as ContactCardRole,
      @UI.hidden:true
      'User'                                                                                      as ContactCardType,

      @UI.hidden:true
      'User'                                                                                      as ContactCardNavLinkSemanticObj,
      @UI.hidden:true
      concat('User=', _User.bname)                                                                as ContactCardNavLinkQueryPart
}