cancel
Showing results for 
Search instead for 
Did you mean: 

One line item per page --- Urgent

Former Member
0 Kudos

Hello,

I am printing an order. But while printing an order I have

a header

main

a footer.

In main I have to print line items. Now while printing line items , my requirement is print ONLY ONE LINE ITEM PER PAGE.

For every page header and footer should repeat.

I am trying with AT NEW command but it is giving error. I am using table to loop on item data table.

Please tell me urgently how to do it.

Thanks,

Madhura

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Assuming your Header and Footer are either in separate windows

or in the Table Header/Footer (smartform)

If you are using scripts

After printng the line item

call function 'CONTROL_FORM'

EXPORTING

command = 'NEW-PAGE'

EXCEPTIONS

unopened = 1

unstarted = 2

others = 3.

If you are using smartforms.

Insert Command Node after printing line item

set Go to Page Pagename

Former Member
0 Kudos

Hi,

I have seperate windows for header and footer. And I can not change the form.

So where do I have to exactly put command node to call new page.

Thanks,

Madhura

Former Member
0 Kudos

If you cannot change the form i hope youre not using smartforms

because a Command Node has to be insterted inside the Form

If youre usiong an SAP script

then insert the CONTROL_FORM call soon after you call the item line element in your

driver program

Former Member
0 Kudos

Hi,

I am using smartform only. I can change form. Where do I exactly have to put command node because Header and footer are in variable windows.

Main window has table to print line items.

Madhura

Former Member
0 Kudos

It doesnt matter about header and footer windows

Place the command node soon after the text elemts of your line items.

You will face one issue.

That the last page will come blank.

if you dont like this, you will have to count the number of items in the itab

then use a counter inside the loop counting each iteration

You will have to put a condtion on the command node

if the counter < itab length

first try the smiple command node

Former Member
0 Kudos

Hi,

It is giving this error: No explicit page break possible in tables.

Any other solution.

Madhura

Former Member
0 Kudos

Hi,

If you want to continue using the table this is what you can do.

Im assuming u only use the table for printing line items

So

Create a loop above the table

Place the table inside the loop.

Uncheck the internal table check box inside the tables Data tab

and copy that looping information into the loop.

After the table, and inside the loop ..place the command node.

Also place whatever data in ther main section of the Table now in the header of the table

Edited by: Nehal Fonseca on Apr 23, 2008 6:35 PM

Edited by: Nehal Fonseca on Apr 23, 2008 6:36 PM

Former Member
0 Kudos

Solved problem by using loop and template.

Thank you for help.

Former Member
0 Kudos

Hi,

First create a LOOP in main window. There you have to use your internal table. Inside the loop use a program lines and move only one record to another internal table. after that program lines use that internal table in TABLE. after table use a COMMAND node to call NEW-PAGE.

Hope this help.

Pranav.