Skip to Content
avatar image
Former Member

Create smartform in runtime


I've build a program that my customer can use to add data to a smartform ( not really a smartform, but it collects the data and in the end it must show a smartform ).

When all data has been collected I want to create a SMARTFORM from this data. So every time somebody creates a new document a smartform must be made.

The program to call the smartform dynamicly and shows it to the customer is also ready.

is there a FM, or someting else to create a smartform?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 29, 2008 at 10:38 AM

    call this fm SSF_FUNCTION_MODULE_NAME it will return ur smartform fm then call that with the data entered and display ur smartform accordingly.

    data: l_v_fm_name type rs38l_fnam.

    call function 'SSF_FUNCTION_MODULE_NAME'


    formname = tnapr-sform


    fm_name = l_v_fm_name.


    call function l_v_fm_name

    go thru this material for getting basics of smartforms.


    Edited by: kartik tarla on Dec 29, 2008 4:09 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 29, 2008 at 10:43 AM

    Thanks for the quick reply, but that was not my question, because i've got no smartform.

    I've got all the data to CREATE the smartform, and i want to know if there is a quick way to create a smartform with only one box. (main box)

    All that in runtime.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      > I've designed the smartform. (empty one with only one window).


      > Now i want to update it with a couple of changes like interface (correct import and export parameters) and a couple of others things.


      > I've created a lot of dynamic programs and even a couple of dynamic FM and Classes, but never a smartform.


      > Still i think it's all just coding and there must be a way to change the coding in runtime.


      > Who will help me please?


      First you should have a smartform...which you have now. Then, you have to declare internal tables in the Form Interface of the smartform.... Only then data from the program can be sent to the smartform.

      Now, for example itab contains data you want to print in smartform. then in form interface, declare an table same that of the itab in program.

      Now, when you call the smartform generated function module, it will also contain the table declared in the tables tab in form interface like this:

      call function .....
      itab1 = itab " here you have to give the itab of the program which contains the data you want to print in smartform

      Now, in the have to create text elements or tables based on the requirement to print itab1 fields. Here in the text elements you have to give the itab1 details.

      Hope you got some idea now.


  • avatar image
    Former Member
    Dec 29, 2008 at 09:01 PM

    Hello Kim,

    As you said you have created run time objects but forms are alike of them. FORMs have graphical interface for design. Having output created instead of SmartForms other methods can be selected like simple report. This will avoid creation and maintenance of FORMs where as in reports few lines of code can change output.

    Its a just second thought, we will assist you further on your SmartForms query.

    Thank you,


    Add comment
    10|10000 characters needed characters exceeded