Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SMARTFORMS

Former Member
0 Kudos

Hi,

How to use Function Module in Smartforms.

9 REPLIES 9

Former Member
0 Kudos

Hi,

Can u elaborate ur question.

The Function Modules can be used in the driver program associated with the SmartForms.

Also, when SmartFoem is activated, it creates a unique Function Module which is then used to print the data on the Form.

This Function is called in the corresponding Program associated with SmartForm.

Regards,

Himanshu

Former Member
0 Kudos

hi anil

in smartforms

first made a window

than right click on window

and create flow logic with program lines

than we will get editor in editor click on blue icon available at left side

just click it and write ur FM name

regards

taran

former_member632991
Active Contributor
0 Kudos

Hi,

Go to that window -> right click on window-> create flow logic -> and call the required FM in that editor.

Regards,

Sonika

former_member181962
Active Contributor
0 Kudos

When you create the smartform layout and activate it, a Function module will be generated.

The name of the Function module can be obtained from the smartforms transacttion itself.

Chose from menu Environment->Function Module name.

You can call that smartform function module in your driver program.

YOu can use the FM SSF_FUNCTION_MODULE_NAME to get the name of the Smartform function module. See the sample programs to know how to call the smartform in the driver program

SF_EXAMPLE_01

SF_EXAMPLE_02

SF_EXAMPLE_03

Regards,

Ravi

Former Member
0 Kudos

Hi Anil,

You can use the function module in the <b>initialization</b> tab of the <b>"global definitions"</b>, where u can add the code u want.

Even u can add codes to the cell u create.

1. Right click on the cell, select "create" -> "flow logic"->"program lines".

So u can add the code u require.

Regards,

Thasneem

Former Member
0 Kudos

Hi anil,

CALL FUNCTION '/1BCDWB/SF00000208'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = WA_CTRLOP

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = WA_OUTOPT

USER_SETTINGS = 'X'

MYDATE = P_DATE

REASON = P_REA

IMPORTING

  • DOCUMENT_OUTPUT_INFO =

JOB_OUTPUT_INFO = T_OTFDATA

  • JOB_OUTPUT_OPTIONS =

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

'/1BCDWB/SF00000208' is the FM generated from smartform activation.

Hope this helps you, reply for queries, Shall post you the updates.

Regards.

Kumar

Former Member
0 Kudos

Hi,

U call FM 'SSF_FUNCTION_MODULE_NAME' in SE38 and to pass the name of the Smartform name to this FM.U can get the data.

reward if helpful.

regards

Vana

Former Member
0 Kudos

hi anil,

in smartform we cannot use the name of the FM generated by our smartform bcoz when we transport this forms there the name of the FM may change in the new system so first we have to declare some variabl like RS38L_FNAM

data fmname type RS38L_FNAM.

then use this variable in our FM SSF_FUNCTION_MODULE_NAME so that when it return we will get the name of the FM generated by our smartform so need to wory abt the name of FM getting changeed everytime ... after that call the FM

CALL FUNCTION '/1BCDWB/SF00000208'

now replace this '/1BCDWB/SF00000208' with <b>fmname</b> so that we dont have to change the name everytime when we export this in smartform no need to hardcode the FM name....

if this info is helpful reward

ravi