cancel
Showing results for 
Search instead for 
Did you mean: 

Smart form print program error:

former_member213437
Active Participant
0 Kudos

Hi everybody,

I Used function module CALL FUNCTION '/1BCDWB/SF00000053' to call a smart form, it is working fine in development

server, when it is ported to Test Server it is showing Function Module not found error, Because in the test Server the another

function module '/1BCDWB/SF00000036', is generated for the same smart form.

what to do to resolve the problem.

Thanks in Advance...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You need to use FM ssf_function_module_name to get the form name dynamically.

Check the wikis for code.

Regards

Praveen

Edited by: praveen reddy on Dec 28, 2010 10:48 AM

former_member213437
Active Participant
0 Kudos

Thanks for ur response Praven and Chandra

I Know this function Module SSF_FUNCTION_MODULE_NAME i used it in the same program,,

But some features are not there with this function module hence I choosen this. CALL FUNCTION '/1BCDWB/SF00000055

cant we have any other way to resolve this..

Former Member
0 Kudos

What features you are expecting??? This is only one way to get the FM name at different landscapes i.e Dev, QA and PRD.

If your smartform interface parameters are missing in the FM interface parameters then in Dev using 'Pattern' call the FM /1BCDWB/SF00000055 your interface parameters available now then simply change the FM name with FM_NAME which is returned from SSF_FUNCTION_MODULE_NAME

former_member213437
Active Participant
0 Kudos

Praveen ,

can we pass the following parameters to this function module 'SSF_FUNCTION_MODULE_NAME'

parameters like :


 outop-tddest = 'CANONMF4'.
  outop-tdprinter = 'CANONMF4'.
  cparam-no_dialog = 'X'.
  cparam-preview = space.
  cparam-getotf = 'X'.

  IF f1 = 'X'.
    CALL FUNCTION '/1BCDWB/SF00000053'
      EXPORTING
        control_parameters = cparam
        output_options     = outop
        user_settings      = space
      IMPORTING
        job_output_info    = tab_otf_data
      TABLES
        itab               = itab     .

Former Member
0 Kudos
outop-tddest = 'CANONMF4'.
  outop-tdprinter = 'CANONMF4'.
  cparam-no_dialog = 'X'.
  cparam-preview = space.
  cparam-getotf = 'X'

I hope you are using this to surpress the dialog box. We need to declare that before calling this FM.

former_member213437
Active Participant
0 Kudos

manas .

can we use these parameters in function Module CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

function Module or not.

titus_thomas2
Explorer
0 Kudos

Dear Murthy,

The FM 'SSF_FUNCTION_MODULE_NAME' is only used to find the generated FM name of the smartform. Once you get the generated FM name, you can call this function by passing the name of the generated FM dynamically. In the same code, you can send your export parameters outop.

What you have to do is this,

Assume your smartform name is ZSMARTFORM.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname                 = 'ZSMARTFORM'
*   VARIANT                  = ' '
*   DIRECT_CALL              = ' '
 IMPORTING
   FM_NAME                  = wrk_fname
* EXCEPTIONS
*   NO_FORM                  = 1
*   NO_FUNCTION_MODULE       = 2
*   OTHERS                   = 3
          .

outop-tddest = 'CANONMF4'.
  outop-tdprinter = 'CANONMF4'.
  cparam-no_dialog = 'X'.
  cparam-preview = space.
  cparam-getotf = 'X'.
 
  IF f1 = 'X'.
    CALL FUNCTION wrk_fname
      EXPORTING
        control_parameters = cparam
        output_options     = outop
        user_settings      = space
      IMPORTING
        job_output_info    = tab_otf_data
      TABLES
        itab               = itab     .

If you want to get all the import and export parameters automatically into your code, click on Pattern and give the function module name /1BCDWB/SF00000053 directly. Then, remove the function module name and in its place use the variable wrk_fname which holds the function module name. In this way, when used in different landscapes (DEV, QAS, PRD), we will be able to get the correct FM name of the smartform without any error.

Hope this is clear to you.

Glad to help,

Titus

Edited by: Titus_Thomas on Dec 28, 2010 12:18 PM

former_member213437
Active Participant
0 Kudos

Hi Thomas.

Thanks For your Valueble Answer...

I wil Try it in this Way...

Regards.

Murthy..

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear,

You should not use '/1BCDWB/SF00000053' directly as it varies from system to system. You should use below code

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
         formname =' Give you form name here'
      IMPORTING
        fm_name  = fm_name.

CALL FUNCTION  fm_name
..........................................

Thanks and Regards