注意:ENQUE_READ 和 ENQUE_READ2 的table ENQ是两个不同的结构
想通过 ENQUE_READ2 读取结构然后去删除 ENQUE_DELETE的 要注意不能直接用
要用 ENQUE_CONVERT_SEQG7_TO_SEQG3 进行转换
FUNCTION ENQUE_CONVERT_SEQG7_TO_SEQG3.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" RAW_ENQ STRUCTURE SEQG7
*" ENQ STRUCTURE SEQG3
*"----------------------------------------------------------------------
REFRESH ENQ.
LOOP AT raw_enq.
CASE raw_enq-GBCKTYPE.
WHEN 'R'. raw_enq-GBCKTYPE = SPACE.
WHEN 'B'. raw_enq-GBCKTYPE = 'X'.
WHEN 'N'. raw_enq-GBCKTYPE = 'X'.
WHEN OTHERS. raw_enq-GBCKTYPE = SPACE.
ENDCASE.
CLEAR ENQ.
MOVE-CORRESPONDING raw_enq TO ENQ.
IF ENQ-GUSE = 0.
ENQ-GUSR = SPACE.
ELSE.
ENQ-GTHOST = ENQ-GUSR+26(32).
ENQ-GTSYSNR = ENQ-GUSR+24(2).
* ENQ-GTWP = ENQ-GUSR+22(2).
perform enq_gusr_get_wp using enq-gusr changing enq-gtwp.
ENQ-GTDATE = ENQ-GUSR+00(8).
ENQ-GTTIME = ENQ-GUSR+08(6).
ENQ-GTUSEC = ENQ-GUSR+14(6).
ENDIF.
IF ENQ-GUSEVB = 0.
ENQ-GUSRVB = SPACE.
ELSE.
ENQ-GTHOST = ENQ-GUSRVB+26(32).
ENQ-GTSYSNR = ENQ-GUSRVB+24(2).
* ENQ-GTWP = ENQ-GUSRVB+22(2).
perform enq_gusr_get_wp using enq-gusrvb changing enq-gtwp.
ENQ-GTDATE = ENQ-GUSRVB+00(8).
ENQ-GTTIME = ENQ-GUSRVB+08(6).
ENQ-GTUSEC = ENQ-GUSRVB+14(6).
ENDIF.
ENQ-GUSETXT = ENQ-GUSE.
ENQ-GUSEVBT = ENQ-GUSEVB.
ENQ-GTARG = ENQ-GARG.
APPEND ENQ.
ENDLOOP.
ENDFUNCTION.