cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple smart form outputs

Former Member
0 Kudos

Hi all,

i want to print multiple purchase orders in smart form

i have two windows in smart form layout

header window and main window

in header i need to print few header details

and in main window i need to display correspoinding line items

I need every po to be start in new paper or new form

In driver se 38 program

I_header - contains all header info

i_lineitems - contains all item info ofPO'S

iam confused whether i have to call SSF_FUNCTION_MODULE_NAME

between loop of i_header .

like this

loop at i_header.

PERFORM SMARTFORM_FM.

endloop.

if this right how do you want me to pass the info to smart form

in form interface i would declare a table similar to item

and header info right i need only one row right?

FORM SMARTFORM_FM.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZTEST'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

importing

fm_name = fm_name

exceptions

no_form = 1

no_function_module = 2

others = 3

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

CALL FUNCTION FM_NAME

ENDFORM.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Any Thoughts

messier31
Active Contributor
0 Kudos

Hi,

Yes you will have to call smartform function module inside the loop.

some what like this.

loop at header_itab in workarea say HEAD.

refresh and clear itab_export.

loop at items_itab

append these lines to itab_export which you will pass to smartform

end items_itab

now call smrtform function module

and pass head and table itab_export which you populated above

inside item loop.

endloop.

Hope this makes sense. let me know if need more details.

Enjoy SAP.

Pankaj Singh.

Answers (1)

Answers (1)

former_member196280
Active Contributor
0 Kudos

Inside smartform create command to trigger new page(tick go to new page and specify the new page attributes i.e page name),so, each PO will start on newpage, change you logic of your smartform. It is quite easier then modifying the driver program.

Regards,

SaiRam