有时需要删除请求号,发现无法删除,或者删除请求号里的对象时,对象很多,还都被锁定,删除时一个个的提示被 锁,删除麻烦,就可以使用些程序删除请求号。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
Program ZSTDELREQ . data : itab_e070 like e070 occurs 0 with header line, * Request header including Req user. iwa_e070c like e070c, "Request client itab_e071 like e071 occurs 0 with header line , *Request entry line items may include multiple lines iwa_e07t like e07t , "Requst short text(desc) iwa_E070A like E070A , *If the Request was locked and delelted,Delete Tlock otherwise *The program will be locked to make any modifications. itab_tlock like tlock occurs 0 with header line . parameter reqno like e070-trkorr default '' . select * into table itab_e070 from e070 where trkorr eq reqno or strkorr eq reqno. if SY-SUBRC Ne 0 . write : 'The Request No.:' , Reqno , ' not exist !' . * exit . endif . select single * into iwa_e070c from e070c where trkorr eq reqno . select * into table itab_e071 from e071 where trkorr eq reqno . select single * into iwa_e07t from e07t where trkorr eq reqno . select single * into iwa_E070A from e070A where trkorr eq reqno . if itab_e070 IS INITIAL . select * into table itab_tlock from tlock where trkorr eq reqno . else. select * into table itab_tlock from tlock FOR ALL ENTRIES IN itab_e070 where TRKORR eq itab_e070-trkorr . endif. if SY-SUBRC NE 0 . write : / 'No Locked object for the request NO. was found!'. endif . delete : e070 from table itab_e070 , e070c from iwa_e070c, e071 from table itab_e071, e07t from iwa_e07t , e070A from iwa_E070A , tlock from table itab_tlock . write : / 'The Request No.:' , Reqno. |