cancel
Showing results for 
Search instead for 
Did you mean: 

Create smartform in runtime

Former Member
0 Kudos

Hi,

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?

thanx

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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,

Nishikant.

Former Member
0 Kudos

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.

Former Member
0 Kudos

I think u cant design a smartform.

U have to design a smartform before hand .

all that u can do at runtime is to pass data to ur smartform thru the above mentioned fm calls and display them.

кu03B1ятu03B9к

Former Member
0 Kudos

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?

Former Member
0 Kudos

>

> 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?

Kim,

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 .....

tables
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 smartform...you 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.

Vishwa.

Former Member
0 Kudos

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'

exporting

formname = tnapr-sform

importing

fm_name = l_v_fm_name.

now

call function l_v_fm_name

go thru this material for getting basics of smartforms.

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf

кu03B1ятu03B9к

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