<?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 Problem With Function Parameters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903419#M55642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to call the following function, I have a spool number, which is fine, and can run the function in test mode. The function I am calling is below, but I'm not sure what I need to declare or create for the "TABLES BUFFER" section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    rqident                    = 507&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIRST_LINE                 = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LAST_LINE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    buffer                     = it&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_SUCH_JOB                = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NOT_ABAP_LIST              = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_CONTAINS_NO_DATA       = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SELECTION_EMPTY            = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_PERMISSION              = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CAN_NOT_ACCESS             = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  READ_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                     = 8&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someon can help!&lt;/P&gt;&lt;P&gt;Many Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2005 13:13:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-03-22T13:13:31Z</dc:date>
    <item>
      <title>Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903419#M55642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to call the following function, I have a spool number, which is fine, and can run the function in test mode. The function I am calling is below, but I'm not sure what I need to declare or create for the "TABLES BUFFER" section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    rqident                    = 507&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIRST_LINE                 = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LAST_LINE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    buffer                     = it&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_SUCH_JOB                = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NOT_ABAP_LIST              = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  JOB_CONTAINS_NO_DATA       = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SELECTION_EMPTY            = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_PERMISSION              = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CAN_NOT_ACCESS             = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  READ_ERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                     = 8&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someon can help!&lt;/P&gt;&lt;P&gt;Many Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 13:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903419#M55642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T13:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903420#M55643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The BUFFER parameter in the TABLES section will accept a table of any structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 13:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903420#M55643</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-03-22T13:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903421#M55644</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;I tried:&lt;/P&gt;&lt;P&gt;      data: begin of it occurs 3,&lt;/P&gt;&lt;P&gt;      f1(65535) type c,&lt;/P&gt;&lt;P&gt;      end of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which did work, but then I am restricted to 65535 chars,&lt;/P&gt;&lt;P&gt;I tried defining it as string, and this just crashed.&lt;/P&gt;&lt;P&gt;Is there a better way of doing this? The data is in RDI format.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 13:30:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903421#M55644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T13:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903422#M55645</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;This is how you should define your internal table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it OCCURS 0,&lt;/P&gt;&lt;P&gt;        precol(1),&lt;/P&gt;&lt;P&gt;        data_line(1000),&lt;/P&gt;&lt;P&gt;      end of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You won't get anything more that 1000 if you're using this FM because SAP extracts only that amount of characters, so defining your 'it' with 65535 won't do anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wojtek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 14:41:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903422#M55645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T14:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903423#M55646</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;thanks for that, it's fixed the problem, not sure if I should be using occurs 0 , because of the memory allocation - any tips?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 15:50:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903423#M55646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903424#M55647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tip....don't use OCCURS at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


Types: begin of it_type,
       precol(1),
       data_line(1000),
       end of it_type.

Data: it type table of it_type with header line.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 15:56:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903424#M55647</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-03-22T15:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903425#M55648</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;Yes, Rich is right. Don't use OCCURS at all. Sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wojtek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 16:38:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903425#M55648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T16:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903426#M55649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please give some further explanation why "type" syntax is better than the "occurs" one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 16:52:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903426#M55649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-22T16:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903427#M55650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well,  I attended an ABAP Objects class, and the instructor said that the OCCURS statement is obselete.  Plus, I'm pretty sure that OCCURS syntax is not allow in ABAP Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2005 17:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903427#M55650</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-03-22T17:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903428#M55651</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;I am trying not to use OCCURS, although it is a habit...The reason behind it is that using TYPE TABLE is more clear and more specific to me. Both work well, though. I can't comment on using OCCURS in ABAP Objects and whether it is obsolete or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Wojtek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2005 09:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903428#M55651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-23T09:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Function Parameters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903429#M55652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  The use of occurs has become obsolete. In ABAP Objects, you cannot define internal tables using the OCCURS, it won't work in declarative statements like DATA/TYPE. If you go for stricter/extended syntax check, it will give error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Tejal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2005 10:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-function-parameters/m-p/903429#M55652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-03-23T10:29:03Z</dc:date>
    </item>
  </channel>
</rss>

