dbo.QER_ZHelperHeadOrg
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:07.460 · modified 2026-04-14T23:20:40.233 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| BaseTree | OBJECT_OR_COLUMN | ||
| HelperHeadOrg | OBJECT_OR_COLUMN | ||
| Person | OBJECT_OR_COLUMN | ||
| PersonInBaseTree | OBJECT_OR_COLUMN | ||
| personwantsorg | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueCalculateDelta | OBJECT_OR_COLUMN | ||
| QBM_PMNTableInsert | OBJECT_OR_COLUMN | ||
| QBM_PMNTableOriginUpdate | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDataForDelta | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| QERUniversalSubstitute | OBJECT_OR_COLUMN | ||
| QERUniversalSubstituteInRoot | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGIBitPatternXOrigin | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QER_ZHelperHeadOrg (@SlotNumber int) AS begin declare @Sourcedata QBM_YDataForDelta , @CountDeltaQantity int , @CountDeltaOrigin 2 int declare @DebugSwitch int = 0 declare @DBQueueCurrent QBM_YDBQueueCurrent declare @QBM_BitPatternXOrigin_Direct int = dbo.QBM_FGIBitPatternXOrigin( 3'|Direct|', 0) declare @QBM_BitPatternXOrigin_PWO int = dbo.QBM_FGIBitPatternXOrigin('|PWO|', 0) declare @QBM_BitPatternXOrigin_Dynamic int = dbo.QBM_FGIBitPatternXOrigin 4('|Dynamic|', 0) BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter 5, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end insert 6 into @SourceData( IsUpcommingContent, XOriginAfter , Element, AssignedElement, XOriginBefore ) select 0, 0 , hho.UID_PersonHead, hho.UID_Org, hho.XOrigin 7 from @DBQueueCurrent x join HelperHeadOrg hho on hho.uid_personHead = x.uid_parameter if @DebugSwitch > 0 begin print 'vorher' select * from @SourceData 8 end insert into @SourceData( IsUpcommingContent, XOriginBefore, XOriginAfter , Element, AssignedElement ) select 1, 0, hho.XOrigin & @QBM_BitPatternXOrigin_PWO 9 , hho.uid_personHead, hho.uid_Org from @DBQueueCurrent x join HelperHeadOrg hho on hho.uid_personHead = x.UID_Parameter and exists (select top 1 1 10from personwantsorg where ObjectKeyAssignment = hho.XObjectkey) if @DebugSwitch > 0 begin print 'nachher Delegierungen' select * from @SourceData end insert 11 into @SourceData( IsUpcommingContent, XOriginBefore, XOriginAfter , Element, AssignedElement ) select 1, 0, @QBM_BitPatternXOrigin_Direct , b.uid_personHead 12, b.uid_Org from @DBQueueCurrent x join BaseTree b on x.uid_parameter = b.uid_PersonHead join Person p on x.UID_Parameter = p.UID_Person if @DebugSwitch 13 > 0 begin print 'nachher direkt uid_personHead' select * from @SourceData end insert into @SourceData( IsUpcommingContent, XOriginBefore, XOriginAfter 14 , Element, AssignedElement ) select 1, 0, @QBM_BitPatternXOrigin_Direct , b.uid_personHeadSecond, b.uid_Org from @DBQueueCurrent x join BaseTree b on 15x.uid_parameter = b.uid_PersonHeadSecond join Person p on x.UID_Parameter = p.UID_Person if @DebugSwitch > 0 begin print 'nachher direkt uid_personHeadSecond' 16 select * from @SourceData end insert into @SourceData( IsUpcommingContent, XOriginBefore, XOriginAfter , Element, AssignedElement ) select 1, 0, pio.XOrigin 17 , x.UID_Parameter as UID_Person, b.uid_Org from @DBQueueCurrent x join PersonInBaseTree pio on x.uid_parameter = pio.UID_Person join BaseTree b on b.UID_AERoleManager 18 = pio.UID_Org if @DebugSwitch > 0 begin print 'nachher mit UID_AERoleManager' select * from @SourceData end insert into @SourceData( IsUpcommingContent 19, XOriginBefore, XOriginAfter , Element, AssignedElement ) select 1, 0, @QBM_BitPatternXOrigin_Dynamic , us.UID_PersonReceiver as uid_personHead, b.UID_Org 20 from @DBQueueCurrent x join QERUniversalSubstitute us on x.UID_Parameter = us.UID_PersonReceiver join BaseTree b on us.UID_PersonSender in (b.UID_PersonHead 21, b.UID_PersonHeadSecond) join QERUniversalSubstituteInRoot usr on usr.UID_QERUniversalSubstitute = us.UID_QERUniversalSubstitute and b.UID_OrgRoot = usr.UID_OrgRoot 22 where us.IsCurrentlyActive = 1 and us.UseForHeadOrg = 1 insert into @SourceData( IsUpcommingContent, XOriginBefore, XOriginAfter , Element, AssignedElement 23 ) select 1, 0, @QBM_BitPatternXOrigin_Direct , x.UID_Parameter as UID_Person, b.uid_Org from @DBQueueCurrent x join QERUniversalSubstitute us on x.UID_Parameter 24 = us.UID_PersonReceiver join PersonInBaseTree pio on us.UID_PersonSender = pio.UID_Person join BaseTree b on b.UID_AERoleManager = pio.UID_Org join QERUniversalSubstituteInRoot 25 usr on usr.UID_QERUniversalSubstitute = us.UID_QERUniversalSubstitute and usr.UID_OrgRoot = 'QER-V-AERole' where us.IsCurrentlyActive = 1 and us.UseForHeadOrg 26 = 1 if @DebugSwitch > 0 begin print 'nachher mit QERUniversalSubstitute' select * from @SourceData end exec QBM_PDBQueueCalculateDelta @SourceData, @DeltaQuantity 27 = 0, @DeltaDelete = 0, @DeltaInsert = 1, @DeltaOrigin = 1, @CountDeltaQantity = @CountDeltaQantity output , @CountDeltaOrigin = @CountDeltaOrigin output 28 , @UseIsInEffect = 0 , @SlotNumber = @SlotNumber , @DBQueueCurrentExtern = @DBQueueCurrent if @DebugSwitch > 0 begin print 'nach Berechnung' print '@CountDeltaQantity' 29 + str(@CountDeltaQantity) print '@CountDeltaOrigin' + str(@CountDeltaOrigin) end if @CountDeltaOrigin > 0 begin exec QBM_PMNTableOriginUpdate 'HelperHeadOrg' 30, 'uid_personHead', 'UID_Org' end if @CountDeltaQantity > 0 begin if @DebugSwitch > 0 begin print 'delta quantity gefunden' select * from @SourceData end 31 exec QBM_PMNTableInsert 'HelperHeadOrg', 'uid_personHead', 'UID_Org' end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1 32) WITH NOWAIT END CATCH endLabel: return end 33
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:40.233
has TRY/CATCH error handling
Summary: calls QBM_PDBQueueCalculateDelta, QBM_PMNTableOriginUpdate, QBM_PMNTableInsert, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, HelperHeadOrg, personwantsorg, BaseTree, Person…
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT intoCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @Sourcedata @CountDeltaQantity @CountDeltaOrigin @DebugSwitch @DBQueueCurrent @QBM_BitPatternXOrigin_Direct @QBM_BitPatternXOrigin_PWO @QBM_BitPatternXOrigin_Dynamic @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.