cancel
Showing results for 
Search instead for 
Did you mean: 

runtime error when executing smartform in se38

Former Member
0 Kudos

hi,

i designed a smartform but when iam executing that using se38 am gettin runtime error.can anybody plz help me.

&----


*& Report ZDEMOPRG

*&

&----


*&

*&

&----


REPORT ZDEMOPRG.

DATA FNAME(30) TYPE C.

TABLES: LFA1.

DATA: BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTURE LFA1.

DATA: END OF ITAB.

SELECT-OPTIONS S_KUNNR FOR LFA1-KUNNR MEMORY ID 001.

SELECT * FROM LFA1 WHERE KUNNR IN S_KUNNR.

MOVE-CORRESPONDING LFA1 TO ITAB..

APPEND ITAB.

ENDSELECT.

CALL FUNCTION '/1BCDWB/SF00000006'

EXPORTING

FORMNAME = 'ZEXM_SMART'

  • 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

ITAB = ITAB.

  • 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.

plz help me

thanks

sudheer

Accepted Solutions (0)

Answers (4)

Answers (4)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Try this and reward points by clicking the star on the left of reply,if it helps.

data: form_name type tdsfname value 'ZEXM_SMART'.

data: fm_name type rs38l_fnam.

....

TABLES: LFA1.

DATA: BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTURE LFA1.

DATA: END OF ITAB.

SELECT-OPTIONS S_KUNNR FOR LFA1-KUNNR MEMORY ID 001.

SELECT * FROM LFA1 WHERE KUNNR IN S_KUNNR.

MOVE-CORRESPONDING LFA1 TO ITAB..

APPEND ITAB.

ENDSELECT.

call function 'SSF_FUNCTION_MODULE_NAME'

exporting

formname = form_name

  • VARIANT = ' '

  • DIRECT_CALL = ' '

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

TABLES

ITAB = ITAB

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.

endloop.

Former Member
0 Kudos

Hi,

Check the program SF_EXAMPLE_01 of how the smartforms is called...The smartforms name is SF_EXAMPLE_01..

Thanks,

Naren

Former Member
0 Kudos

hi,

iam ok till printing the form but when iam calling the fuction module it iz sayin function module is not found.

plz advise

thanks

sudheer

Former Member
0 Kudos

First of all, you shouldn't be calling your form like this:

CALL FUNCTION '/1BCDWB/SF00000006'

When you transport your form to another system, the FM that is generated by your Smart Form will change. Please try like below:

 V_FORM_NAME = 'ZEXM_SMART'.

 CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
       EXPORTING
            FORMNAME           = V_FORM_NAME
       IMPORTING
            FM_NAME            = V_FM_NAME
       EXCEPTIONS
            NO_FORM            = 1
            NO_FUNCTION_MODULE = 2
            OTHERS             = 3.

  CALL FUNCTION V_FM_NAME
       EXPORTING  ....

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

What is the runtime error?

Regards,

Rich Heilman

Former Member
0 Kudos

1.function parameter "FORMNAME" is unknown

2.error in the abap application program

the current abap program "zdemoprg" had to be terminated because it has come accross a statement that unfortunately cannot be executed.

function module "/1BCDWB/SF00000006" was called with parameter "FORMNAME" this parameter is not defined.

An exception occured that is explained in detail below

the exception , which is assigned to class 'CX_SY_DYN_CALL_PARAM_NOT_FOUND', was not caught and therefore caused a runtime error.

The reason for the exception is:

Function module "/1BCDWB/SF00000006" was called with the parameter "FORMNAME" this parameter is not defined.

Former Member
0 Kudos

This means that the parameter FORMNAME doesn't exist in the Interface of your smartform.

Please see my code above.

Or if you still want to hardcode the FM name for testing purposes, just remove the FORMNAME from your export parameters.

Former Member
0 Kudos

By the way, the data declarations should look like this:

DATA: V_FORM_NAME     TYPE TDSFNAME,
      V_FM_NAME       TYPE RS38l_FNAM.

Former Member
0 Kudos

THIS IS NOT WORKING.