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

Calling the function module in smartforms

Former Member
0 Likes
1,476

Hi,

i have called the ssf function module in smart forms. how to call the another function module which is having the function module

Thnks

Saravana

3 REPLIES 3
Read only

Former Member
0 Likes
555

Plz elabarate

Read only

rahulkavuri
Active Contributor
0 Likes
555

hi I got ur point, write it manually instead of calling function module

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = form_name

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

FM_NAME = fm_name

  • EXCEPTIONS

  • NO_FORM = 1

  • NO_FUNCTION_MODULE = 2

  • OTHERS = 3

.

CALL FUNCTION fm_name

EXPORTING

var1 = var1

tables

zitab = zitab.

IMPORTING

var2 = var2

dont forget to award points if found helpful

Read only

RaymondGiuseppi
Active Contributor
0 Likes
555

After calling ssf function module, call the function module returned by ssf function module with your parareters and tables defined in smartforms interface.

When you write your program, use model and the generated name then change =the name of the FM by the variable returned by ssf function module .

Look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf">SAP Smart Forms (BC-SRV-SCR)</a>

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
 EXPORTING
  FORMNAME = '<form name>'
 IMPORTING
  FM_NAME = fm_name
  EXCEPTIONS
  NO_FORM = 1
  NO_FUNCTION_MODULE = 2
  OTHERS = 3.
IF SY-SUBRC <> 0.
<error handling>
ENDIF.

CALL FUNCTION fm_name
 EXPORTING
*  ARCHIVE_INDEX =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
  G_CARRID = <variable>
  G_CONNID = <variable>
  G_FLDATE = <variable>
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
 TABLES
  GT_SBOOK = <internal table>
 EXCEPTIONS
  FORMATTING_ERROR = 1
  INTERNAL_ERROR = 2
  SEND_ERROR = 3
  USER_CANCELED = 4
  OTHERS = 5.
IF SY-SUBRC <> 0.
<error handling>
ENDIF.

Regards