<?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 concatenating space character. Please help! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921277#M1331561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: v_source(10),
v_material(8),
v_space(9),
v_spec value '#',
v_spclen type i.

v_spclen = 10 - STRLEN( v_source ).
DO v_spclen TIMES.
 concatenate v_space v_spec into v_space.
ENDDO.
CONCATENATE v_source  v_material INTO v_string seprated by v_space.
translate v_string using '# '.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2009 12:08:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-24T12:08:24Z</dc:date>
    <item>
      <title>Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921273#M1331557</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 have requirement for creating fixed length data like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Source Material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I am getting source value dynamically. Max size of source in 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; But sometime it may come as 'EMS01' and sometimes 'PLTN'. That its value can be of varied length.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I need to concat Source and Material with space in between. The number of spaces in between is equal to 10 - current size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For example: If Source = 'EMS01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   then there should be 5 spaces between source and material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If  source = 'PLTN' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then there should be 6 spaces between source and material after concatenation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_source(10),&lt;/P&gt;&lt;P&gt;        v_material(8),&lt;/P&gt;&lt;P&gt;        v_space(9),&lt;/P&gt;&lt;P&gt;        v_spclen type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_spclen = 10 - STRLEN( v_source ).&lt;/P&gt;&lt;P&gt;DO v_spclen TIMES.&lt;/P&gt;&lt;P&gt;   v_space = v_space + ' '.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;CONCATENATE v_source v_space v_material INTO v_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not work because it is putting number 0 in v_space value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to resolve this? Please help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Gopal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921273#M1331557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921274#M1331558</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;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; data: v_source(10),
v_material(8),
v_space(9),
v_spclen type i.

move  v_source to v_string.
move v_material to v_string+10.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:03:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921274#M1331558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921275#M1331559</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;You can try this way...Try with offset and position..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;v_string = v_source.
v_string+10 = v_material.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: v_source(10) value 'MANT',
v_material(8) VALUE '00001'.

data v_string type char40.

CONCATENATE v_source v_material INTO v_string RESPECTING BLANKS.
WRITE:/ v_string.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921275#M1331559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921276#M1331560</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;Instead of doing a code for that you can use the addition &lt;SPAN __default_attr="Verdana" __jive_macro_name="font"&gt;RESPECTING BLANKS&lt;/SPAN&gt; with the CONCATENATE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the link for more understanding.&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="thread" id="1384668"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="thread" id="1381367"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sarves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921276#M1331560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921277#M1331561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: v_source(10),
v_material(8),
v_space(9),
v_spec value '#',
v_spclen type i.

v_spclen = 10 - STRLEN( v_source ).
DO v_spclen TIMES.
 concatenate v_space v_spec into v_space.
ENDDO.
CONCATENATE v_source  v_material INTO v_string seprated by v_space.
translate v_string using '# '.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:08:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921277#M1331561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921278#M1331562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gopal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try with the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'CONCATENATE v_source v_space v_material INTO v_string respecting blanks.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your problem. Because this statement add space of the variables(if some characters are left blank not fully occupied by the respective value) used in the concatenate statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prinan Pandit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921278#M1331562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T12:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921279#M1331563</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;Try this. It may work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;v_sep = 10 - v_source.
DATA: v_source(10),
           v_material(8),
           v_space(10) VALUE 'v_sep'.

CONCATENATE v_source v_material INTO v_string SEPARATED BY v_space.
WRITE v_string .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 12:15:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921279#M1331563</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2009-07-24T12:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with concatenating space character. Please help!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921280#M1331564</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;Try This.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_source(10),&lt;/P&gt;&lt;P&gt;       v_material(8),&lt;/P&gt;&lt;P&gt;       v_space(9),&lt;/P&gt;&lt;P&gt;       v_string(255) type c,&lt;/P&gt;&lt;P&gt;       v_spclen type i,&lt;/P&gt;&lt;P&gt;        v_spclen1 type i.            * Delcare  one more variable. This will contain Length of field  v_string after assign V_source to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_spclen = 10 - STRLEN( v_source ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; v_string = V_source.&lt;/P&gt;&lt;P&gt; CONDENSE v_string.&lt;/P&gt;&lt;P&gt; v_spclen1 =  STRLEN( v_string ).&lt;/P&gt;&lt;P&gt; v_spclen1 = v_spclen1 + v_spclen.   *   I have Added v_spclen1 and v_spclen to get exact position from where i will add v_material&lt;/P&gt;&lt;P&gt; v_string+v_spclen1 = v_material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    write v_string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ShreeMohan Pugalia on Jul 24, 2009 3:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2009 13:09:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-concatenating-space-character-please-help/m-p/5921280#M1331564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-24T13:09:49Z</dc:date>
    </item>
  </channel>
</rss>

