<?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: Negetive value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127108#M446742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Points to note,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The maximum length that NETPR can hold is 11 and 2 decimals,if it execeeds then it gives dump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : V_AMT TYPE NETPR.

V_AMT = '12345111.23'.
V_AMT = -1 * V_AMT.
WRITE : V_AMT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this will display negative sign at the end of amount , if you want to display it at fromt then use CLOI_PUT_SIGN_IN_FRONT , but you move the amount field to character field and pass to above FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2007 10:16:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-13T10:16:36Z</dc:date>
    <item>
      <title>Negetive value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127103#M446737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get a negetive value of any number in ALV output?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ls_alvtab-vbtyp = 'N' or ls_alvtab-vbtyp = 'H'.&lt;/P&gt;&lt;P&gt;if ls_alvtab-netwr lt 0.&lt;/P&gt;&lt;P&gt;ls_alvtab-netwr = ls_alvtab-netwr.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;if ls_alvtab-netwr gt 0.&lt;/P&gt;&lt;P&gt;ls_alvtab-netwr = ( -1 ) * ls_alvtab-netwr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify gt_alvtab from ls_alvtab transporting netwr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;is this logic correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:02:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127103#M446737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Negetive value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127104#M446738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your logic is correct.. if it fails..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ls_alvtab-vbtyp = 'N' or ls_alvtab-vbtyp = 'H'.&lt;/P&gt;&lt;P&gt;if ls_alvtab-netwr lt 0.&lt;/P&gt;&lt;P&gt;ls_alvtab-netwr = ls_alvtab-netwr.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;if ls_alvtab-netwr gt 0.&lt;/P&gt;&lt;P&gt;ls_alvtab-netwr = 0 -  ls_alvtab-netwr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;modify gt_alvtab from ls_alvtab transporting netwr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127104#M446738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Negetive value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127105#M446739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Nidhi,&lt;/P&gt;&lt;P&gt; YOur Logic looks ok to me.&lt;/P&gt;&lt;P&gt;What is the problem?&lt;/P&gt;&lt;P&gt;Can you also show us your Field catalog information for netwr field?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127105#M446739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Negetive value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127106#M446740</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;Your logic is perfect just go wiht it . coz what ever value is there in the internal table ALV just will display it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing will stop is if "no_sign" field in the fieldcatalog is set to 'X' then it won't print.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your probelm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign reward points if it helps.&lt;/P&gt;&lt;P&gt;-Gaurang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:08:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127106#M446740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Negetive value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127107#M446741</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;When you define the fieldcatalog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the rollname..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: S_FIELDCATALOG TYPE slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_fieldcatalog-col_pos = '2'.&lt;/P&gt;&lt;P&gt;s_fieldcatalog-fieldname = 'NETPR'.&lt;/P&gt;&lt;P&gt;s_fieldcatalog-tabname = 'ITAB1'.&lt;/P&gt;&lt;P&gt;s_fieldcatalog-rollname = 'WERTV6'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND s_fieldcatalog to t_fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Vinoth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:11:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127107#M446741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Negetive value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127108#M446742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Points to note,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The maximum length that NETPR can hold is 11 and 2 decimals,if it execeeds then it gives dump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : V_AMT TYPE NETPR.

V_AMT = '12345111.23'.
V_AMT = -1 * V_AMT.
WRITE : V_AMT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this will display negative sign at the end of amount , if you want to display it at fromt then use CLOI_PUT_SIGN_IN_FRONT , but you move the amount field to character field and pass to above FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 10:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/negetive-value/m-p/2127108#M446742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T10:16:36Z</dc:date>
    </item>
  </channel>
</rss>

