on 12-07-2009 9:37 AM
Hi ABAP Gurus,
I am new in ABAP, and I am creating a Smartform.
I want to create a Smartform with a table with a fixed number of rows 20, and my internal table will have a random number of rows but it does not exceeds 20 rows.
The thing is if I use a table the Smartform automatically sets the number of rows, so this don't work. How can I solve this issue?
I now it can be done on Sapscript, but I am not realy into it.
Thanks in advance.
Hello ,
as per my understanding of your requirement ,U say that your internal table would have more than 20 rows ,However u want to print only 20 rows per page.
Confirm me this is the requirement or are you looking out for something else.
Thanks,
M.Naveen Kumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
You can achieve the solution though coding .
As you say your internal table at any cost would not have more than
20 rows , code the programming logic before passing the internal table for display in table as below:-
1.Describe the internal table to fetch how many data records are there in the internal table as of now.
2.Once you get the count take the difference with 20 then you get the number of rows which are remaining.
3.loop the main internal table and then inside the loop ,perform a do loop number of times which is the difference of 20 .
and append empty records to the main internal table .
In this way you get 20 record internal table,
The code could be something like below:-
if difference is stored in n and n has a value of 12 .
then append 12 empty records to the same table.
Loop at itab into wa_itab.
do n times
clear wa_itab.
append wa_itab to itab
enddo.
if sy-subrc is success then exit.
endloop.
Thanks ,
M.Naveen Kumar
This message was moderated.
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 | |
24 | |
11 | |
9 | |
7 | |
6 | |
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.