cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi Experts,

How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?

I mean, in driver program i called SSF_FUNCTION_MODULE_NAME to get the related FM for my smart form. after that How do I call it(smartform fm) . I tried to call by pressing PATTERN button in Report. but it is showing FM is not exist error.

Call function SSF_FUNCTION_MODULE_NAME

Export

formname = 'zsmartform'

import

fm_name = function_name.

function_name is stored the corresponding smartform fm. then How do i call it to process my smartform?

thanks in advance.

0 Likes
View Entire Topic
former_member196280
Active Contributor

Do it like this...

copy the function module name from Smartform, environment--> function module name

Use pattern and paste the copied function module name.

Now, replace Call function function_name "<b>SSF_FUNCTION_MODULE_NAME</b>

Reward points to all useful answes.

Regards,

SaiRam

Message was edited by:

Sai Ram Reddy Neelapu

Former Member
0 Likes

Hi Sai Ram,

just read my question properly. using ssf_function_module_name . i will get the related fm for my smartform. after that i do i call either manually or automaticalaly.

thanks

former_member188827
Active Contributor
0 Likes

when u get ur fm name u'll have to call that using another call function statement...

let me kno if dere is still any confusion...

RaymondGiuseppi
Active Contributor
0 Likes

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

Sample :

 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

former_member196280
Active Contributor
0 Likes

do call it manually and remove the function module name and replace with the variable where function module name is stored. As told above.

Regards,

SaiRam

Former Member
0 Likes

Hi

Run trx SMARTFORMS and press test icon, here you'll be in SE37, copy the function name and go to your program.

Here press PATTERN and past the function name generated by smartform.

In this way you'll insert in your program the call of the smartform:

CALL FUNCTION '/1BCDWB/SF00000003'
    EXPORTING
*     ARCHIVE_INDEX              =
*     ARCHIVE_INDEX_TAB          =
*     ARCHIVE_PARAMETERS         =
*     CONTROL_PARAMETERS         =
*     MAIL_APPL_OBJ              =
*     MAIL_RECIPIENT             =
*     MAIL_SENDER                =
*     OUTPUT_OPTIONS             =
*     USER_SETTINGS              = 'X'
      .................................

and after replace the name of fm of smartform with the variable function_name:

CALL FUNCTION function_name
    EXPORTING
*     ARCHIVE_INDEX              =
*     ARCHIVE_INDEX_TAB          =
*     ARCHIVE_PARAMETERS         =
*     CONTROL_PARAMETERS         =
*     MAIL_APPL_OBJ              =
*     MAIL_RECIPIENT             =
*     MAIL_SENDER                =
*     OUTPUT_OPTIONS             =
*     USER_SETTINGS              = 'X'
      .................................

Max