<?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 function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1365781#M180963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we created a function module to delete the special charecters for a given string and we are using this function module with in the loop. now i want to remove the loop condition with in the function module. i am giving sample code also. it is taking long time because it is with in the loop. how reduce the time. any body can help me in changing the code for the same logic pls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION zspanish_char_conv_new.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*" IMPORTING&lt;/P&gt;&lt;P&gt;*" VALUE(I_TEXT)&lt;/P&gt;&lt;P&gt;*" EXPORTING&lt;/P&gt;&lt;P&gt;*" VALUE(E_TEXT)&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : len TYPE i.&lt;/P&gt;&lt;P&gt;DATA: str(99) TYPE c.&lt;/P&gt;&lt;P&gt;DATA: cntr TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: val TYPE int1.&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF x,&lt;/P&gt;&lt;P&gt;y TYPE int1,&lt;/P&gt;&lt;P&gt;END OF x.&lt;/P&gt;&lt;P&gt;cntr = 0.&lt;/P&gt;&lt;P&gt;len = strlen( i_text ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE cntr NE len.&lt;/P&gt;&lt;P&gt;x = i_text+cntr(1).&lt;/P&gt;&lt;P&gt;val = x-y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF val &amp;gt;= 128 .&lt;/P&gt;&lt;P&gt;x = ' '.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_text+cntr(1) = x.&lt;/P&gt;&lt;P&gt;cntr = cntr + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE i_text.&lt;/P&gt;&lt;P&gt;e_text = i_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 May 2006 07:04:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-16T07:04:37Z</dc:date>
    <item>
      <title>function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1365781#M180963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we created a function module to delete the special charecters for a given string and we are using this function module with in the loop. now i want to remove the loop condition with in the function module. i am giving sample code also. it is taking long time because it is with in the loop. how reduce the time. any body can help me in changing the code for the same logic pls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION zspanish_char_conv_new.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*" IMPORTING&lt;/P&gt;&lt;P&gt;*" VALUE(I_TEXT)&lt;/P&gt;&lt;P&gt;*" EXPORTING&lt;/P&gt;&lt;P&gt;*" VALUE(E_TEXT)&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : len TYPE i.&lt;/P&gt;&lt;P&gt;DATA: str(99) TYPE c.&lt;/P&gt;&lt;P&gt;DATA: cntr TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: val TYPE int1.&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF x,&lt;/P&gt;&lt;P&gt;y TYPE int1,&lt;/P&gt;&lt;P&gt;END OF x.&lt;/P&gt;&lt;P&gt;cntr = 0.&lt;/P&gt;&lt;P&gt;len = strlen( i_text ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHILE cntr NE len.&lt;/P&gt;&lt;P&gt;x = i_text+cntr(1).&lt;/P&gt;&lt;P&gt;val = x-y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF val &amp;gt;= 128 .&lt;/P&gt;&lt;P&gt;x = ' '.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i_text+cntr(1) = x.&lt;/P&gt;&lt;P&gt;cntr = cntr + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDWHILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONDENSE i_text.&lt;/P&gt;&lt;P&gt;e_text = i_text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 07:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1365781#M180963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T07:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1365782#M180964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Instead of using importing &amp;amp; exporting parameters use&lt;/P&gt;&lt;P&gt;tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apply logic on individaul line item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In return u will get the table with desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as far the code is concern there will be no major change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can reusre the entire logic for the conversion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark helpful answers and close the thread if satisfied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 07:15:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1365782#M180964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T07:15:24Z</dc:date>
    </item>
  </channel>
</rss>

