Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the Rows Fixed in a Table in Smartforms?

Former Member
0 Kudos

Hi,

I am new to smartforms. This one particular Smartform has a Table defined in the Main Window. In the “Data Tab” of the Table under the “Loop” heading an internal table is used to pass information to the Table. There is no Loop defined. Only the Table is defined in the Main Window. The funny part is when the SamrtForm is run 15 rows get displayed. The program that populates the SmartForm always sends 15 rows to the SmartForm. I tried to send the actual number of rows, then nothing gets displayed in the SmartForm. It seems that some where in the SmartForm the 15 rows is doing some spooky things. How to solve this?

Thanks,

Kishan

1 ACCEPTED SOLUTION

former_member221770
Contributor
0 Kudos

Kishan,

The TABLE node in SmartForms automatically loops through the table specified inthe "Data" tab. The data passed through the TABLES paramater are defined with reference to Table Types. They have no header line. So in the "Data" tab, you must also define a work area for the TABLE node to loop into.

That is why in the "Data" tab, you see in the Loop section, a INTO (or ASSIGNING) operand. You need to pass the record into a work area. When you are displaying the data, just like in a normal ABAP program, you use the work area.

Not sure what you mean by "I tried to send the actual number of rows, then nothing gets displayed in the SmartForm".

Hope this helps.

Cheers,

Pat.

6 REPLIES 6

former_member221770
Contributor
0 Kudos

Kishan,

The TABLE node in SmartForms automatically loops through the table specified inthe "Data" tab. The data passed through the TABLES paramater are defined with reference to Table Types. They have no header line. So in the "Data" tab, you must also define a work area for the TABLE node to loop into.

That is why in the "Data" tab, you see in the Loop section, a INTO (or ASSIGNING) operand. You need to pass the record into a work area. When you are displaying the data, just like in a normal ABAP program, you use the work area.

Not sure what you mean by "I tried to send the actual number of rows, then nothing gets displayed in the SmartForm".

Hope this helps.

Cheers,

Pat.

0 Kudos

Thank U your points awarded

Sorry to confuse U all. My problem is I need to maintain 15 rows fixed in the table of the main window. But the "Internal Table" may have 5 records. Yet 15 rows should appear in the Main Windows Table. U may suggest to add rest of the 10 rows to the internal table, but this is not the answer I want, is there a alternative.

Thanks,

Kishan

0 Kudos

Hi,

if you want 15 rows statically, you can go for template,

Table is for Dynamic and Template is used for Static table.

Cheers,

Sasi

Former Member
0 Kudos

Main window has kind of dynamic printing. Depending on the number of entries passed in internal table it will print on one page . If data does not fit on one page it will goto next page. You donot need to specify 15 rows.

Just adjust the height of main window to accomodate 15 rows. Later when you pass 5 rows only , only 5 rows will be printed and rest 10 rows will be blank . You dont need to explicitly pass blank rows in itab.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check this link.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

In this, I am giving examples to use Template,Table.

It can help you.Kindly reward points if it is useful.For calrifications,get back.

0 Kudos

Thank U All.

Your Points Awarded and sorry for the Delay.