tags:

views:

1250

answers:

1

I would like to print the records in a new page every time the contract number changes. What is the syntax for new page in the SAP SCRIPT.

Kindly let me know if you know how to achieve this.

+1  A: 

Inside of SAPSCRIPT (Transaction SE71) use the control command NEW-PAGE. (Control Commands are identified by typing /: in the format column).

Inside the Print Program (Transaction SE38) use Function Module CONTROL_FORM to call the command NEW-PAGE:

CALL FUNCTION 'CONTROL_FORM'
  EXPORTING
      COMMAND   = 'NEW-PAGE'
  EXCEPTIONS
      UNOPENED  = 1
      UNSTARTED = 2
      OTHERS    = 3.

You only need to use one of these options, depending on where you will determine if a page-break is needed.

Esti