dbo.QER_ZITShopOrderReset
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:06.347 · modified 2026-04-14T23:20:38.880 · 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 | ||
| HelperPWOCompliance | OBJECT_OR_COLUMN | ||
| HelperPWOPersonhasObject | OBJECT_OR_COLUMN | ||
| PersonWantsOrg | OBJECT_OR_COLUMN | ||
| PWODecisionHistory | OBJECT_OR_COLUMN | ||
| pwohelperpwo | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YParameterlist | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| QER_PGIQERWorkingMethod | OBJECT_OR_COLUMN | ||
| QER_PITShopHelperFill_bulk | OBJECT_OR_COLUMN | ||
| QER_PITShopPersonHasObjFill_b | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVElementToObjectKey1 | OBJECT_OR_COLUMN | |
| dbo | QBM_FCVStringTrimLDSPrefix | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | 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_ZITShopOrderReset (@SlotNumber int) as begin declare @uid_personwantsorg varchar(38) declare @UID_PWODecisionHistory 2 varchar(38) declare @GenProcID varchar(38) declare @cond nvarchar(1000) declare @BasisObjectKey varchar(138) declare @AbortMethod nvarchar(64) declare 3 @reason nvarchar(1000) declare @MyName nvarchar(64) = object_name(@@procid) declare @DecisionOnInsert int = 0 declare @UID_QERWorkingMethod varchar(38 4) declare @UID_PWODecisionMethod varchar(38) declare @OrderState varchar(16) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') declare @ElementLast 5 int declare @ElementCount int declare @ElementIndex int declare @PWOsToFill QBM_YParameterlist declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN 6TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter 7, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount = 0 begin goto EndLabel end declare @ElementReset 8 QBM_YCursorBuffer insert into @ElementReset (UID1, UID2, UID3) select p.uid_parameter, newid(), p.GenProcID from @DBQueueCurrent p select @ElementCount 9 = @@ROWCOUNT select @ElementIndex = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin select top 10 1 @uid_personwantsorg = bu.UID1 , @UID_PWODecisionHistory = bu.UID2 , @GenProcID = bu.UID3 from @ElementReset bu where bu.ElementIndex = @ElementIndex 11 exec QBM_PSessionContextSet 'GenProcID', @GenProcID insert into PWODecisionHistory (DecisionType, IsDecisionBySystem, UID_PWODecisionHistory, UID_PWOState 12, UID_PersonHead, UID_PersonWantsOrg, DisplayPersonHead, ReasonHead, DateHead, XDateInserted, XDateUpdated, XUserInserted, XUserUpdated, DecisionLevel, 13 XTouched, ValidUntil, ValidFrom , XObjectKey , UID_ITShopOrgFinal, OrderState) select 'Reset', 1, @UID_PWODecisionHistory, null, null, @uid_personwantsorg 14, dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Automatic system approval.|') , dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Procedure deferred due to changed decision.|' 15), GetUTCDate(), GetUTCDate(), GetUTCDate(), 'sa', 'sa', 0, null, null, null, dbo.QBM_FCVElementToObjectKey1('PWODecisionHistory', 'UID_PWODecisionHistory' 16, @UID_PWODecisionHistory) , pwo.UID_ITShopOrgFinal, pwo.OrderState from PersonWantsOrg pwo where pwo.UID_PersonWantsOrg = @uid_personwantsorg select 17@ElementIndex += 1 end if dbo.QBM_FGIConfigparmValue('QER\ITShop\DecisionOnInsert') > ' ' begin select @DecisionOnInsert = 1 end declare @ElementDieAnderen 18 QBM_YCursorBuffer insert into @ElementDieAnderen (UID1, UID2, UID3, Ident1) select p.uid_parameter, p.GenProcID, pr.UID_PWODecisionMethod, pwo.OrderState 19 from @DBQueueCurrent p join PersonWantsOrg pwo on p.uid_parameter = pwo.UID_PersonWantsOrg join BaseTree pr on pwo.UID_Org = pr.UID_Org and pr.ITShopInfo 20 = 'PR' select @ElementCount = @@ROWCOUNT select @ElementIndex = @@IDENTITY - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= 21@ElementLast begin select top 1 @UID_Personwantsorg = bu.UID1 , @GenProcID = bu.UID2 , @UID_PWODecisionMethod = bu.UID3 , @OrderState = bu.Ident1 from 22@ElementDieAnderen bu where bu.ElementIndex = @ElementIndex exec QER_PGIQERWorkingMethod @UID_PWODecisionMethod, @OrderState, @UID_QERWorkingMethod 23 output exec QBM_PSessionContextSet 'GenProcID', @GenProcID update personwantsorg set decisionlevel = 0, UID_PWOState = null, UID_PersonHead = null, DisplayPersonHead 24 = null, DateHead = GetUTCDate(), OrderDate = GetUTCDate(), ReasonHead = dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Procedure deferred due to changed decision.|' 25), XDateUpdated = GetUTCDate(), XUserUpdated = 'DBScheduler' , UID_QERWorkingMethod = @UID_QERWorkingMethod from PersonWantsOrg pwo where uid_personwantsorg 26 = @UID_Personwantsorg exec QBM_PSessionContextSet 'GenProcID', @GenProcID delete HelperPWOCompliance where uid_personwantsorg = @UID_Personwantsorg exec 27 QBM_PSessionContextSet 'GenProcID', @GenProcID delete HelperPWOPersonhasObject where uid_personwantsorg = @UID_Personwantsorg exec QBM_PSessionContextSet 28 'GenProcID', @GenProcID delete pwohelperpwo where uid_personwantsorg = @UID_Personwantsorg select @ElementIndex += 1 end if @DecisionOnInsert 29 = 1 begin delete @PWOsToFill insert into @PWOsToFill(Parameter1, Parameter2, Parameter3, HasContentFull) select p.uid_parameter, p.GenProcID, '0', 1 30 from @DBQueueCurrent p join PersonWantsOrg pwo on p.uid_parameter = pwo.UID_PersonWantsOrg join BaseTree pr on pwo.UID_Org = pr.UID_Org and pr.ITShopInfo 31 = 'PR' exec QER_PITShopHelperFill_bulk @PWOsToFill exec QER_PITShopPersonHasObjFill_b @PWOsToFill end Restaufgaben: declare @DBQueueElements_01 QBM_YDBQueueRaw 32 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, x.GenProcID from ( select uid_parameter as uid, genprocid as GenProcID 33 from @DBQueueCurrent p ) as x exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackPWOHelperPWO', @DBQueueElements_01 exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRackPersonHasObject' 34, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 35 'GenProcID', @GenProcID_R return end 36
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:38.880
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PSessionContextSet, QER_PGIQERWorkingMethod, QER_PITShopHelperFill_bulk, QER_PITShopPersonHasObjFill_b, QBM_PDBQueueInsert_Bulk…; writes INSERT into, INSERT PWODecisionHistory, UPDATE personwantsorg, DELETE HelperPWOCompliance, DELETE HelperPWOPersonhasObject…; reads/joins QBMDBQueueCurrent, PersonWantsOrg, BaseTree; uses config QER\ITShop\DecisionOnInsert; uses session context GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT into INSERT PWODecisionHistory UPDATE personwantsorg DELETE HelperPWOCompliance DELETE HelperPWOPersonhasObject DELETE pwohelperpwoCalled routines
Read/join references
SQL dependency metadata
- BaseTree
- HelperPWOCompliance
- HelperPWOPersonhasObject
- PersonWantsOrg
- PWODecisionHistory
- pwohelperpwo
- QBM_PDBQueueInsert_Bulk
- QBM_PSessionContextSet
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YDBQueueCurrent
- QBM_YDBQueueRaw
- QBM_YParameterlist
- QBMDBQueueCurrent
- QER_PGIQERWorkingMethod
- QER_PITShopHelperFill_bulk
- QER_PITShopPersonHasObjFill_b
- dbo.QBM_FCVElementToObjectKey1
- dbo.QBM_FCVStringTrimLDSPrefix
- dbo.QBM_FGIConfigparmValue
- dbo.QBM_FGISessionContext
Config/session
Config: QER\ITShop\DecisionOnInsert
Session: GenProcID
DBQueue/tasks
QER-K-ShoppingRackPWOHelperPWO QER-K-ShoppingRackPersonHasObjectTemp tables / referenced variables
Temp: #LDS #Automatic #Procedure
Variables: @SlotNumber @uid_personwantsorg @UID_PWODecisionHistory @GenProcID @cond @BasisObjectKey @AbortMethod @reason @MyName @procid @DecisionOnInsert @UID_QERWorkingMethod @UID_PWODecisionMethod @OrderState @GenProcID_R @ElementLast @ElementCount @ElementIndex @PWOsToFill @DBQueueCurrent @rowcount @ElementReset @ROWCOUNT @IDENTITY @ElementDieAnderen @UID_Personwantsorg @DBQueueElements_01
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.