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

program activation problem

Former Member
0 Likes
747

sometimes the smartform which i developed moved to production cant work properly.

then i need to go to smartforms tcode and manually execute the samrtform so that the function module get generated, and then the smartform works . then after this i wont get this kind of problem. only for the first time when i transport it to production this problem occurs.

and another problem is the screens also not activated , we have to manually activate it sometimes and also includes .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
721

As per your explanation this seems strange.

Just make sure before transporting that you have activated all the objects.

Hope this helps!!!

Regds,

Lalit

5 REPLIES 5
Read only

Former Member
0 Likes
722

As per your explanation this seems strange.

Just make sure before transporting that you have activated all the objects.

Hope this helps!!!

Regds,

Lalit

Read only

Former Member
0 Likes
721

Hi,

U just do like this to solve ur problem,

The Smartform that is created in the Development may not have the same name in the Production server. So it is always advised to use the Function Module SSF_FUNCTION_MODULE_NAME to get the Function Module name by passing the ur Smartform name.

DATA: fm_name TYPE rs38l_fnam.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZSMARTFORM'

IMPORTING

fm_name = fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION fm_name

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Read only

Former Member
0 Likes
721

any more clarifications.

Read only

Former Member
0 Likes
721

The function module name that gets generated when you activate a smartform in development differs from the name that gets generated in QA or PRD.SO make sure you always pass the function module as a variable instead of directly hard coding the function module name.

Mathews

Read only

Former Member
0 Likes
721

Hi Ramesh kumar,

when u execute the Smartform u might get diff diff names. because it's a system generated name. And It will be different in Development Quality and Produciton Servers.

So To avoid this problem. use FM SSF_FUNCTION_MODULE_NAME and get FM_NAME and call it and u will not going to get the problem which u r facing now.

refer below code for example. here SD_ORDER is the Smartform name.

DATA : FM_NAME1  TYPE RS38L_FNAM.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      FORMNAME                 = 'ZSD_ORDER'
*     VARIANT                  = ' '
*     DIRECT_CALL              = ' '
   IMPORTING
     FM_NAME                  = FM_NAME1 " Later use this variable as CALL FUNCTION FM_NAME1 
*   EXCEPTIONS
*     NO_FORM                  = 1
*     NO_FUNCTION_MODULE       = 2
*     OTHERS                   = 3
            .
  IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

CALL FUNCTION FM_NAME1  "'/1BCDWB/SF00000017' <= provide variable FM_NAME1 instead of fm name
  EXPORTING
*    ARCHIVE_INDEX              =
*    ARCHIVE_INDEX_TAB          =
*    ARCHIVE_PARAMETERS         =
*    CONTROL_PARAMETERS         =
*    MAIL_APPL_OBJ              =
*    MAIL_RECIPIENT             =
*    MAIL_SENDER                =
*    OUTPUT_OPTIONS             =
*    USER_SETTINGS              = 'X'
*   ABKRS                      = ABKRS
*  IMPORTING
*    DOCUMENT_OUTPUT_INFO       =
*    JOB_OUTPUT_INFO            =
*    JOB_OUTPUT_OPTIONS         =
   TABLES
     GIT_FINAL                  = GIT_FINAL
*  EXCEPTIONS
*    FORMATTING_ERROR           = 1
*    INTERNAL_ERROR             = 2
*    SEND_ERROR                 = 3
*    USER_CANCELED              = 4
*    OTHERS                     = 5
           .
 IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
 ENDIF.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7