Application Development and Automation 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: 
Read only

Select Pass Options

Former Member
0 Likes
533

data: v_form_name type rs381_fnam.

call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname                 = 'zsfexample'
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
* IMPORTING
    FM_NAME                  = v_form_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.

I was trying to practice how to use subroutines in smartforms and how to pass select option from a program to smartform. I was experiencing error in abap code in se38

getting error rs381_fname is unknown

4 REPLIES 4
Read only

alejandro_bindi
Active Contributor
0 Likes
488

Try passing formname in capital letters:


formname                 = 'ZSFEXAMPLE'

Read only

Former Member
0 Likes
488

TRY IN CAPS

data: v_form_name type rs381_fnam.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = 'ZSFEXAMPLE'

  • VARIANT = ' '

  • DIRECT_CALL = ' '

  • IMPORTING

FM_NAME = v_form_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.

REGARDS

SHIBA DUTTA

Read only

Former Member
0 Likes
488

Hi,

Try passing the Smart form name in capital letters..


call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname                 = 'ZSFEXAMPLE'    " Changed here

Also for passing select-options to the Function module..

you have to create a table type in SE11 or use an existing table type

Check this link of how to create a table type

http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm

Thanks,

Naren

Read only

Former Member
0 Likes
488

See the SAP Sample Program and Form name..

It is very simple program and form name.

Program : SF_EXAMPLE_01

Form Name : SF_EXAMPLE_01.

do not pass the small letter to smart form function module