cancel
Showing results for 
Search instead for 
Did you mean: 

New page in smartforms

0 Kudos

Hi,

I have created smartform and I want to display the records on new page only when the purchase order number change.

Thanks

Vijay

Accepted Solutions (0)

Answers (4)

Answers (4)

RoySayak
Active Participant
0 Kudos

Hi Suhas,

I think i'll work as per your requirement...

>>

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command = 'PROTECT'.

Call function 'WRITE_FORM'

exporting

window = 'MAIN'

element = 'ITEM_LINE'

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

command = 'ENDPROTECT'.

*******************************************************************************reward points if it is useful************

Thanks,

SAYAK

Former Member
0 Kudos

Hi there,

Try the following it should work.

LOOP AT ITAB2.

ON CHANGE OF <purchase order number>.

CALL FUNCTION 'CONTROL_FORM'

EXPORTING

COMMAND = 'NEW-PAGE'.

ENDON.

Former Member
0 Kudos

Hi,

At the end of the footer insert a command line, in that just say check the option go to new page.

as your table will have records for purchase orders, after the end of every loop you need to go to a new page so the above solution works..

Check it out..

Regards,

Narendra.

0 Kudos

Hi

I have created a smartform for confirmation entries in that i want to display the records on new page when production order number change.

I gave two selection criteria one is production order number and another is posting date.

I inserted a command line below footer so it will works fine if i give selection base on production order number. but it

give error "page break is allowed only in the main window" if i give the selection base on posting date.

Thanks

Vijay

Former Member
0 Kudos

Hi Vijay,

For this command you needn't give anything, say your itab has fld1, fld2 and fld3.

And for every new fld1 you need to go to a new page right.

So for this just add this command line with go to a new page or which ever page you have in your SF checked. It should be fine.

The error what you are facing may not be because of this, please recheck the other things as well.

I did not understand what you meant by 2 selection criteria, u must be doin this in your driver program right, or in the program lines in the SF itself, but this shouldnt have any effect on the command line.

Regards,

Narendra.

Former Member
0 Kudos

in smartforms,

at new of purchase order

u can say trigger new page.

Madhavi