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.
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: PARPCURROLECREATE VIEW P_ARPCurRole ASSELECT
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 '' endas 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 '' endas 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
LEFTOUTERJOIN t001a AS _CompanyCurrencyControl ON CompanyCode = _CompanyCurrencyControl.bukrs -- association [0..1]LEFTOUTERJOIN I_SAPClient AS _SAPClient ON _CompanyCode.mandt = _SAPClient.sapclient -- association [0..1]LEFTOUTERJOIN t005 AS _Countries ON _CompanyCode.Country = _Countries.land1 -- association [0..1]LEFTOUTERJOIN t880 AS _GlobalCompanyData ON _CompanyCode.Company = _GlobalCompanyData.rcomp -- association [0..1]
;