2008 Mar 18 4:13 AM
Is it possible to develop program deactivation tool like whenever we run the tool it has to comment the entire code for particular program like that how we can develop logic to put comments ................
thanks in advance.
2008 Mar 18 4:17 AM
2008 Mar 18 4:50 AM
Sitaram,
You want to comment all the lines in a program by using a program ,if it is so I guess it can be done by adding a * programatically to every line in the program.If you go through the program RM07DOCS of MB51 you will come across an perform Check_version.Here in this subroutine it comments some lines
In the perform Check_version it is done this way.
FORM check_version.
DATA: dtg_db(14) TYPE n.
SELECT MAX( dtg ) INTO dtg_db FROM mmim_rep_cust
WHERE report = 'RM07DOCS'.
IF sy-subrc = 0.
READ REPORT 'RM07DOCS_GENERATED' INTO code. READ TABLE code INDEX 1.
CONCATENATE '*' dtg_db INTO timestamp.
This code is declared as follows
DATA: BEGIN OF code OCCURS 0,
line(72),
END OF code.
I guess you can tweak the above logic and get your requirement done.May be this can give you a lead.
K.Kiran.