cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms

Former Member
0 Kudos

Hi,

In my smartform i have 5 secondary windows having different fields to be print.How to print more than one form(pages).How to do looping under windows.Anybody can give the detailed description.

Accepted Solutions (1)

Accepted Solutions (1)

marius_greeff
Active Participant
0 Kudos

Hi, To go to a new page you will need to have a main window and under it you need to create a command by right clicking - create - command. There you can specify a new page. You can only do this in a main window. Best would be to change one of the other windows and add the text to print into a table loop, it sounds like you are already doing this.

Regards,

Marius

Answers (2)

Answers (2)

Former Member
0 Kudos

hi srinivas,

if u want to print the same data in all the pages... then u can use the LOOP.. in this node-->u have to give the TABLE NAME and WORK AREA... AND print the workarea-filedname in u r window... but in this way u have ensure that the window size is enough to print tha data in the itab.. if data exceeds then the will not be printed in the winodow.... ad jayanthi and above post said it works but probably u r not giving loop into WorkARea.. check this once.

If u want to print the different data in each page... then use COPIES WInDOW to achive this... by checking SFSY-COPYCOUNT.

Former Member
0 Kudos

Hi Naresh,

As u said only i declared in my form.Actually what iam doing is

from se 38 iam getting the data in one internal table.In smartform i have declared that internal table and i creaqted one wa for that .In main window i taken loop and written like itab into w_itab under this loop i written text and corresponding field with wa-field. iam printing.

in form i have 5 diff sub window under one page.my requirement is i have to print the total windows data(records related to one person in one page) like if give 10 pernr's it is going to genetare 10 forms of that each pernr.

this looping can be do in each window or in main window.if i give in each the form what i designed is not printing just empty page is printing.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Before the loop,just create a program line and write break-point.

In debugging mode,when it reached break-point,check the internal table is getting all the values from the program.

Former Member
0 Kudos

hi,

i have under stood u requirement as follows,.. u have 1 IT_TAB1 with records, for example 5 persons... with 2 records each... now u have to print 5 pages.. eace page contails 2 records whitvh elongs to purticular person.

If the above is u rrequirement... u can do in the following 2 ways..

<b>Solution1:</b> 1. in the print program loop the IT_TAB1 with total info.. now

1.sort the IT_TAB1 by person

loop the table IT_TAB1 into WA_ITAB1 ...then appent the record to IT_TAB2... then

at End of WA_ITAB-person.

call the smart form with IT_TAB2.

endat.

clear the table IT_TAB2.

endloop.

here wht i mean to say is call the smart form multiple times.. for every person.

<b>Solutution2:</b>

in this way.. call the smartform only once.. but controle the printing in smartform.. in this way it difficult to handle this because u have 5-6 varailble window.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Right click the window->Create ->Flow logic->Loop.

Former Member
0 Kudos

I selected Right click the window->Create ->Flow logic->Loop like this only.

After that in loop i created one text and i written what are the fields iam going to print but its not printing anything its giving blank in that area.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Don't type the fields in text element.Instead of that,drag and drop from field list icon.Press ctrlshiftf4 to view the field list.

Kindly reward points by clicking the star on the left of reply,if it helps.