cancel
Showing results for 
Search instead for 
Did you mean: 

printing a smartform page multiple times for multiple vendors

Himayatullah
Active Participant
0 Kudos

Hi ,

I am a newbie to ABAP and the requirement is like this :

I have a smartform with a single page which shows details for a single vendor. Say suppose I have multiple vendors(through select option) as input from the user,then the output should show smartforms one after the other for all the vendors.

Say for example,

vendors are 100,200,300.

Then the output should have three pages one for vendor 100 and second for 200 and third for 300 .Each showing details of that particular vendor.

Thanks in advance.

Regards

Himayat

View Entire Topic
anusurbab
Explorer
0 Kudos

Hi,

In your smartform, Create an variable under table section at form interface to hold vendor details.

Create a loop control / template in your main window to display the vendor information.

This way you can output all the vendor information passed to smartform.

Himayatullah
Active Participant
0 Kudos

I have tried to do it ths way....

created and populated two inteenal tables it_lfa1 and it_adrc.Passed these internal tables to smartform(Two internal tables are created here under form interface-tables tab)....but still am not getting desired output.....

kidnly help in resolving this issue..

Former Member
0 Kudos

HI

Here is a sample way to call to print multiple vendors...

U got all ur Invoice info in IT_Table

Loop at It_table to wa_table.

call SSF.

Call Fun here in this pass the wa_table into the Smartform for this create Structure similar to ur Internal table.

MOVE-CORRESPONDING wa_table TO wa_table1.

CALL FUNCTION fm_name

EXPORTING

control_parameters = wa_ctrlop

output_options = wa_outopt

user_settings = space

wa_table = wa_table1 wa_table will be a structure. and pass ur Internal table to

IMPORTING......

and do the remaining coding in the smartform global defination initialization whatever etc u need.

clear wa_table..

enloop. ---> this loop call based on ur # of entries or the vendors ...and its corresponding SSF

Surya

Himayatullah
Active Participant
0 Kudos

Hi Surya,

Thanks a lot for ur reply.

In ur reply, " Call Fun here in this pass the wa_table into the Smartform for this create Structure similar to ur Internal table."

what this function is ...will u please elaborate on this??

Former Member
0 Kudos

Hi

Call Fun ((is the Function Module Generated by Smartform)

Create a STRUCTURE similar to ur Internal table so that when u Loop INTERNAL table to WORKAREA , u have to pass ur WorkAREA to the STRUCTURE in the Function module of the smartform. so that ur workarea information is passed to the structure of the Smartform and u can do u further processing with the information in the structure and print ur invoice as requried .

and after the smartform is printed clear the workarea and so on the next one will be called ..

surya