<?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: FM for negative values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617440#M276400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;check this function module..&lt;/P&gt;&lt;P&gt;CLOI_PUT_SIGN_IN_FRONT will move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.&lt;/P&gt;&lt;P&gt;chck this example..&lt;/P&gt;&lt;P&gt;data: a1 type i value 56 ,&lt;/P&gt;&lt;P&gt;a2 type i value 60,&lt;/P&gt;&lt;P&gt;res type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;res = a1 - a2.&lt;/P&gt;&lt;P&gt;data: res1(10).&lt;/P&gt;&lt;P&gt;res1 = res.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;VALUE = res1.&lt;/P&gt;&lt;P&gt;write res1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===============================[OR]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data : char(20).&lt;/P&gt;&lt;P&gt; data : val type i.&lt;/P&gt;&lt;P&gt;  val = val - 50.&lt;/P&gt;&lt;P&gt; if val &amp;lt; 0.&lt;/P&gt;&lt;P&gt;   write val to char.&lt;/P&gt;&lt;P&gt;   concatenate '-' char into char .&lt;/P&gt;&lt;P&gt;   condense char no-gaps.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; write : / char.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful..&lt;/P&gt;&lt;P&gt;Thaks,Eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Oct 2006 09:21:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-14T09:21:36Z</dc:date>
    <item>
      <title>FM for negative values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617439#M276399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting values in negatiive like this 2,32,542- I want to put the negative sign in front of the value &lt;/P&gt;&lt;P&gt;-2,32,542, is there any function module for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2006 09:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617439#M276399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-14T09:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: FM for negative values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617440#M276400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venu,&lt;/P&gt;&lt;P&gt;check this function module..&lt;/P&gt;&lt;P&gt;CLOI_PUT_SIGN_IN_FRONT will move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.&lt;/P&gt;&lt;P&gt;chck this example..&lt;/P&gt;&lt;P&gt;data: a1 type i value 56 ,&lt;/P&gt;&lt;P&gt;a2 type i value 60,&lt;/P&gt;&lt;P&gt;res type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;res = a1 - a2.&lt;/P&gt;&lt;P&gt;data: res1(10).&lt;/P&gt;&lt;P&gt;res1 = res.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;VALUE = res1.&lt;/P&gt;&lt;P&gt;write res1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===============================[OR]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;data : char(20).&lt;/P&gt;&lt;P&gt; data : val type i.&lt;/P&gt;&lt;P&gt;  val = val - 50.&lt;/P&gt;&lt;P&gt; if val &amp;lt; 0.&lt;/P&gt;&lt;P&gt;   write val to char.&lt;/P&gt;&lt;P&gt;   concatenate '-' char into char .&lt;/P&gt;&lt;P&gt;   condense char no-gaps.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; write : / char.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful..&lt;/P&gt;&lt;P&gt;Thaks,Eswar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2006 09:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617440#M276400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-14T09:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: FM for negative values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617441#M276401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting the field is mseg-menge how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2006 09:42:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617441#M276401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-14T09:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: FM for negative values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617442#M276402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please elaborate and paste the code if possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2006 09:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617442#M276402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-14T09:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: FM for negative values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617443#M276403</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;loop at it_mseg.&lt;/P&gt;&lt;P&gt;AT END OF matnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Material No.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      lw_final-matnr = lw_mseg-matnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Opening qty&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      lw_final-openqty = lf_open_rec_qty - lf_open_issue_qty.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  lw_final-recpqty =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  lw_final-issuqty =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Closing qty&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      &amp;lt;b&amp;gt;lw_final-closqty&amp;lt;/b&amp;gt; = lf_close_rec_qty - lf_close_issue_qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Getting Material Description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      SELECT SINGLE maktx INTO lf_maktx&lt;/P&gt;&lt;P&gt;      FROM makt&lt;/P&gt;&lt;P&gt;      WHERE matnr = lw_mseg-matnr&lt;/P&gt;&lt;P&gt;        AND spras = sy-langu.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Materail Description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      lw_final-maktx = lf_maktx.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;I want to change the value of this field.&lt;/P&gt;&lt;P&gt;lw_final-closqty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2006 10:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617443#M276403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-14T10:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: FM for negative values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617444#M276404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi venu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk this sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_amount = itab-shkzg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            VALUE = itab-shkzg.&lt;/P&gt;&lt;P&gt; v_amount = itab-shkzg&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anversha s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Oct 2006 10:36:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fm-for-negative-values/m-p/1617444#M276404</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-10-14T10:36:23Z</dc:date>
    </item>
  </channel>
</rss>

