cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic new page in smartform

Former Member
0 Kudos

Hi,

I have a requirement, wherein i need to trigger new page, if number items exceeds 10.

more than 10 items should not be displyed in one page.

Please let me know how to proceed this

Thanks&Regards

Rama Devi

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Rama Devi,

Create the loop in the main window after that create the program lines for the records to be printed per page.

Regards,

Sravanthi

Former Member
0 Kudos

HI,

I tried all the options,but nothig is working.

please give me an idea

Former Member
0 Kudos

Hi ,

store the tabix value into flag in the main area of the table .

check

if flag = 10.

goto next page .

Former Member
0 Kudos

HI, I have tried.

it is not working

please tell me how to proceed with this

Former Member
0 Kudos

hi,

Declare a counter variable for number of records to be printed and increment it inside the loop using program lines node.

In your main window... under table / loop node create an alternate node.

In the conditions tab mention the counter variable and the comparision value as 10 in your case.

relationship will be <=

under the true node... display the data of the internal table using table ( table node under true node ).

under the false node... use command node for triggering page break and also use programlines node to initialize the counter variable.

regards

padma

Former Member
0 Kudos

Hi Padma,

could you please elaborate it with screen shots, if possible

Thanks

RamaDevi

Former Member
0 Kudos

Hi,

go through this wiki and you got the problem solved.

[Page break in smart forms|https://wiki.sdn.sap.com/wiki/x/dAHDB]

[Page break at a particular number of records|https://wiki.sdn.sap.com/wiki/x/j4EEBQ]

thanks

sarves

Former Member
0 Kudos

Hi,

define a counter variable

then after the print of each item

-increase counter by one

-if counter greater or equal 10

-add a COMMAND in flow-logic (in this you can force a new-page)

-reset the counter

this will do

Gr., Frank

Former Member
0 Kudos

before the main window you have to create the program lines and in progam lines

in your main window loop ,

within this loop create progam lines

if lv_n = 10.

gv_flag = 'X'

clear lv_n.

else.

gv_flag = sapce

endif.

with in loop create COMMAND in command conditions put gv_flag = X.

and in general attributes --GOto new page = NEXT.

naimesh_patel
Active Contributor
0 Kudos

Please use the COMMAND node in the Smartform.

Check this help: http://help.sap.com/saphelp_nw70/helpdata/EN/07/57f78ff5d111d4b65c006094192fe3/frameset.htm

Regards,

Naimesh Patel