Skip to Content
author's profile photo Former Member
Former Member

Multiple smart form outputs

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 05:16 PM

    Any Thoughts

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Posted on Sep 12, 2007 at 06:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.