dbo.TSB_ZBaseTreeHasObject
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:20.800 · modified 2026-04-14T23:20:46.520 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure TSB_ZBaseTreeHasObject (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin 2 int declare @QER_BitPattern_Inherit_0 int = dbo.QER_FGIBitPatternInheritInfo('|Inherit|', 0) declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXOrigin_Inherit 3 int = dbo.QBM_FGIBitPatternXOrigin('|Inherit|', 0) BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID 4) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount 5 = 0 begin goto EndLabel end insert into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , uid_Org 6, ObjectKey, InheritInfo from BaseTreeHasObject bho join @DBQueueCurrent x on uid_Org = x.uid_parameter where bho.ObjectKey like '<Key><T>UNSGroupB</T>%' 7 or bho.ObjectKey like '<Key><T>UNSGroupB1</T>%' or bho.ObjectKey like '<Key><T>UNSGroupB2</T>%' or bho.ObjectKey like '<Key><T>UNSGroupB3</T>%' or bho.ObjectKey 8 like '<Key><T>TSBAccountDef</T>%' insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , 9 y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasUNSGroupB y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and 10 y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB z on z.uid_UNSGroupB = y.uid_UNSGroupB union all select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo 11(y.XOrigin) from BaseTreeHasUNSGroupB1 y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB1 z 12 on z.uid_UNSGroupB1 = y.uid_UNSGroupB1 union all select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasUNSGroupB2 13 y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB2 z on z.uid_UNSGroupB2 = y.uid_UNSGroupB2 14 union all select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasUNSGroupB3 y join @DBQueueCurrent x on y.UID_Org= 15 x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join UNSGroupB3 z on z.uid_UNSGroupB3 = y.uid_UNSGroupB3 insert into @SourceData( IsUpcommingContent 16, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , y.UID_Org, z.XObjectKey, dbo.QER_FCVXOriginToInheritInfo(y.XOrigin) from BaseTreeHasTSBAccountDef 17 y join @DBQueueCurrent x on y.UID_Org= x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join TSBAccountDef z on z.UID_TSBAccountDef = y.UID_TSBAccountDef 18 if dbo.QBM_FGIModuleExists('RMS') = 1 begin insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 19 1, 0 , y.UID_Org, ehe.Entitlement, dbo.QER_FCVXOriginToInheritInfo(@QBM_BitPatternXOrigin_Inherit) from BaseTreeHasESet y join @DBQueueCurrent x on y.UID_Org 20 = x.uid_parameter and y.XOrigin > 0 and y.XIsInEffect = 1 join ESetHasEntitlement ehe on ehe.UID_ESet = y.UID_ESet and ehe.XOrigin > 0 and ehe.XIsInEffect 21 = 1 join BaseTree b on y.UID_Org = b.UID_Org and not (b.UID_OrgRoot in ( 'QER-V-ITShopOrg', 'QER-V-ITShopSrc') and b.ITShopInfo in ( 'BO', 'PR', 'BG' 22, 'BT') ) join OrgRootAssign oa on oa.UID_OrgRoot = b.UID_OrgRoot and oa.IsAssignmentAllowed = 1 where ((ehe.Entitlement like '<Key><T>UNSGroupB</T>%' 23and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB') or (ehe.Entitlement like '<Key><T>UNSGroupB1</T>%' and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB1' 24) or (ehe.Entitlement like '<Key><T>UNSGroupB2</T>%' and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB2') or (ehe.Entitlement like '<Key><T>UNSGroupB3</T>%' 25 and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-UNSGroupB3') or (ehe.Entitlement like '<Key><T>TSBAccountDef</T>%' and oa.UID_BaseTreeAssign = 'TSB-AsgnBT-TSBAccountDef' 26) ) end insert into @SourceData( IsUpcommingContent, XOriginBefore , Element, AssignedElement, XOriginAfter ) select 1, 0 , t.Element, t.XObjectKey 27, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB g on ho.AssignedElement = g.XObjectKey 28join UNSGroupBCollection co on co.UID_UNSGroupBChild = g.uid_UNSGroupB join UNSGroupB p on co.UID_UNSGroupBParent = p.UID_UNSGroupB where ho.IsUpcommingContent 29 = 1 and co.UID_UNSGroupBChild <> co.UID_UNSGroupBParent ) as t union all select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from 30 ( select distinct ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB1 g on ho.AssignedElement = g.XObjectKey join UNSGroupB1Collection co on 31co.UID_UNSGroupB1Child = g.uid_UNSGroupB1 join UNSGroupB1 p on co.UID_UNSGroupB1Parent = p.UID_UNSGroupB1 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB1Child 32 <> co.UID_UNSGroupB1Parent ) as t union all select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey 33 from @SourceData ho join UNSGroupB2 g on ho.AssignedElement = g.XObjectKey join UNSGroupB2Collection co on co.UID_UNSGroupB2Child = g.uid_UNSGroupB2 join 34 UNSGroupB2 p on co.UID_UNSGroupB2Parent = p.UID_UNSGroupB2 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB2Child <> co.UID_UNSGroupB2Parent ) as 35t union all select 1, 0 , t.Element, t.XObjectKey, @QER_BitPattern_Inherit_0 from ( select distinct ho.Element, p.XObjectKey from @SourceData ho join UNSGroupB3 36 g on ho.AssignedElement = g.XObjectKey join UNSGroupB3Collection co on co.UID_UNSGroupB3Child = g.uid_UNSGroupB3 join UNSGroupB3 p on co.UID_UNSGroupB3Parent 37 = p.UID_UNSGroupB3 where ho.IsUpcommingContent = 1 and co.UID_UNSGroupB3Child <> co.UID_UNSGroupB3Parent ) as t berechnen: exec QBM_PDBQueueCalculateDelta 38 @SourceData, @DeltaQuantity = 0, @DeltaDelete = 1, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin 39 = @CountDeltaOrigin output , @UseIsInEffect = 0 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent exec QER_PBasetreeHasObjectPostProc 40 @CountDeltaOrigin, @CountDeltaQantity END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: end 41
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:20:46.520
has TRY/CATCH error handling
Summary: calls QBM_PDBQueueCalculateDelta, QER_PBasetreeHasObjectPostProc, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, BaseTreeHasObject, BaseTreeHasUNSGroupB, UNSGroupB, BaseTreeHasUNSGroupB1…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT intoRead/join references
- QBMDBQueueCurrent
- BaseTreeHasObject
- BaseTreeHasUNSGroupB
- UNSGroupB
- BaseTreeHasUNSGroupB1
- UNSGroupB1
- BaseTreeHasUNSGroupB2
- UNSGroupB2
- BaseTreeHasUNSGroupB3
- UNSGroupB3
- BaseTreeHasTSBAccountDef
- TSBAccountDef
- BaseTreeHasESet
- ESetHasEntitlement
- BaseTree
- OrgRootAssign
- UNSGroupBCollection
- UNSGroupB1Collection
- UNSGroupB2Collection
- UNSGroupB3Collection
SQL dependency metadata
- BaseTree
- BaseTreeHasESet
- BaseTreeHasObject
- BaseTreeHasTSBAccountDef
- BaseTreeHasUNSGroupB
- BaseTreeHasUNSGroupB1
- BaseTreeHasUNSGroupB2
- BaseTreeHasUNSGroupB3
- ESetHasEntitlement
- OrgRootAssign
- QBM_PDBQueueCalculateDelta
- QBM_PSessionErrorAdd
- QBM_YDataForDelta
- QBM_YDBQueueCurrent
- QBMDBQueueCurrent
- QER_PBasetreeHasObjectPostProc
- TSBAccountDef
- UNSGroupB
- UNSGroupB1
- UNSGroupB1Collection
- UNSGroupB2
- UNSGroupB2Collection
- UNSGroupB3
- UNSGroupB3Collection
- UNSGroupBCollection
- dbo.QBM_FGIBitPatternXOrigin
- dbo.QBM_FGIModuleExists
- dbo.QER_FCVXOriginToInheritInfo
- dbo.QER_FGIBitPatternInheritInfo
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @QER_BitPattern_Inherit_0 @DBQueueCurrent @QBM_BitPatternXOrigin_Inherit @rowcount @SourceData @DeltaQuantity @DeltaDelete @DeltaInsert @DeltaOrigin @UseIsInEffect @DBQueueCurrentExtern
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.
No reverse dependencies extracted.