on 05-04-2011 10:40 AM
Hello all abapers,
I have made a packing material defects smartform. My question to all is can we fix the number of table rows? Because the client requirement is that he wants the number of rows to be fixed i.e. around 30 rows irrespective of the data. For example, if the data contains in 4 rows, then the remaining empty 26 rows should also be displayed. Any solution for this?
Thanks in advance,
Satvik
Hi,
Fix the size of the main window to display 30 lines. Now based on the data's available in the internal table used to print the main window, fill the internal table with blank lines for remaining number of columns.
Eg : is 4 records are available in the internal table, then append extra 26 blank lines also into the internal table and check.
If this is not working, then try to put a column as sr no in the internal table and then fill the sl no column for the rest 26 lines and append it into the internal table.
Regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello friends,
I have tried one code to solve my problem.
Suppose I want 13 fixed columns. I have managed to get empty columns at the end of table.
describe TABLE itab LINES lin.
*IF lin < 13.
*DO 3 TIMES.
*INSERT INITIAL LINE INTO TABLE itab.
*ENDDO.
*ENDIF.
So this will insert 3 empty lines in the table at the end.
But the data in the table willl be dynamic. So the lines for data will not be fixed. It can be any
number of lines upto 13. So what extra code should I add so that I get fixed 13 lines irrespective of
the data.
Thanks and Regards,
Satvik.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satvik,
Just create a secondary window with same size as that of main window. Inside that secondary window create a template whose height should be equal to main window height and rows & columns should be 1 (u need to create only 1 cell template)
Now remove all the borders from main window and set the frames & borders for the template of secondary window.
Do as stated and you can resolve the issue.
Do appreciate if found helpful.
BR,
Vinit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Satvik,
You can use template which has fixed number of rows unlike table which is dynamic.
Template will your requirement for displaying empty rows when there is no data.
Hope this helps.
Regards,
Abhijeet Kapgate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what about deleting records over 30 from your itab or, make dummy records for below 30?
I know thats a bit unusual but it may help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Count the table lines of data using describe table
and take the empty line with the same line type
below the data line ie at footer odf the table andsubtract the variable from
30 and by looping that many times you can print at footer level
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.