<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic strange error of CALL FUNCTION within Method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652994#M1286149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example: I've created a normal class with only one static method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class: ZCL_TEST&lt;/P&gt;&lt;P&gt;Method: CHECK_EMPLOYEE&lt;/P&gt;&lt;P&gt;Importing Parameter: IV_PERNR TYPE PERNR_D&lt;/P&gt;&lt;P&gt;Coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why can't i call this function module from within a method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark-André&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 May 2009 09:10:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-08T09:10:05Z</dc:date>
    <item>
      <title>strange error of CALL FUNCTION within Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652994#M1286149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example: I've created a normal class with only one static method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class: ZCL_TEST&lt;/P&gt;&lt;P&gt;Method: CHECK_EMPLOYEE&lt;/P&gt;&lt;P&gt;Importing Parameter: IV_PERNR TYPE PERNR_D&lt;/P&gt;&lt;P&gt;Coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why can't i call this function module from within a method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark-André&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2009 09:10:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652994#M1286149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-08T09:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: strange error of CALL FUNCTION within Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652995#M1286150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is iv_pernr is declared in the calling program?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2009 09:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652995#M1286150</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-05-08T09:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: strange error of CALL FUNCTION within Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652996#M1286151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the dump even appears by testing the method from Class Builder with F8!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my test report iv_pernr isn't declared as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  z_test.
PARAMETERS p_pernr TYPE pernr_d.

zcl_test=&amp;gt;check_employee( p_pernr ). &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason of the dump is parameter &lt;STRONG&gt;RETURN&lt;/STRONG&gt;. But i don't understand it why it only doesn't work from within a method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dump Message: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;In the function module interface, you can specify only   
fields of a specific type and length under "RETURN".     
Although the currently specified field                   
"GT_RETURN" is the correct type, its length is incorrect.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark-André&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2009 09:26:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652996#M1286151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-08T09:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: strange error of CALL FUNCTION within Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652997#M1286152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;return parameter is not a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA gt_return TYPE bapireturn1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2009 10:07:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/strange-error-of-call-function-within-method/m-p/5652997#M1286152</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-05-08T10:07:26Z</dc:date>
    </item>
  </channel>
</rss>

