cancel
Showing results for 
Search instead for 
Did you mean: 

Printing multiple pages in Smartform using secondary windows & main window

Former Member
0 Kudos

Hi Experts,

In the driver program, I have created an internal table which will contain all the deta regarding customers. I.e., from BSID Table(Accounting Details). I am using select Options for customers and got all the data into IT_CUST.

Now My requirement is to print Customer Address and code on the Header level and Account details in the Main Table.

I have used Secondary windows for Customer address and code and main window for Account details. But I am not able to print all the customer details in different pages.

Can any body help me to print secondary window and main windows in different pages along with some hard coded data under the each page along with logo.

Thank you

Regards

Praveen

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Praveen,

Just try to use table in your main window, and the overflow account items will flow to next page automatically. This is the speciality of smartform(table).

I hope by this info you will be able to resolve your issue & close the thread.

BR,

Vinit

Former Member
0 Kudos

Hi,

My question is different.

Former Member
0 Kudos

Hi Praveen,

Instead of creating secondary window for address and code,you can follow the below approach.

Create a Main window. Inside main window create table. There will be three nodes Header, Main Area, Footer.

You can create a loop on your internal table IT_CUST into WA_CUST.

In the header, you can create table line ,and display the address &WA_CUST-ADD&.

Similarly, In main area,you can display the desired data.

Before loop ends, you can give a command go to new page, and point it to the same page by giving the particular page number.

In this way,you can print information for every customer on different pages.

Regards,

Megha

brad_bohn
Active Contributor
0 Kudos

@Megha.K: Not a very good (hack) solution.

@Poster: Smartforms easily handles this with main and secondary windows. You can easily create complicated layouts. You really haven't explained why your existing design doesn't work or what's difficult about what you're trying to achieve. Be more specific.

Former Member
0 Kudos

Hi Brad,

You are correct. Smart forms are more flexible when you know about it. I have achieved my requirement.

This is the below procedure I followed:

1. Created one Page. Header details are maintained in secondary window.

2. All the Customer Details and related account data is maintained at Main Window(two in different Internal Tables).

3. I am looping all the customer details(IT1), under the loop, a Table is created for account data(IT2 with loop based on Customer No of IT1).

4. Printing Table and Templates and added command window so that it will go to next page for next customer.

Logic to avoid New Blank Page at end.

Global Definitions: Described IT1 into N. & x = 0.

Before command window maintain Code window with following

x = x + 1.

In command window, under conditons tab X < N.

I think it is clear for user who seeks this requirement.