<?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: Problem with DEC data type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229603#M1380396</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;As Rainer suggested, if you as a string variable before concatenation, the space for + will be considered. Just try executing this sample code and check if you are getting the space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: char type decfloat34,
      char1 type decfloat34,
      var type string,
      var1 type string,
      var3 type string.

char = '-1245.34'.
char1 = '12312.34'.
var1 = char.
var3 = char1.
concatenate var3 var1 into var.
write: var.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2009 09:33:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-19T09:33:15Z</dc:date>
    <item>
      <title>Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229600#M1380393</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;Problem with the DEC data type, for the -ve values the field contains the -ve sign but for the +ve values it is not storing the space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im concatenating couple of fields and one of the field is of DEC type. So my requirement is that when this DEC type field is at the end of the line then it is not storing the space for +ve values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f1 type DEC value is 1.002- and 1.50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when this field is at the last during concatenation, it avoids space after the value 1.50 which normally contains 1.50 (1 space).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get this space in my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;rohith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 06:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229600#M1380393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T06:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229601#M1380394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Spaces at the end of a character variable are always ignored by the system. Use strings instead. [Read this about characters versus strings|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/15889] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 08:02:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229601#M1380394</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-19T08:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229602#M1380395</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;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For getting the data from db tables, i have used the same data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that i have declared one string variable to concatenate all the fields. Now, here if the field contains decimal values with sign then blank is ignored for +ve values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex: concatenate f1&lt;/P&gt;&lt;P&gt;                f2&lt;/P&gt;&lt;P&gt;                f3 into wa_string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now f3 contains +ve and -ve values. so, finally in wa_string it doesn't contains the blank space which is requird for the f3 field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you understood my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;rohith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 09:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229602#M1380395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T09:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229603#M1380396</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;As Rainer suggested, if you as a string variable before concatenation, the space for + will be considered. Just try executing this sample code and check if you are getting the space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: char type decfloat34,
      char1 type decfloat34,
      var type string,
      var1 type string,
      var3 type string.

char = '-1245.34'.
char1 = '12312.34'.
var1 = char.
var3 = char1.
concatenate var3 var1 into var.
write: var.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 09:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229603#M1380396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T09:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229604#M1380397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If f3 is a character string its clear because you dont have s space at the end. Why didnt you read the blog?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 12:12:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229604#M1380397</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-19T12:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229605#M1380398</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;F3 is not a character string, its a DEC data type. As per the ex given by vikranth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: char type decfloat34,&lt;/P&gt;&lt;P&gt;      char1 type decfloat34,&lt;/P&gt;&lt;P&gt;      var type string,&lt;/P&gt;&lt;P&gt;      var1 type string,&lt;/P&gt;&lt;P&gt;      var3 type string.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;char = '-1245.34'.&lt;/P&gt;&lt;P&gt;char1 = '+12312.34'.  (here + sign is replaced by a blank space)&lt;/P&gt;&lt;P&gt;var1 = char.&lt;/P&gt;&lt;P&gt;var3 = char1. ( i require the value and the blank space)&lt;/P&gt;&lt;P&gt;concatenate var3 var1 into var.&lt;/P&gt;&lt;P&gt;write: var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, i require concatenate var1 var3 into var. finally in var i would get only 1245.34- 12312.34. Here after 12312.34 blank space should come but that is not coming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guess you got my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;rohith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229605#M1380398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-19T14:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229606#M1380399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But why dont you read the answers.... just transfer dec to a string an concatenate afterwards... but this was said already...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only in strings trailing characters are taken in affect!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229606#M1380399</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-19T14:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229607#M1380400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rainer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your blog elucidates the technique perfectly, but the OP does not want to take the pains of reading it &amp;amp; wants ready-made code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways thanks for the blog, well done !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 14:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229607#M1380400</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-10-19T14:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229608#M1380401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rainer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you think i haven't done this small piece of testing ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have moved these two variables f1 f2 into a string, then i have concatenated both the variables into another string s1. My problem is like the last variable i.e. f2 doens't hold trailing space at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i concatenate S1 '|' into S2 then f2 holds the blank space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to avoid the second step, so my requirement is like in the first concatenation only i need to get the blank space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi suhas&lt;/P&gt;&lt;P&gt;( I have done R&amp;amp;D then only i had posted this thread).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;rohith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 05:53:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229608#M1380401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T05:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229609#M1380402</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;A variable declared of the type DEC will hold the space for the sign only at the last postion of the string and not at the first postition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when a negative value will be stored as &lt;STRONG&gt;1245.34-&lt;/STRONG&gt; and a postive value will be stored as &lt;STRONG&gt;12312.34+&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you concatenate negative and postive value you will get &lt;STRONG&gt;1245.34-12312.34&lt;/STRONG&gt; (space included at the end). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats why in the sample i mention concatenate positive value and negative value to verify the space. The result will be &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12312.34 1245.34-&lt;/STRONG&gt; (Space after the postive value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you are clear now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:11:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229609#M1380402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T06:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229610#M1380403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You only put such effort into avoiding one intermediate step?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read my blog again until you understand why spaces at the end of a character differs completly from spaces at the end of a string. You cant avoid doing additional steps mixing up chars and strings.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 06:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229610#M1380403</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-20T06:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229611#M1380404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikranth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is wht im saying..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you concatenate negative and postive value you will get &lt;STRONG&gt;1245.34-12312.34&lt;/STRONG&gt; (space included at the end). Here you won't get any space at the end (plz check).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if it is like &lt;STRONG&gt;12312.34 1245.34-&lt;/STRONG&gt; then you will get space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i assume is that the blank space will be considered only when the field is not at the end of the line. If it is at the end then blank space will be ignored no matter if it is string or char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;rohith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2009 07:47:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229611#M1380404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-20T07:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with DEC data type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229612#M1380405</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;Any solution regarding the query which i had raised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;rohith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 05:09:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-dec-data-type/m-p/6229612#M1380405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-27T05:09:56Z</dc:date>
    </item>
  </channel>
</rss>

