2013 Feb 15 7:19 PM
Hi Friends,
I am working on a ALV Grid report using FM REUSE_ALV_GRID_DISPLAY wherein when the ALV report is executed I have to see only 20 default rows by default. I am not pulling the data from any database tables into this report. So when the user executes this report he/she should see 20 blank rows by default. Is this possible to do. If yes, I need some hints on how to achieve this. Appreciate your answers.
Thanks,
Nani
Hi Friends,
I am working on a ALV Grid report using FM REUSE_ALV_GRID_DISPLAY wherein when the ALV report is executed I have to see only 20 default rows by default. I am not pulling the data from any database tables into this report. So when the user executes this report he/she should see 20 blank rows by default. Is this possible to do. If yes, I need some hints on how to achieve this. Appreciate your answers.
Thanks,
Nani
2013 Feb 15 7:56 PM
First check that your internal table is empty. then apply loop on it 20 times and store any null character in character type field and append it to itab. through this you will get the itab with 20 entries now pass it to ALV.
if itab is not INITIAL.
do 20 times.
itab-xyz = '-'.
append itab.
enddo.
endif.
2013 Feb 15 9:06 PM
Hello,
According to screen resolution the ALV grid/report but mostly the screen on which the ALV grid is present will change it is size and so the table control or ALV report inside.
A better way is gray out the lines. Keep 20 lines editable and remaining grayed out.
Here is the code
In PBO
loop at itab with control tc.
endloop.
module disable_row. " This must be next to the loop at statement
in program.
module disable_row.
describe table itab lines tc-lines.
if tc-lines = 0.
loop at screen.
if screen-group1 = 'GRP'. " For all the Columns of TC create a Group1 with GRP
screen-input = 0.
modify screen.
ENDIF.
endloop. " Take care of inserting a row after this
endif. " I have checked this and working fine
endmodule.
Assign group name 'GRP' to all fields that need to be grayed out.
Hope this helps.
Best regards,
swanand
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |