P_ARPCurRole

DDL: P_ARPCURROLE SQL: PARPCURROLE Type: view BASIC

P_ARPCurRole is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (I_CompanyCode) and exposes 6 fields with key field CompanyCode. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_CompanyCode _CompanyCode from

Associations (4)

CardinalityTargetAliasCondition
[0..1] t001a _CompanyCurrencyControl $projection.CompanyCode = _CompanyCurrencyControl.bukrs
[0..1] I_SAPClient _SAPClient _CompanyCode.mandt = _SAPClient.sapclient
[0..1] t005 _Countries _CompanyCode.Country = _Countries.land1
[0..1] t880 _GlobalCompanyData _CompanyCode.Company = _GlobalCompanyData.rcomp

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PARPCURROLE view
VDM.viewType #BASIC view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
CompanyCodeName CompanyCodeName Company Name
currelseendasAdditionalCurrency1
currelseendasAdditionalCurrency2
AdditionalCurrency1Role
AdditionalCurrency2Role

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_ARPCurRole.
-- 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: PARPCURROLE

CREATE VIEW P_ARPCurRole AS
SELECT
  CompanyCode,
  CompanyCodeName,
  case _CompanyCurrencyControl.curtp when '11' then _CompanyCode.Currency when '12' then _CompanyCode.Currency when '30' then _SAPClient.GroupCurrency when '31' then _SAPClient.GroupCurrency when '32' then _SAPClient.GroupCurrency when '40' then _Countries.curha when '50' then _Countries.curin when '60' then _GlobalCompanyData.curr else '' end as AdditionalCurrency1 AS currelseendasAdditionalCurrency1,
  case _CompanyCurrencyControl.curtp2 when '11' then _CompanyCode.Currency when '12' then _CompanyCode.Currency when '30' then _SAPClient.GroupCurrency when '31' then _SAPClient.GroupCurrency when '32' then _SAPClient.GroupCurrency when '40' then _Countries.curha when '50' then _Countries.curin when '60' then _GlobalCompanyData.curr else '' end as AdditionalCurrency2 AS currelseendasAdditionalCurrency2,
  cast( _CompanyCurrencyControl.curtp as fis_adl1_currole preserving type ) AS AdditionalCurrency1Role,
  cast( _CompanyCurrencyControl.curtp2 as fis_adl2_currole preserving type ) AS AdditionalCurrency2Role
FROM I_CompanyCode AS _CompanyCode
LEFT OUTER JOIN t001a AS _CompanyCurrencyControl ON CompanyCode = _CompanyCurrencyControl.bukrs  -- association [0..1]
LEFT OUTER JOIN I_SAPClient AS _SAPClient ON _CompanyCode.mandt = _SAPClient.sapclient  -- association [0..1]
LEFT OUTER JOIN t005 AS _Countries ON _CompanyCode.Country = _Countries.land1  -- association [0..1]
LEFT OUTER JOIN t880 AS _GlobalCompanyData ON _CompanyCode.Company = _GlobalCompanyData.rcomp  -- association [0..1]
;