Following a smartform tutorial, but getting the error that SFF_FUNCTION_MODULE_NAME isn’t there.

Hi all,

I’m following this tutorial to try and become familiar with smartforms. I feel like I’ve followed all the steps exactly as describe, but when I execute the driver program for the smartform, I get this error:

“An attempt was made to call function module “SFF_FUNCTION_MODULE_NAME”.
This cannot be found in the library though.”

I don’t think the code is necessary here but I’ll paste it anyway just in case. This is the code for the driver program that should eventually activate the smartform:

 

REPORT Z_XPTRAINING_RDD_DRIVER.

DATA: FM_SFORM TYPE RS38L_FNAM.

TABLES: mara.
* marc, mard, makt.

*DATA: begin of it_mara occurs 0,
* matnr like mara-matnr,
* ersda type mara-ersda,
* ernam type mara-ernam,
* mtart type mara-mtart,
* end of it_mara.

data: it_mara type standard table of mara with header line.
parameters: p_matnr like mara_matnr.

select single matnr ersda ernam mtart from mara into corresponding fields of it_mara
where matnr = p_matnr.

* Now call function: SSF_FUNCTION_MODULE_NAME
* IN FORMNAMEL parameter pass the smartform name.
* FM_NAME: PARAMETER PASS THE FUNCTIONMODULE VARIABLE WHICH IS * declared* over the program.
*
CALL FUNCTION ‘SFF_FUNCTION_MODULE_NAME’
EXPORTING
FORMNAME = ‘ZTEST_RDC’
* VARIANT = ‘ ‘
* DIRECT_CALL = ‘ ‘
IMPORTING
F_NAME = FM_SFORM
* EXCEPTIONS
* NO_FORM = 1
* NO FUNCTION_MODULE = 2
* OTHERS = 3
.

IF SY-SUBRC <> 0.
* * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGN0
* WITH SY_MSGV1 SY_MSGV2 SY_MSGV3 SY_MSGV4.
ENDIF.

CALL FUNCTION FM_SFORM “‘/1BCDWB/SF00000021’
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = ‘X’
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
it_mara1 = it_mara
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

 On the internet I did see some people talking about the function module, but those posts were from 2010. Does the function module just not exist anymore? And if so, does anyone know of a replacement I could use?

Thank you very much in advance!

Scroll to Top