cancel
Showing results for 
Search instead for 
Did you mean: 

Printing same smartform with different set of records continuously.

sarbajitm
Contributor
0 Kudos

Hi SDNer,

Suppose a table contain Studet info like the following one:

ID Name Sub1 Sub2 Sub3

1 xxx sb11 sb12 sb13

2 yyy sb21 sb22 sb23

3 zzz sb31 sb32 sb33

Think that the smartform contain only a single page(Suppose smartform of student result).In the Selection screen User can put the range of ID.When User put 1-3 the smartform print 3 pages---1st for the student with id 1,2nd for student with id 2 and 3rd for student with id 3.when user put the input 1-2 the smartform print 2 pages.I need your help to accomplish such a scenario.

Thanks in advance.

Regards,

Sarbajit.

Accepted Solutions (1)

Accepted Solutions (1)

former_member755502
Participant
0 Kudos

Hi,

As per user's selection criteria you need fetch data in your driver program and need to store it in an internal table. The same internal table you need to pass to smartform. to handle your requirement of displaying one student record per page you need to use COMMAND node (with some condition). Using this you can force your smartform for page-break.

I hope this will help you to start and explore further.

Regards,

Sambaran Ray

sarbajitm
Contributor
0 Kudos

Hi Bala/Sambaran,

Sorry because I'm late to reply to your answers and thanks for the knowledge sharing. Can you tell me whether, instead of using the command node/page-break option,can we use FM like OPEN_FORM, CLOSE_FORM, START_FORM,END_FORM?

Looking for your reply.

Regards,

Sarbajit.

Sandra_Rossi
Active Contributor
0 Kudos

OPEN_FORM, etc., are to be used with SAPscripts only.

For calling smart form several times and put everything in the same spool: you use NO_OPEN and NO_CLOSE fields of CONTROL_PARAMETERS parameter. Search SDN for more information.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If in the selection screen range 1-3 is given, Internal table with three records will be passed to Smartforms

Use a command node to insert a dynamic page break within a main window with codition &SFSY-PAGE& NOT EQUAL TO total number of lineitmes in the internal table to go to the next page.

Thanks,

Jeyabalasubramanian.J