Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

strange error of CALL FUNCTION within Method

Hi all,

i'm facing a very strange problem. Some Function Modules can't be called from within a method and a dump appears with the following message CALL_FUNCTION_CONFLICT_LENG (CX_SY_DYN_CALL_ILLEGAL_TYPE).

Here's an example: I've created a normal class with only one static method.

Class: ZCL_TEST

Method: CHECK_EMPLOYEE

Importing Parameter: IV_PERNR TYPE PERNR_D

Coding:

  DATA gt_return TYPE TABLE OF bapireturn1.

  CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
    EXPORTING
      number        = iv_pernr
      validitybegin = sy-datum
    IMPORTING
      return        = gt_return.

  CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
    EXPORTING
      number        = iv_pernr
      validitybegin = sy-datum.

If i call this method a dump appears and if the same code of that method is implemented directly in a normal report everything works fine.

Why can't i call this function module from within a method?

Regards

Mark-André

Former Member
Former Member replied

return parameter is not a table.

This one works:

  DATA gt_return TYPE bapireturn1.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question