<?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: Make type P negative in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632403#M1090896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that is how you would make it negative.  You should be able to see this in debug mode.  I guess you may be getting this error when your screen is thrown?  If so, you need to make sure to modify your screen field to handle the - sign.  So go to screen painter.  Click on the "element list" tab, then click on the "Texts/ I/O Templates" Tab. FInd your field in the list, now in the column labeled as "Text or I/O Field, you should see underscores, simply add a "V" at the end of this. So you should have something like this  _______________V in that field.  Save and activate, and try your program again.  The "V" is a placeholder for the sign.&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>Mon, 27 Oct 2008 15:52:07 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2008-10-27T15:52:07Z</dc:date>
    <item>
      <title>Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632400#M1090893</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;I must make negative a P type variable, how can I do it? I tried to multiplying by -1 but it doesn't work, when i run the program there is a runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 15:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632400#M1090893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-27T15:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632401#M1090894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: a type p decimals 2.

a = '10.00'.

a = a * -1.

write a .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is working for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 15:50:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632401#M1090894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-27T15:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632402#M1090895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this code: it works fine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: lv_p type p DECIMALS 2 value '3.44'.

lv_p = lv_p * ( -1 ).  "space between ( and - 

WRITE:/ 'lv_p:', lv_p.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 15:50:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632402#M1090895</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-10-27T15:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632403#M1090896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that is how you would make it negative.  You should be able to see this in debug mode.  I guess you may be getting this error when your screen is thrown?  If so, you need to make sure to modify your screen field to handle the - sign.  So go to screen painter.  Click on the "element list" tab, then click on the "Texts/ I/O Templates" Tab. FInd your field in the list, now in the column labeled as "Text or I/O Field, you should see underscores, simply add a "V" at the end of this. So you should have something like this  _______________V in that field.  Save and activate, and try your program again.  The "V" is a placeholder for the sign.&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>Mon, 27 Oct 2008 15:52:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632403#M1090896</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-10-27T15:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632404#M1090897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post the statement where the error is happening&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 15:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632404#M1090897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-27T15:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632405#M1090898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see the problem. Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: val type p VALUE '-2',   
      val2 type p VALUE -2.    
      res type p.

res = val2 - val.

write: res.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is 0 = -2 - (-2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 15:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632405#M1090898</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2008-10-27T15:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632406#M1090899</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;Firs of all, thank you for all your quick answers. Well, really I am working with BW, and I have a program to extract data from a table to another table making some transformations in the fields of the source table and save it in the fields of the target table. One of this transformations is to make negative a field with type QUAN that has a lenght of 17 and 3 decimals. I read somewhere that in a program the type QUAN is treated like the type P. I have this (more or less &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Internal table and work area for the source table.&lt;/P&gt;&lt;P&gt;DATA: it_dm TYPE STANDARD TABLE /bic/ohcfm_r_dm,&lt;/P&gt;&lt;P&gt;          wa_dm LIKE LINE OF it_dm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Internal table and work area for the target table&lt;/P&gt;&lt;P&gt;DATA: it_ext_dm TYPE STANDARD TABLE ycfm_t_dm,&lt;/P&gt;&lt;P&gt;          wa_ext_dm LIKE LINE OF it_ext_dm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"select of the source table&lt;/P&gt;&lt;P&gt;SELECT * FROM /bic/ohcfm_r_dm into table it_dm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"loop the internal table&lt;/P&gt;&lt;P&gt;LOOP AT it_dm INTO wa_dm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_ext_dm-dias_decalaje = wa_dm-/dias_decalaje * ( -1 ).&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field dias_decalaje has QUAN type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 16:30:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632406#M1090899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-27T16:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632407#M1090900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;wa_ext_dm-dias_decalaje = wa_dm-/dias_decalaje * ( -1 ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a temp variable and move the temp to final wa_ext_dm-dias_decalaje&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lv_temp type p decimal 3.
lv_temp = wa_dm-/dias_decalaje * ( -1 ) 
move lv_temp to wa_ext_dm-dias_decalaje.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 16:41:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632407#M1090900</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-10-27T16:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Make type P negative</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632408#M1090901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd seen that the problem is the type of the field in the target table, it is a INT1, and the result of multiply the field by -1 is bigger than the type INT1, of course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must talk about this with my technical designer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2008 16:43:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/make-type-p-negative/m-p/4632408#M1090901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-27T16:43:46Z</dc:date>
    </item>
  </channel>
</rss>

