<?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: Dinamically set variable without decimal values in smartforms in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885274#M1325573</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;&lt;/P&gt;&lt;P&gt;   define your field in character format  which you want to show in smartform &lt;/P&gt;&lt;P&gt;   assign that value in charactr field and can check before assigning that if price value is zero then assign nulll to character field &lt;/P&gt;&lt;P&gt;or when  not Zero then assign that value in same decimal format to character field .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Redards&lt;/P&gt;&lt;P&gt;Deepak .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2009 11:46:30 GMT</pubDate>
    <dc:creator>deepak_dhamat</dc:creator>
    <dc:date>2009-07-15T11:46:30Z</dc:date>
    <item>
      <title>Dinamically set variable without decimal values in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885272#M1325571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I wish to display a price in a smartforms with decimal or not values, depending on a condition on a field of an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I have this code in my smartforms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA l_ret_price TYPE komv-kwert.&lt;/P&gt;&lt;P&gt;  l_ret_price = gwa_komv-kwert.&lt;/P&gt;&lt;P&gt;  WRITE gwa_komv-kwert TO gv_ret_price CURRENCY rte014-currency&lt;/P&gt;&lt;P&gt;        LEFT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my smartforms cell I have &amp;amp;gv_ret_price&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find that setting &amp;amp;gv_ret_price(.0)&amp;amp; I can avoid decimal values This is right for a first case but I need the possibility tu have or nor decimal values. Haw can I set this condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can define a global variable and change the previous variable gv_ret_price but how can I set (.0) or not on a condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be well appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        Giovanni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885272#M1325571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T11:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamically set variable without decimal values in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885273#M1325572</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;Use The condition In smartform for displaying the decimals or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;kamath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885273#M1325572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamically set variable without decimal values in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885274#M1325573</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;&lt;/P&gt;&lt;P&gt;   define your field in character format  which you want to show in smartform &lt;/P&gt;&lt;P&gt;   assign that value in charactr field and can check before assigning that if price value is zero then assign nulll to character field &lt;/P&gt;&lt;P&gt;or when  not Zero then assign that value in same decimal format to character field .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Redards&lt;/P&gt;&lt;P&gt;Deepak .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885274#M1325573</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2009-07-15T11:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamically set variable without decimal values in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885275#M1325574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA l_ret_price TYPE komv-kwert.
DATA: var TYPE i.
DATA: w_decflag TYPE i.

l_ret_price = gwa_komv-kwert.
WRITE gwa_komv-kwert TO gv_ret_price CURRENCY rte014-currency
LEFT-JUSTIFIED.

var = FRAC( gv_ret_price ).

IF var IS NOT INITIAL " Implies that there is a value at the decimal part

   w_decflag = 1.

ELSE

    w_decflag = 0.

ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the above part of code and see if the same helps .. In the Cell you may check based on the w_decflag that you have set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885275#M1325574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-15T11:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dinamically set variable without decimal values in smartforms</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885276#M1325575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA l_ret_price TYPE komv-kwert.
data wwdecimals type i.
IF (your_condition)
  wwdecimals = 2.
ELSE.
  wwdecimals = 0.
ENDIF.
l_ret_price = gwa_komv-kwert.
WRITE gwa_komv-kwert TO gv_ret_price CURRENCY rte014-currency DECIMALS wwdecimals
LEFT-JUSTIFIED.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dinamically-set-variable-without-decimal-values-in-smartforms/m-p/5885276#M1325575</guid>
      <dc:creator>former_member194797</dc:creator>
      <dc:date>2009-07-15T11:55:41Z</dc:date>
    </item>
  </channel>
</rss>

