dbo.QER_PITShopOrderResetOneLevel
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:06.560 · modified 2026-04-14T23:20:39.153 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@uid_PersonwantsOrg | varchar | no |
@NewLevel | int | no |
@GenProcID | varchar | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| PWODecisionRule | OBJECT_OR_COLUMN | ||
| PWOHelperPWO | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QERWorkingStep | OBJECT_OR_COLUMN | ||
| dbo | QBM_FGISessionContext | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionErrorRethrow | 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_PITShopOrderResetOneLevel (@uid_PersonwantsOrg varchar(38) , @NewLevel int , @GenProcID varchar(38) ) as begin declare 2 @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') declare @XUser_R nvarchar(64) = dbo.QBM_FGISessionContext('XUser') declare @WhereclauseForMail 3 nvarchar(1000) SET XACT_ABORT OFF BEGIN TRY if exists (select top 1 1 from PWOHelperPWO h join QERWorkingStep s on h.UID_QERWorkingStep = s.UID_QERWorkingStep 4 join PWODecisionRule r on r.UID_PWODecisionRule = s.UID_PWODecisionRule and r.UID_PWODecisionRule not in ('CPL-PWODecisionRule-OC' , 'CPL-PWODecisionRule-OH' 5 ) where h.UID_PersonWantsOrg = @uid_PersonwantsOrg and h.LevelNumber = @NewLevel and ( h.decision > ' ' or h.UID_PersonInsteadOf > ' ' or h.uid_PersonAdditional 6 > ' ' ) ) begin update PWOHelperPWO set Decision = '' , UID_PersonInsteadOf = null , UID_PersonAdditional = null from PWOHelperPWO h join QERWorkingStep 7 s on h.UID_QERWorkingStep = s.UID_QERWorkingStep join PWODecisionRule r on r.UID_PWODecisionRule = s.UID_PWODecisionRule and r.UID_PWODecisionRule not 8 in ('CPL-PWODecisionRule-OC' , 'CPL-PWODecisionRule-OH' ) where h.UID_PersonWantsOrg = @uid_personwantsorg and h.LevelNumber = @NewLevel and ( h.decision 9 > ' ' or h.UID_PersonInsteadOf > ' ' or h.uid_PersonAdditional > ' ' ) end if exists (select top 1 1 from PWOHelperPWO h where h.UID_PersonWantsOrg = 10@uid_PersonwantsOrg and h.LevelNumber = @NewLevel and ( h.IsFromDelegation = 1 ) ) begin delete PWOHelperPWO from PWOHelperPWO h where h.IsFromDelegation 11 = 1 and h.UID_PersonWantsOrg = @uid_personwantsorg and h.LevelNumber = @NewLevel end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default declare @Rethrow 12 varchar(1000) = dbo.QBM_FGISessionErrorRethrow() RAISERROR (@Rethrow, 18, 1) WITH NOWAIT END CATCH ende: exec QBM_PSessionContextSet 'GenProcID', @GenProcID_R 13 exec QBM_PSessionContextSet 'XUser', @XUser_R return end 14
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:39.153
uses session context values has TRY/CATCH error handling
Summary: calls QBM_PSessionErrorAdd, QBM_PSessionContextSet; writes UPDATE PWOHelperPWO, DELETE PWOHelperPWO; reads/joins PWOHelperPWO, QERWorkingStep, PWODecisionRule; uses session context XUser, GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@uid_PersonwantsOrg | varchar(38) | input |
@NewLevel | int | input |
@GenProcID | varchar(38) | input |
DML targets
UPDATE PWOHelperPWO DELETE PWOHelperPWOCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: XUser GenProcID
DBQueue/tasks
None extracted.Temp tables / referenced variables
Temp: None extracted.
Variables: @uid_PersonwantsOrg @NewLevel @GenProcID @GenProcID_R @XUser_R @WhereclauseForMail @uid_personwantsorg @Rethrow
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 object | Relation | Evidence |
|---|---|---|
| dbo.QER_TUPersonWantsOrg | SQL expression dependency | OBJECT_OR_COLUMN |
| dbo.QER_TUPersonWantsOrg | source text reference | creates object-layer jobs via QBM_PJobCreate*, inserts DBQueue tasks, calls object-layer method via HOCallMethod, uses session context values, has TRY/CATCH error handling |