<?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: include with form in user-exit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150355#M749117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huseyin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;userexits are done by filling an include which itself is source code of the function module. If you want to do some structurized programming, you should copy the EXIT function to customer name space and to your own function group. Then, in  the include, you call your own function passing exactly the parameters of the EXIT function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you are free to create includes, forms, data, objects,... whatever you want to achieve structured functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Include.: ZXTRKU12                                                  *
*...
* new functionality sourced out to new function module
  call function 'Z_EXIT_SAPLV55K_004'
    importing
      processing_protocol = processing_protocol
    tables
      idoc_data           = idoc_data
    changing
      idoc_control        = idoc_control
    exceptions
      idoc_error          = 1
      do_not_process_idoc = 2
      others              = 3.
  case sy-subrc .
    when 0.
      exit.
    when 1.
      raise idoc_error.
    when others.
* Can't raise OTHERS -&amp;gt; 2 AND Others handled in common
      raise do_not_process_idoc.
  endcase.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we created a new function group ZXTRK for the exit function group XTRK. We copied function EXIT_SAPLV55K_004 to function z_exit_saplv55k_004. In our case, we created 22 form includes and one top include because our programming guidelines require an include for each form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest shoud be crystal-clear. If not, feel fre to ask for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2007 09:45:16 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-12-18T09:45:16Z</dc:date>
    <item>
      <title>include with form in user-exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150352#M749114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am trying to put an include which contains a form routine into a user-exit include . My include source activates normally by itself but when i try to activate the user-exit include which contains my custom include i am getting the error " Incorrect nesting: Before the statement "FORM", the structure introduced by "FUNCTION' must be concluded by "ENDFUNCTION"  "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how i can fix that?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Huseyin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 15:00:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150352#M749114</guid>
      <dc:creator>huseyin_catalbas</dc:creator>
      <dc:date>2007-12-17T15:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: include with form in user-exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150353#M749115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi huseyin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Inside the se37 code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. put your include   &lt;/P&gt;&lt;P&gt;   as the first line,&lt;/P&gt;&lt;P&gt;   BEFORE  the FUNCTION Definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2007 15:02:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150353#M749115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-17T15:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: include with form in user-exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150354#M749116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;P&gt;Thanks for your reply but i couldnt understand well. I havent created any functions using se37. I have just created the include from se38 and it includes a  form.... endform  block. What i want is to make use of this form using a perform statement in the user-exit. &lt;/P&gt;&lt;P&gt;Did you mean the source code of the user-exit function? If so i think exit function sources are not changeable. &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Huseyin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 09:29:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150354#M749116</guid>
      <dc:creator>huseyin_catalbas</dc:creator>
      <dc:date>2007-12-18T09:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: include with form in user-exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150355#M749117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huseyin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;userexits are done by filling an include which itself is source code of the function module. If you want to do some structurized programming, you should copy the EXIT function to customer name space and to your own function group. Then, in  the include, you call your own function passing exactly the parameters of the EXIT function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you are free to create includes, forms, data, objects,... whatever you want to achieve structured functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Include.: ZXTRKU12                                                  *
*...
* new functionality sourced out to new function module
  call function 'Z_EXIT_SAPLV55K_004'
    importing
      processing_protocol = processing_protocol
    tables
      idoc_data           = idoc_data
    changing
      idoc_control        = idoc_control
    exceptions
      idoc_error          = 1
      do_not_process_idoc = 2
      others              = 3.
  case sy-subrc .
    when 0.
      exit.
    when 1.
      raise idoc_error.
    when others.
* Can't raise OTHERS -&amp;gt; 2 AND Others handled in common
      raise do_not_process_idoc.
  endcase.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we created a new function group ZXTRK for the exit function group XTRK. We copied function EXIT_SAPLV55K_004 to function z_exit_saplv55k_004. In our case, we created 22 form includes and one top include because our programming guidelines require an include for each form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest shoud be crystal-clear. If not, feel fre to ask for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 09:45:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-with-form-in-user-exit/m-p/3150355#M749117</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-12-18T09:45:16Z</dc:date>
    </item>
  </channel>
</rss>

