<?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: Perform under function in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124994#M986279</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Give the subroutines (form ....endform) after end function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Charumathi.B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Jul 2008 04:50:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-04T04:50:08Z</dc:date>
    <item>
      <title>Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124991#M986276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can I use Perform and Form inside a function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created one function in se37 and I am using perform and form in its source code, but the system is giving me the following error msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Incorrect nesting: Before the statement "FORM", the structure
introduced by "FUNCTION" must be concluded by "ENDFUNCTION" . . . . . .
. .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:44:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124991#M986276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T04:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124992#M986277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;use the &lt;STRONG&gt;form ....endform&lt;/STRONG&gt;...after the endfuction...statement..&lt;/P&gt;&lt;P&gt;In case of functions...u have to write the subroutine in that way only....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rudra Prasanna Mohapatra on Jul 4, 2008 6:45 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:45:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124992#M986277</guid>
      <dc:creator>former_member195383</dc:creator>
      <dc:date>2008-07-04T04:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124993#M986278</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;u can do it as rudra said. or u can put your form-endform in Include under the Fn.grp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:49:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124993#M986278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T04:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124994#M986279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Give the subroutines (form ....endform) after end function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Charumathi.B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:50:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124994#M986279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T04:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124995#M986280</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;You can do that .. but your form .. Endform should be after endfunction..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:50:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124995#M986280</guid>
      <dc:creator>sachin_mathapati</dc:creator>
      <dc:date>2008-07-04T04:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124996#M986281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   You can write a perform statement in the FM. Write the Subroutene Perform &amp;lt; Subroutene Name&amp;gt;. Double click on the Subroutene the controle would take you to a new include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with out fail if found use full.........!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Rama.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:51:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124996#M986281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T04:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124997#M986282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can write performs/ subroutine calls in function module and declare an inlcude and write the forms/subroutine code inside that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 04:52:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124997#M986282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T04:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124998#M986283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prakash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, of course you can but make sure you write the code between the FORM and ENDFORM statements in a separate Include program provided in the Main Program (menubar GoTo-&amp;gt;Main Program) whose name ends in &lt;STRONG&gt;FUGRF01&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See example below for detailed explanation:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION zpa_pa_wb_outbound_empl_iface .
    PERFORM convert_dates CHANGING lt_wb_file.
........[ ]
........[ ]
........[ ]
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;From this FM, click on Menubar, GoTo-&amp;gt;Main Program. Here you'll see something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*******************************************************************
*   System-defined Include-files.                                 *
*******************************************************************
  INCLUDE lzpa_pa_qh_wb_empl_fugrtop.        " Global Data
  INCLUDE lzpa_pa_qh_wb_empl_fugruxx.        " Function Modules

*******************************************************************
*   User-defined Include-files (if necessary).                    *
*******************************************************************
* INCLUDE LZPA_PA_QH_WB_EMPL_FUGRF...        " Subprograms
* INCLUDE LZPA_PA_QH_WB_EMPL_FUGRO...        " PBO-Modules
* INCLUDE LZPA_PA_QH_WB_EMPL_FUGRI...        " PAI-Modules
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Delete the comment (*) of the first line &lt;U&gt;under "User-defined Include-files"&lt;/U&gt; and change it to the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INCLUDE LZPA_PA_QH_WB_EMPL_FUGRF01.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Double click on the name of this include to create it, then write your own routine in this include, see below the example the coding in LZPA_PA_QH_WB_EMPL_FUGRF01:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CONVERT_DATES
*&amp;amp;---------------------------------------------------------------------*
FORM convert_dates CHANGING pt_wb_file TYPE tty_wb_empl.

  FIELD-SYMBOLS: &amp;lt;fline&amp;gt; TYPE ty_wb_empl_struc.

  DATA: lv_wb_begda TYPE begda,
        lv_wb_endda TYPE endda.

  LOOP AT pt_wb_file ASSIGNING &amp;lt;fline&amp;gt;.
    lv_wb_begda = &amp;lt;fline&amp;gt;-start_date.
    lv_wb_endda = &amp;lt;fline&amp;gt;-end_date.
    &amp;lt;fline&amp;gt;-start_date = zcl_hr_utilities=&amp;gt;conv_date( lv_wb_begda ).
    &amp;lt;fline&amp;gt;-end_date   = zcl_hr_utilities=&amp;gt;conv_date( lv_wb_endda ).
  ENDLOOP.
ENDFORM.                    " CONVERT_DATES
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, Activate all your Includes including your main program and function group and module. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;This is the correct way of writing a subroutine within a function module&lt;/U&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124998#M986283</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2008-07-04T05:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124999#M986284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I am using perform and form in the source code that is present in se37 only&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:17:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4124999#M986284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T05:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Perform under function</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4125000#M986285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want it in the same Fm, write the form end form after ENDFUNCTION. and the perform should be between FUNCTION-ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jul 2008 05:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perform-under-function/m-p/4125000#M986285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-04T05:19:32Z</dc:date>
    </item>
  </channel>
</rss>

