R_ProjSrvcOrg

DDL: R_PROJSRVCORG Type: view_entity BASIC

Service Organization

R_ProjSrvcOrg is a Basic CDS View that provides data about "Service Organization" in SAP S/4HANA. It reads from 1 data source (/cpd/pwsc_org_at) and exposes 17 fields with key field ProjectServiceOrganizationUUID. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
/cpd/pwsc_org_at /cpd/pwsc_org_at from

Associations (2)

CardinalityTargetAliasCondition
[1..1] /cpd/pwsc_orgid _ServiceOrganization _ServiceOrganization.org_unit_id = $projection.ProjectServiceOrganization
[0..*] /cpd/pwsc_orgpid _OrganizationalStructure _OrganizationalStructure.org_unit_id = $projection.ProjectServiceOrganization and _OrganizationalStructure.default_val = 'X'

Annotations (7)

NameValueLevelField
EndUserText.label Service Organization view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #ORGANIZATIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY ProjectServiceOrganizationUUID service_org_uuid Service Org UUID
ProjectServiceOrganization org_unit_id Service Org.
ProjectServiceOrganizationOID service_org_oid ServOrgOID
ProjSrvcOrgDataMigrationStatus data_migration_status Migration Status
ProjSrvcOrgIsProjDeliveryOrg
ProjSrvcOrgIsResourceOrg
ProjSrvcOrgControllingArea
ProjSrvcOrgCompanyCode
ProjSrvcOrgSalesOrg
ProjSrvcOrgDivision
ProjSrvcOrgDistributionChannel
ProjSrvcOrgPurchaseOrg
ProjSrvcOrgPlant
CreatedByUser created_by Version Created By
CreationDateTime created_at Uploaded On
LastChangedByUser last_changed_by Username
LastChangeDateTime last_changed_at Timestamp

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 R_ProjSrvcOrg.
-- 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.

CREATE VIEW R_ProjSrvcOrg AS
SELECT
  service_org_uuid AS ProjectServiceOrganizationUUID,
  org_unit_id AS ProjectServiceOrganization,
  service_org_oid AS ProjectServiceOrganizationOID,
  data_migration_status AS ProjSrvcOrgDataMigrationStatus,
  cast(_ServiceOrganization.sales_org as /s4ppm/tv_svorg_isprojdelivorg) AS ProjSrvcOrgIsProjDeliveryOrg,
  cast(_ServiceOrganization.delivery_org as /s4ppm/tv_svorg_isresourceorg) AS ProjSrvcOrgIsResourceOrg,
  cast(_OrganizationalStructure[1: org_unit_typ='CA'].org_unit_key as /s4ppm/tv_svorg_kokrs) AS ProjSrvcOrgControllingArea,
  cast(_OrganizationalStructure[1: org_unit_typ='CC'].org_unit_key as /s4ppm/tv_svorg_bukrs) AS ProjSrvcOrgCompanyCode,
  cast(_OrganizationalStructure[1: org_unit_typ='SO'].org_unit_key as /s4ppm/tv_svorg_vkorg ) AS ProjSrvcOrgSalesOrg,
  cast(_OrganizationalStructure[1: org_unit_typ='SD'].org_unit_key as /s4ppm/tv_svorg_spart) AS ProjSrvcOrgDivision,
  cast(_OrganizationalStructure[1: org_unit_typ='SC'].org_unit_key as /s4ppm/tv_svorg_vtweg) AS ProjSrvcOrgDistributionChannel,
  cast(_OrganizationalStructure[1: org_unit_typ='PO'].org_unit_key as /s4ppm/tv_svorg_ekorg) AS ProjSrvcOrgPurchaseOrg,
  cast(_OrganizationalStructure[1: org_unit_typ='PL'].org_unit_key as /s4ppm/tv_svorg_werks_d) AS ProjSrvcOrgPlant,
  created_by AS CreatedByUser,
  created_at AS CreationDateTime,
  last_changed_by AS LastChangedByUser,
  last_changed_at AS LastChangeDateTime
FROM /cpd/pwsc_org_at
LEFT OUTER JOIN /cpd/pwsc_orgid AS _ServiceOrganization ON _ServiceOrganization.org_unit_id = ProjectServiceOrganization  -- association [1..1]
LEFT OUTER JOIN /cpd/pwsc_orgpid AS _OrganizationalStructure ON _OrganizationalStructure.org_unit_id = ProjectServiceOrganization AND _OrganizationalStructure.default_val = 'X'  -- association [0..*]
;