‎2007 Sep 20 12:12 PM
Hi,
I have to display only commented code as the output.
User will give the program (abap report) name and it should display only commented lines in that program.
Is there any option or command or tcodes that can extract only selected text?
Pls advise.
‎2007 Sep 20 1:00 PM
Run the program below, i hope it suits ur requirement
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE lv_frttl.
PARAMETERS: program LIKE sy-repid.
SELECTION-SCREEN END OF BLOCK b1.
DATA: gt_code(255) TYPE c OCCURS 0,
gv_code LIKE LINE OF gt_code,
gt_code2(255) TYPE c OCCURS 0,
temp like gv_code.
INITIALIZATION.
sets the value for the title of the parameters block
lv_frttl = 'Parameter'.
START-OF-SELECTION.
READ REPORT program INTO gt_code.
LOOP AT gt_code INTO gv_code.
if gv_code+0(1) eq '*'.
write:/ gv_code.
endif.
endloop.
Reward points if useful, get back in case of query...
Cheers!!!
‎2007 Sep 20 12:16 PM
Hi
try the fun modules
ABAP_SCAN_DATA_DESCRIPTION
S_ABAP_OBJECTS_SCAN
and try to get the commented lines data and display them
Reward if useful
regards
Anji
‎2007 Sep 20 12:22 PM
Hello Suyog
Please develop a program using the following ABAP stmt..
READ REPORT <the rep name entered by user> INTO <Int table>
Loop at internal table and check first character ' * ' or search for ' " ' , if found disply the line...
Hope it helps...
Regards,
Arun
‎2007 Sep 20 1:00 PM
Run the program below, i hope it suits ur requirement
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE lv_frttl.
PARAMETERS: program LIKE sy-repid.
SELECTION-SCREEN END OF BLOCK b1.
DATA: gt_code(255) TYPE c OCCURS 0,
gv_code LIKE LINE OF gt_code,
gt_code2(255) TYPE c OCCURS 0,
temp like gv_code.
INITIALIZATION.
sets the value for the title of the parameters block
lv_frttl = 'Parameter'.
START-OF-SELECTION.
READ REPORT program INTO gt_code.
LOOP AT gt_code INTO gv_code.
if gv_code+0(1) eq '*'.
write:/ gv_code.
endif.
endloop.
Reward points if useful, get back in case of query...
Cheers!!!