cancel
Showing results for 
Search instead for 
Did you mean: 

New page in smartform

former_member182371
Active Contributor
0 Kudos

Hi,

in my smartform i want to display items of a certain material type in a page and when the material type changes i want to display them in a new page. i need a new page each time the matrial type changes.

How can i do this?.

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

Private_Member_17805
Participant
0 Kudos

Main Window.

Loop Node(loop itab --itab containing distinct material types)

Command Line(Condition if sfsy-page ne 1)

This is to prevent the first document from getting printed in a new page.

From next time every new document will be printed in a new page.

Table Node(Loop itab1-itab1 containing all the info of all the materials)

<b>Award Points if found helpful</b>

Answers (2)

Answers (2)

former_member182371
Active Contributor
0 Kudos

Hi,

in smartforms is there a way to do something like?:

LOOP AT ITAB INTO WA_ITAB.

AT NEW MATL_TYPE.

NEW-PAGE

ENDAT.

ENDLOOP.

Best regards.

Former Member
0 Kudos

Hi!

I think its better to use it like this:


LOOP AT ITAB INTO WA_ITAB.
  AT NEW MATL_TYPE.
    CALL FUNCTION 'CONTROL_FORM'
      EXPORTING command = 'NEW-PAGE'.
  ENDAT.
ENDLOOP.

Regards

Tamá

Former Member
0 Kudos

use NEw-page statement when you have new material type,

you can write down the code with in smartform .

Reward Points if it is helpful.

Thanks

Seshu