You can loop through the lines of a report and modify the contents and 
formatting of single lines and/or single fields in a line. 
Example:
data: lineno type i, 
new_contents(10) type c. 
clear lineno.
new_contents = 
'Changed'.
do.
*   Count 
linenumber
    lineno = lineno + 1.
*   Make the line the current 
line
     read line lineno.
*    Test for end of 
report                 
if sy-subrc ne 0. exit. 
endif.
*    Change 
the value of the field itab-zzrevomr in the current line to the value
*    of the variable new_contents 
    
    modify current line field value 
itab-zzrevomr from new_contents.
*    Change format of the current 
line. In this example the firts field in the line is a checkbox,
*    and we want to prevent the 
user form changing the contents ( Input off )
    modify current line                        
    
    line format color col_negative intensified on                         
field format markfield input off.      
enddo. 
Saturday, July 26, 2014
5
ABAP Tips: Modifying a Line in a Report
You can loop through the lines of a report and modify the contents and  formatting of single lines and/or single fields in a line. Example: ...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment