dbo.CPL_FTCCSPersonHasObjectWPWO

SQL_INLINE_TABLE_VALUED_FUNCTION

Created 2026-04-14T23:18:41.653 · modified 2026-04-14T23:18:41.653 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@UID_PersonWantsOrgvarcharno
@IsCrossPersonCheckbitno

Referenced objects

SchemaObjectColumn/minorClass
HelperPWOPersonHasObjectOBJECT_OR_COLUMN
PersonHasObjectOBJECT_OR_COLUMN
dboCPL_FTCCSPersonsForPWOOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1 create function dbo.CPL_FTCCSPersonHasObjectWPWO (@UID_PersonWantsOrg varchar(38) , @IsCrossPersonCheck bit  )  returns  table as return ( with  PersonAll
2 (UID_Person) as ( select p.UID_Person  from dbo.CPL_FTCCSPersonsForPWO (@UID_PersonWantsOrg, @IsCrossPersonCheck) p ) select x.UID_PersonWantsOrg, x.UID_Person
3, case when Objectkey like '<Key><T>SAPFunctionInstance</T>%' then max(IsNew) else min(IsNew) end as IsNew  , Objectkey  , sign(min(convert(int, IsFromSubIdentityOnly
4))) as IsFromSubIdentityOnly from (  select 0 as IsNew, @UID_PersonWantsOrg as UID_PersonWantsOrg, po.uid_person, po.Objectkey , case po.InheritInfo when
5 4  then 1 else 0 end as IsFromSubIdentityOnly from PersonHasObject po join PersonAll pe on po.uid_person = pe.UID_Person  where ~@IsCrossPersonCheck &
6 (case po.InheritInfo when 4  then 1 else 0 end) = 0 union all   select 0 as IsNew , pho.UID_PersonWantsOrg, pho.uid_person, pho.ObjectKey, pho.IsFromSubIdentityOnly
7 from HelperPWOPersonHasObject pho join PersonAll pe on pho.UID_Person = pe.UID_Person  where pho.UID_PersonWantsOrg <> @UID_PersonWantsOrg and ~@IsCrossPersonCheck
8 & pho.IsFromSubIdentityOnly = 0 and pho.isExisting = 0   union all select ~pho.IsExisting as IsNew, pho.UID_PersonWantsOrg, pho.uid_person, pho.ObjectKey
9, pho.IsFromSubIdentityOnly from HelperPWOPersonHasObject pho where pho.UID_PersonWantsOrg = @UID_PersonWantsOrg and ~@IsCrossPersonCheck & pho.IsFromSubIdentityOnly
10 = 0 ) as x group by x.UID_PersonWantsOrg, x.UID_Person, x.ObjectKey )   
11

Module relation graph

Loading module relation graph…

Source-derived context

Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.

provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:18:41.653

None extracted.

Summary: reads/joins CPL_FTCCSPersonsForPWO, PersonHasObject, PersonAll, HelperPWOPersonHasObject

Declared parameters

ParameterTypeDirection
@UID_PersonWantsOrgvarchar(38)input
@IsCrossPersonCheckbitinput

DML targets

None extracted.

Called routines

None extracted.

Config/session

Config: None extracted.

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @UID_PersonWantsOrg @IsCrossPersonCheck

Referenced by / reverse dependencies

Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.

Referencing objectRelationEvidence
dbo.CPL_FTCCSPWOCheckDetailSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.CPL_FTCCSPWOCheckSQL expression dependencydbo · OBJECT_OR_COLUMN
dbo.CPL_FTCCSPWOChecksource text referenceSQL_TABLE_VALUED_FUNCTION