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

FM does not exist when executing Smartform

Former Member
0 Likes
2,315

Hi,

When we are executing a Smartform in Production Server, FM not generating. But at the same smartform generating FM in Quality Server.

What should be the problem..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,365

Hi ,

Please see the log it generated at the time of Transport. It seems to be problem with Transport not done successfully.

Also try to debug the Driver program and see whether it generates a Function module dynamically.

Regards,

Uma

6 REPLIES 6
Read only

GauthamV
Active Contributor
0 Likes
1,365

Check whether all the elements of smartform are transported to production server.(ex: element like smartstyle)

Sometimes missing of elements in one of the transport request will cause these kind of errors.

Read only

Former Member
0 Likes
1,365

did you try to go to production..at the TC smartforms.

Then execute (F8) and you will see the function module. If it didn´t generate nothing then or the smartform doesn´t exist or it has a problem.

But if you could put more information it will be better to help you

Read only

Former Member
0 Likes
1,366

Hi ,

Please see the log it generated at the time of Transport. It seems to be problem with Transport not done successfully.

Also try to debug the Driver program and see whether it generates a Function module dynamically.

Regards,

Uma

Read only

former_member193284
Active Participant
0 Likes
1,365

Hi Anil,

can you provide me the details on how your call your smart form in the driver program?

Thanks

Read only

Former Member
0 Likes
1,365

Hi Anil,

I Assuming you are using below code to call the smartform.

"Function Module Name received from Menu Item Environment->FM Name
Call Function Function_Module_Name 

The reason this wont work is because the FM name is different across different environments.

To call the smart form you will have to use:

call function 'SSF_FUNCTION_MODULE_NAME'
  exporting
    formname                 = 'ZSMARTFORM' "Name Of SmartForm
  IMPORTING
    FM_NAME                  = FM_NAME.

call function FM_NAME .

Regards,

Jovito

Read only

Former Member
0 Likes
1,365

Hi Anil ,

I assume that you are using CALL FUNCTION '/1BCDWB/SF00000048'

IF you use this Function, It will be changed from one server to another server,

Now only one way to you is the following:

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.

with Regards

Murthy