Skip to Content
avatar image
Former Member

Runtime error smartform

HI experts ,

I have smartforms for Stock Report. and respective selection screen in se38. while executing its shows Below runtime error.

******************************************************************************************

Runtime Errors CALL_FUNCTION_CONFLICT_LENG

Exceptn CX_SY_DYN_CALL_ILLEGAL_TYPE

Date and Time 07.07.2007 16:15:34

ShrtText

Type conflict when calling a function module (field length).

What happened?

Error in ABAP application program.

The current ABAP program "ZSTOCK_TR" had to be terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

A function module was called incorrectly.

Error analysis

An exception occurred. This exception will be dealt with in more detail

below. The exception, assigned to the class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was

not caught, which

led to a runtime error. The reason for this exception is:

The call to the function module "/1BCDWB/SF00000017" is incorrect:

In the function module interface, you can specify only

fields of a specific type and length under "GT_STRUCT".

Although the currently specified field

"GT_STRUCT2" is the correct type, its length is incorrect.

Source Code Extract

Line SourceCde

304

305 SELECT stceg into ITAB0-stceg FROM kna1 WHERE KUNNR = VKUNNR.

306 APPEND ITAB0.

307 ENDSELECT.

308

309 select vgbel from lips into itab0-ponum where vbeln in vbeln.

310 append itab0.

311 endselect.

312 DATA : LINES TYPE STANDARD TABLE OF TLINE WITH HEADER LINE.

313

314 ***************************************************************

315

316 CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

317 EXPORTING

318 FORMNAME = 'Z_STOCK_TR'

319 * VARIANT = ' '

320 * DIRECT_CALL = ' '

321 IMPORTING

322 FM_NAME = gv_fname

323 * EXCEPTIONS

324 * NO_FORM = 1

325 * NO_FUNCTION_MODULE = 2

326 * OTHERS = 3

327 .

328 IF SY-SUBRC <> 0.

329 * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

330 * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

331 ENDIF.

332

333

>334 CALL FUNCTION gv_fname

335 exporting

336 * ARCHIVE_INDEX =

337 * ARCHIVE_INDEX_TAB =

338 * ARCHIVE_PARAMETERS =

339 * CONTROL_PARAMETERS =

340 * MAIL_APPL_OBJ =

341 * MAIL_RECIPIENT =

342 * MAIL_SENDER =

343 * OUTPUT_OPTIONS =

344 * USER_SETTINGS = 'X'

345 plant = plant

346 * vbeln = exc_inv

347 * srdoc = srdoc-low

348 * vexdat = vexdat

349 * vrdoc = vrdoc

350 * ptotal = ptotal

351 * line1 = line1

352 * fkwert = fkwert

353 * ikwert = ikwert

*********************************************************************************************

Plz help. Thanks alot.

Khan.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 07, 2007 at 09:12 PM

    Hi

    Check the parameters declaration that are passed to the smartform fun modules in the code

    since the correct foprm of parameters are not passed you are getting this type of error.

    please check the parameters declaration and correct it.

    Reward points for useful Answers

    Regards

    Anji

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Change your code for the declaration of GS_STRUCT1 in the program as below.

      TYPES : Begin of gs_struct1.
      include structure zgtstruct.
      TYPES: end of gs_struct1.

  • avatar image
    Former Member
    Jul 07, 2007 at 12:08 PM

    Hi

    I think u have not called Function module properly

    check this sample code

     Tables : sflight.
    Data : fm_name TYPE rs38l_fnam.
    
    *data : Begin of it_flttab occurs 0,
    *        carrid type sflight-carrid,
    *        connid type sflight-connid,
    *        fldate type sflight-fldate,
    *        seatsmax type sflight-seatsmax,
    *        seatsocc type sflight-seatsocc,
    *        End of it_flttab.
    
    data : it_flttab like table  of sflight.
    Data : g_salary type i .
    *       it_flttab type standard table of ty_flt.
    g_salary = 1000.
    
    
    select carrid connid fldate seatsmax seatsocc from sflight into
    corresponding fields of table it_flttab.
    
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname                 = 'ZTACA_SMFORM2'
    *   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
      Exporting
         salary = g_salary
      TABLES
         it_flttab = it_flttab
      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.

    <b>2nd code</b>

    TABLES: MKPF. 
    
    DATA: FM_NAME TYPE RS38L_FNAM. 
    
    DATA: BEGIN OF INT_MKPF OCCURS 0. 
            INCLUDE STRUCTURE MKPF. 
    DATA: END OF INT_MKPF. 
    
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001. 
    
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR. 
       MOVE-CORRESPONDING MKPF TO INT_MKPF. 
       APPEND INT_MKPF. 
    
    ENDSELECT. 
    
    * At the end of your program. 
    * Passing data to SMARTFORMS 
    
    call function 'SSF_FUNCTION_MODULE_NAME' 
      exporting 
        formname                 = 'ZSMARTFORM' 
    *   VARIANT                  = ' ' 
    *   DIRECT_CALL              = ' ' 
      IMPORTING 
        FM_NAME                  = FM_NAME 
      EXCEPTIONS 
        NO_FORM                  = 1 
        NO_FUNCTION_MODULE       = 2 
        OTHERS                   = 3. 
    
    if sy-subrc <> 0. 
       WRITE: / 'ERROR 1'. 
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
    endif. 
    
    call function FM_NAME 
    * EXPORTING 
    *   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 
        GS_MKPF                    = INT_MKPF 
      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. 
    
    

    Reward all helpfull answers

    Regards

    Pavan

    Add comment
    10|10000 characters needed characters exceeded