<?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 Re: provide statement and function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512515#M1559710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it is very odd.&lt;/P&gt;&lt;P&gt;The fm imports PERNR, BEGDA, ENDDA and exports two numeric values.&lt;/P&gt;&lt;P&gt;And I have 2 exceptions defined: DATA_ERROR and RESULTS_NOT_COMPLETE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    if sy-subrc &amp;lt;&amp;gt; 0.
      gf_results_not_complete = yes.
    endif.
.....

  if gf_results_not_complete = yes.
    raise results_not_complete.
  endif.
endfunction.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Nov 2010 08:55:12 GMT</pubDate>
    <dc:creator>former_member226519</dc:creator>
    <dc:date>2010-11-22T08:55:12Z</dc:date>
    <item>
      <title>provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512513#M1559708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting a syntax error when using both  PROVIDE and RAISE within a function module: "Old and new exceptions cannot be used at the same time .."&lt;/P&gt;&lt;P&gt;I managed to solve the problem by putting the PROVIDE into an include of the function group. &lt;/P&gt;&lt;P&gt;But this could not be the state of the art solution, could it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 08:13:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512513#M1559708</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2010-11-22T08:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512514#M1559709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROVIDE is a statement for extracting data from time dependent tables. It seems to be entirely unlikely that it has &lt;EM&gt;anything&lt;/EM&gt; to do with the error message ""Old and new exceptions cannot be used at the same time ...".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the signature (import/export/changing/table paramaters) of your function module, and how are you raising exceptions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 08:25:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512514#M1559709</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-11-22T08:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512515#M1559710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know it is very odd.&lt;/P&gt;&lt;P&gt;The fm imports PERNR, BEGDA, ENDDA and exports two numeric values.&lt;/P&gt;&lt;P&gt;And I have 2 exceptions defined: DATA_ERROR and RESULTS_NOT_COMPLETE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    if sy-subrc &amp;lt;&amp;gt; 0.
      gf_results_not_complete = yes.
    endif.
.....

  if gf_results_not_complete = yes.
    raise results_not_complete.
  endif.
endfunction.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 08:55:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512515#M1559710</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2010-11-22T08:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512516#M1559711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the exact FM signature - i.e. the header bit of the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 09:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512516#M1559711</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-11-22T09:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512517#M1559712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds rather like you used both RAISE (old) and RAISE EXCEPTION (new) in the same context, please doublecheck.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 10:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512517#M1559712</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-11-22T10:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512518#M1559713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(PERNR) TYPE  PERSNO
*"     VALUE(BEGDA) TYPE  BEGDA
*"     VALUE(ENDDA) TYPE  ENDDA
*"  EXPORTING
*"     VALUE(DAYS_SOLL) TYPE  ATSOL
*"     VALUE(DAYS_UNPAYED) TYPE  ATAKL
*"  EXCEPTIONS
*"      DATA_ERROR
*"      RESULTS_NOT_COMPLETE
*"----------------------------------------------------------------------
...
* 
  select * from zvpr_awarts into table gt_awarts
                            where endda &amp;gt;= begda.
  if sy-subrc &amp;lt;&amp;gt; 0.
    raise data_error.
  endif.
*
...
    call function 'HR_TIME_RESULTS_GET'
      exporting
        get_pernr             = l_pernr
        get_pabrj             = gs_549q-pabrj
        get_pabrp             = gs_549q-pabrp
      tables
        get_wpbp              = gt_wpbp
        get_ab                = gt_ab
        get_zes               = gt_zes
        get_psp               = gt_psp
      exceptions
        no_period_specified   = 1
        wrong_cluster_version = 2
        no_read_authority     = 3
        cluster_archived      = 4
        technical_error       = 5
        others                = 6.
    if sy-subrc &amp;lt;&amp;gt; 0.
      gf_results_not_complete = yes.
    endif.
...

*--&amp;gt; this is the part causing problems
*data: lf_ab.
*    provide fields * from gt_ab into gs_ab valid lf_ab
*                                           bounds begda
*                                           and    endda
*                                           where  awart in gr_awart
*            between gs_549q-begda and gs_549q-endda.
*      clear gt_awart_tmp.
*      gt_awart_tmp = gs_ab.
*      append gt_awart_tmp.
*    endprovide.
*
*--&amp;gt; this is the way it works
    perform fill_awart_tmp tables gt_ab
                                  gt_awart_tmp
                           using  gs_549q-begda
                                  gs_549q-endda.
.....
*
  days_soll    = l_soll.
  days_unpayed = l_unpayed.
  if gf_results_not_complete = yes.
    raise results_not_complete.
  endif.
endfunction.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 10:33:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512518#M1559713</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2010-11-22T10:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512519#M1559714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I can't see anything wrong. As Thomas says, you get this error when mixing RAISE and RAISE EXCEPTION. I can't see any connection to the PROVIDE statement. I think you have to take this to SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 11:03:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512519#M1559714</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-11-22T11:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512520#M1559715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found that  PROVIDE obviously uses RAISE EXCEPTION internally and this conflicts with my simple RAISE.&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 11:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512520#M1559715</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2010-11-22T11:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: provide statement and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512521#M1559716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really? That's pretty bad then! You should still raise it with SAP (if it isn't already there) - it means that ABAP is broken...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 11:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/provide-statement-and-function-module/m-p/7512521#M1559716</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2010-11-22T11:31:42Z</dc:date>
    </item>
  </channel>
</rss>

