<?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: Formule in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562810#M254424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the situation you would pass just the input code and you wish to output the table with possible values of field1 and field2 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please confirm if that is your requirement ????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If that is the case ---&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input = 'If field1 &amp;gt; field2 then 5'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can try the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Find the string length of input.&lt;/P&gt;&lt;P&gt;2. Search for 'then' in the input string.&lt;/P&gt;&lt;P&gt;3. Calculate the difference between strlen(input) and sy-fdpos from the previous step.&lt;/P&gt;&lt;P&gt;4. Initialise lvalue using the positions from 3.&lt;/P&gt;&lt;P&gt;5. Similarly find the Operator.&lt;/P&gt;&lt;P&gt;6. Do lval times.&lt;/P&gt;&lt;P&gt;      field1 = sy-index.&lt;/P&gt;&lt;P&gt;      field2 = lval - sy-index.&lt;/P&gt;&lt;P&gt;      if field11 &amp;gt; field2.&lt;/P&gt;&lt;P&gt;         move field1, field2 to itab.&lt;/P&gt;&lt;P&gt;         append itab.&lt;/P&gt;&lt;P&gt;      endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Oct 2006 19:25:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-11T19:25:07Z</dc:date>
    <item>
      <title>Formule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562807#M254421</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;Folks, I need create a formula which has to be render for one program ABAP, you all know if exist any module of function which do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exemple: if field1 &amp;gt; field2 then 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field1 = &amp;#145;3&amp;#146; and field2 = &amp;#145;2&amp;#146;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 18:52:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562807#M254421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-11T18:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Formule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562808#M254422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please explain with more detail.  I don't follow you.&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>Wed, 11 Oct 2006 19:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562808#M254422</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-11T19:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Formule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562809#M254423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example of function module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Input Fields&lt;/P&gt;&lt;P&gt;Input Code =  "if field1 &amp;gt; field2 then 5"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output Fields&lt;/P&gt;&lt;P&gt;Result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt;Field Name | Field Value&lt;/P&gt;&lt;P&gt;Field1              3&lt;/P&gt;&lt;P&gt;Field2              2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function should understand  the codes ( if, else, than, etc&amp;#133; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 19:18:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562809#M254423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-11T19:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Formule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562810#M254424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand the situation you would pass just the input code and you wish to output the table with possible values of field1 and field2 ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please confirm if that is your requirement ????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If that is the case ---&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input = 'If field1 &amp;gt; field2 then 5'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can try the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Find the string length of input.&lt;/P&gt;&lt;P&gt;2. Search for 'then' in the input string.&lt;/P&gt;&lt;P&gt;3. Calculate the difference between strlen(input) and sy-fdpos from the previous step.&lt;/P&gt;&lt;P&gt;4. Initialise lvalue using the positions from 3.&lt;/P&gt;&lt;P&gt;5. Similarly find the Operator.&lt;/P&gt;&lt;P&gt;6. Do lval times.&lt;/P&gt;&lt;P&gt;      field1 = sy-index.&lt;/P&gt;&lt;P&gt;      field2 = lval - sy-index.&lt;/P&gt;&lt;P&gt;      if field11 &amp;gt; field2.&lt;/P&gt;&lt;P&gt;         move field1, field2 to itab.&lt;/P&gt;&lt;P&gt;         append itab.&lt;/P&gt;&lt;P&gt;      endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 19:25:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562810#M254424</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-11T19:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Formule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562811#M254425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 19:29:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562811#M254425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-11T19:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formule</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562812#M254426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nevermind.&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2006 19:34:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formule/m-p/1562812#M254426</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-11T19:34:20Z</dc:date>
    </item>
  </channel>
</rss>

