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: 

Logic for page break for every unique material/batch/serial no. combination

Former Member
0 Kudos

Hi,

my requirement is a separate page should be created for unique material/ batch/ serial no. and header data nad page number should repeatat top of every page.

Please provide the logic to implement this senario in report.

Thanks,

8 REPLIES 8

sujeet2918
Active Contributor
0 Kudos

Hi,

Loop at your material no and write your form within the loop.

regards,

Sujeet

0 Kudos

Hi Sujeet,

Can you please elaborate the logic into code?

0 Kudos

Hello,

can you tell me first how you are displaying the data? through Smartforms or Sapscript ?

Regards,

Sujeet

0 Kudos

Hi,

Use the below logic

loop at into <wa>.

At new matnr.

NEW-PAGE.

ENDAT.

ENDLOOP.

Regards,

Surendar Reddy.

0 Kudos

its report output

0 Kudos

Hi Surendra Reddy,

Thanks for yourt input but i am looking for page break for every unique Material/Batch/ Serial No. combination. means any of the three amoung thses theree get change the page break will happen. and bcan u tell me how to get pane no. and header also in each page.

0 Kudos

if you are not aware of AT NEW / AT END control break statement usage, then do read the Documentation.

Former Member
0 Kudos

Hi ,

proceed this way......

TOP-OF-PAGE.

WRITE: 'TOP-OF-PAGE', sy-pagno.

-


display header data------

START-OF-SELECTION.

loop at itab.

at new matnr.

NEW-PAGE.

endat.

-


display itab data----


endloop.

The columns to the left of <column name> are also considered by the u2018At Newu2019 condition.

In the structure of itab take batch/serial no. to the left of Material No.

Regards