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: 

smart forms

Former Member
0 Kudos

When iam designing smart forms it activating properlyy then we get one functional module namee i.e sf00000111 somthing.

then how i will get namee of that FM to pass in se38?

plese tellme ans?

9 REPLIES 9

Former Member
0 Kudos

Hi Amarendar,

the function module name that is returned is what should be used by you.

Award Points if this was helpful.

Kiran

amit_khare
Active Contributor
0 Kudos

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = P_FORM

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = V_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 V_NAME "'/1BCDWB/SF00000366'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

S_MATNO = I_TAB-MATNO

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

I_TAB = I_TAB

I_TABLE = I_TABLE

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

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos

 CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

      formname                 =  0.

Endif.

The fmname will be obtained when u just run the smart form....

it will be something like this '/1BCDWB/SF00000366'

regards,

Raksha SR

Message was edited by:

Raksha SR

0 Kudos

when you maintain smartform properly,then activate it and then execute it.A number is shown there,copy that number and use it in a report program mentaining data definitions,and then open PATTERN and paste thet number in that call function area.

OR...........

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = <Smart Form Name>

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3

.

IF sy-subrc <> 0.

ENDIF.

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS = ls_control_para

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

output_options = ls_ssfcompop

user_settings = ''

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

it_header_det = it_header_det (Pararmeter to be passed depending upon ur req)

lt_item_det = it_line_item

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5 .

If SY-SUBRC <> 0.

Endif.

IF helpful Points expected.

Former Member
0 Kudos

Hi,

u can use 'SSF_FUNCTION_MODULE_NAME' to get the Function module generated by smartform dynamically.

or u can directly use the function module which has been generated from the samrtforms...

F8 the samrtform it will give u the function module name and can use ibn ur SE38 code.

Former Member
0 Kudos

HI

refer this .

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = <Smart Form Name>

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3

.

IF sy-subrc <> 0.

ENDIF.

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS = ls_control_para

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

output_options = ls_ssfcompop

user_settings = ''

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

TABLES

it_header_det = it_header_det (Pararmeter to be passed depending upon ur req)

lt_item_det = it_line_item

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5 .

If SY-SUBRC <> 0.

Endif.

Reward all helpfull answers.

Regards.

Jay

former_member375669
Participant
0 Kudos

hi amareder,

when u activate u'r smartform, just go to the environment menu select the function modeule name it will give u name of function module name which is used to pass in the se38..

reward if usefull.

buy

Former Member
0 Kudos

Hi Amar,

After activating properly U will be getting the Function Module name as "/1BCDWB/SF00000063".

In SE38, provide all the code for smartform to get the o/p.

Then click on Pattern button to call the specified funtion module.

        • RS38L_FNAM - Name of Function Module *****

DATA : FM_NAME TYPE RS38L_FNAM.

CALL FUNCTION<b> 'SSF_FUNCTION_MODULE_NAME'</b>

      • where the smartform name must be provided ***

EXPORTING

FORMNAME = 'ZK_SFORM_ME51'

IMPORTING

FM_NAME = FM_NAME

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

then again press Pattern buton to provide the internal table names used & the control parameters .The generated name is replaced with FM_NAME, which must be declared in Data Declaration part.

By clicking the Pattern, U have to give the auto generated FM name, to get the below function:-

CALL FUNCTION FM_NAME

EXPORTING

CONTROL_PARAMETERS = CONTROL_PARAMETERS

OUTPUT_OPTIONS = OUTPUT_OPTIONS

BANFN = BANFN

TABLES

IT_HDR = IT_HDR

IT_DET = IT_DET

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.

Regards,

kavitha.

<b>Reward points if useful.</b>

Former Member
0 Kudos

hi when u activate the smart form ull get a functional module.

go to se38 ur driver program click on pattern button paste the functional module and click ok. the code for that functional module will be pasted in ur progarm.

now remove that hard coded functional module from ur program and use one variable in place of that bcause the functional module changes always when u activate the smart form.

regards,

siri.