cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Forms---reg

Former Member
0 Kudos

Hi Gurus,

My requirement is in SAP SmartForms, in the final internal table of Sf, I am having about 100 records, I have to display only 10 records for a page in SF, how can I achive this.

Thanks and Regards,

NHX.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

You can declare a counter variable in global definitions.

Under the loop node... create program lines and increment the counter variable by 1.

create alternate node under the loop below the program lines

check for the field condition

countervariable <= 10

then write the data text elements under true condition.

Under false... create command node for next page command.

But you cannot trigger a new page using table node...

you need to make sure that your internal table you are displaying consists of current 10 records that are displayed.

for that....

create another internal table of same structure of final table

loop the final internal table... under the loop create program lines where write the code for moving 10 records of the final internal table into the table to be displayed and delete these copied records from your final table.

any queries revert back

regards

padma

Former Member
0 Kudos

Hi,

Take a counter variable, Declare it in Global Definition.

Now In the Main window After loop Write Program lines.

In the Program Lines write.

counter = counter + 1.

Before program Lines node Create a command node.

In the Comman node Condition tab put the condition.

Counter = 10 or the number lines you want ot print.

And in the General attributes check the Go to new page checkbox.Give the Page no of the first page.

it will trigger new page after displaying 10 records per page.

Regards,

Sujit

Former Member
0 Kudos

loop the internal table and increase the counter by 1 for each item but this will increase the line item but you can't display exactlly 10 item per page because the line items are not in our hand

Former Member
0 Kudos

Hi

Forcing a page break within table loop:

Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.