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: 

Page break in Smartforms for a intern table

Former Member
0 Kudos

Hi,

in a Smartforms I want to separate the pages where I

show the information.

I have this table:

BUKRS BRGEW VOLUM

ES11 3.6 35.5

ES12 2252.8 17571.48

ES12 46200 360360

ES12 8.8 68.64

that's to say, I have to show the information of ES11 in Page 1, and the information of ES12 in Page 2 (obviously, in Main Window).

Does somebody know how to separate the information to show it in different pages ?

Thanks.

8 REPLIES 8

Former Member
0 Kudos

declare a variabel lv_count, lv_new_page

1. Have a table loop on ur itab.

2. write a program lines lv_count = lv_count+1.

this Prog lines has to within the loop in step1.

3. just read table index (lv_count+1) [u r actually reading the next record].

check if the bukrs of the current record and the next record are the same.

If it is not, you know this is the last record for the current bukrs ==> set lv_new_page = 'X'.

4. Condition node.

if lv_new_page = 'X'.

call the control step to issue a new page.

remember that Steps 2-4 should be within the loop of step 1.

I have done this before and it does work.

Pls reward suitable points.

0 Kudos

> 4. Condition node.

> if lv_new_page = 'X'.

> call the control step to issue a new page.

>

> remember that Steps 2-4 should be within the loop of

> step 1.

> I have done this before and it does work.

> Pls reward suitable points.

But, how I go to the next page ? With new-page, or with

a command node ?.

0 Kudos

For New Page, you create a Command Node.

In this, you choose "New Page" check box and give the same page name.

Let me knwo if this works. And reward points too

0 Kudos

I've put this Command node in a code into Main window, but when I execute the Smartforms it puts: "No explicit page break possible in tables."

The diagnosis is: "You tried to explicitly switch to another page, but currently table processing is active. In this case, an explicit page break is not allowed.".

0 Kudos

Hi.

I've been able to separate the information in 2 pages, but

in the page 2, the header titles are repeated 3 times, because there are 3 entries of ES12.

Does somebody know how can the header appear only once ?.

Thanks.

Former Member
0 Kudos

Hi

You can't insert a break-page in node type table or loop, so you should prepare the table before moving the data to the smartforms.

Max

Former Member
0 Kudos

Hi Mario,

in the main area of the internal table, right after displaying your text, create a command there you can trigger a new-page with the <b>GO TO new page</b> command, you can mention the same page name <b>"PAGE1"</b>.

You can try this one.

Hope this solves ur issue. Reward if helpful.

Regards,

Tushar

Former Member
0 Kudos

This we can do using the event condition.

In the loop or table we've sort criteria where we can put the sort condition in this case BURKS.

Now under that "event at the end of sort" create a command and tick the new-page check box.

Regarding that printing in every page we can do it by keeping the detail in header and allow it to print it in every page.