作为一名abap开发人员,经常会遇到在开发环境修改了错误的代码,并且已经生成了,请求号,将代码还原之后,想删除请求号的情况,有可能会出现无法删除的情况,如下图所示:
针对这种情况,我们可以使用自开发程序,输入请求号进行删除:
部分代码如下:
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 .