<?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: Inserting field separator in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266607#M1018089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: len type i,&lt;/P&gt;&lt;P&gt;        var1 and var2 and var3 of type value1.2.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define itab_final also of type itab.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( value1).&lt;/P&gt;&lt;P&gt;var1 = value1+9.&lt;/P&gt;&lt;P&gt;var2 = value+9(len).&lt;/P&gt;&lt;P&gt;concatenate var1 '~' var2  into var3.&lt;/P&gt;&lt;P&gt;itab_final-value1 = var3.&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear : len, var1,var2, var3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( value2).&lt;/P&gt;&lt;P&gt;var1 = value2+9.&lt;/P&gt;&lt;P&gt;var2 = value2+9(len).&lt;/P&gt;&lt;P&gt;concatenate var1 '~' var2  into var3.&lt;/P&gt;&lt;P&gt;itab_final-value2 = var3.&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear : len, var1,var2, var3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( value3).&lt;/P&gt;&lt;P&gt;var1 = value3+9.&lt;/P&gt;&lt;P&gt;var2 = value3+9(len).&lt;/P&gt;&lt;P&gt;concatenate var1 '~' var2  into var3.&lt;/P&gt;&lt;P&gt;itab_final-value3 = var3.&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear : len, var1,var2, var3.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will help u .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Aug 2008 09:52:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-13T09:52:12Z</dc:date>
    <item>
      <title>Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266600#M1018082</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;      This is my internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of i_final occurs 0,&lt;/P&gt;&lt;P&gt;          value1 type char10,&lt;/P&gt;&lt;P&gt;          value2 type char20,&lt;/P&gt;&lt;P&gt;          value3 type char30,&lt;/P&gt;&lt;P&gt;       end of i_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These fields have the following values in them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          value1 = abc.&lt;/P&gt;&lt;P&gt;          value2 = defghijkl.&lt;/P&gt;&lt;P&gt;          value3 = pqrstuv         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I should insert '~' symbol as the separator. But I have to insert the symbol&lt;/P&gt;&lt;P&gt;at the last position of its total length i.e for&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;          value1 --&amp;gt; I have to insert at 10th position.&lt;/P&gt;&lt;P&gt;          value2 --&amp;gt; I have to insert at 20th position.&lt;/P&gt;&lt;P&gt;          value3 --&amp;gt; I have to insert at 30th position.&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>Wed, 13 Aug 2008 09:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266600#M1018082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266601#M1018083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii,&lt;/P&gt;&lt;P&gt;   use concatinate this symbol .but for placing this symbol give space like that '     '.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;jatin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266601#M1018083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266602#M1018084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii&lt;/P&gt;&lt;P&gt;calculate length first for every field .&lt;/P&gt;&lt;P&gt;give this in space.&lt;/P&gt;&lt;P&gt;length = strlen(value1) &lt;/P&gt;&lt;P&gt;do length-1.&lt;/P&gt;&lt;P&gt;use concatenate value1 ' ' into field1.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;concatenate field1 '~' into value.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pardeep kumar on Aug 13, 2008 3:04 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pardeep kumar on Aug 13, 2008 3:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266602#M1018084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266603#M1018085</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 CONCATENATE value1 value2 value3 INTO finalfield SEPARATED BY '~' RESPECTING BLANKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohaiyuddin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266603#M1018085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266604#M1018086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello mohd. Aslam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try string operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
i_final-value1+10 = '~'.

i_final-value2+20 = '~'.

i_final-value3+30 = '~'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE does not take into account the trailing blanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;SUhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266604#M1018086</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-08-13T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266605#M1018087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT var BY 1 PLACES RIGHT.&lt;/P&gt;&lt;P&gt;var(1) = '~'.&lt;/P&gt;&lt;P&gt;SHIFT var BY 1 PLACES LEFT CIRCULAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266605#M1018087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266606#M1018088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aslam ,&lt;/P&gt;&lt;P&gt;       First u have to find the length of th string .&lt;/P&gt;&lt;P&gt;       then add the empty space for the string , at the end of the string concatenate the "~" operator .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Ex .. strlen( a ) .&lt;/P&gt;&lt;P&gt;            concatenate  a '      ~'  into a .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:43:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266606#M1018088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266607#M1018089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data: len type i,&lt;/P&gt;&lt;P&gt;        var1 and var2 and var3 of type value1.2.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define itab_final also of type itab.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( value1).&lt;/P&gt;&lt;P&gt;var1 = value1+9.&lt;/P&gt;&lt;P&gt;var2 = value+9(len).&lt;/P&gt;&lt;P&gt;concatenate var1 '~' var2  into var3.&lt;/P&gt;&lt;P&gt;itab_final-value1 = var3.&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear : len, var1,var2, var3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( value2).&lt;/P&gt;&lt;P&gt;var1 = value2+9.&lt;/P&gt;&lt;P&gt;var2 = value2+9(len).&lt;/P&gt;&lt;P&gt;concatenate var1 '~' var2  into var3.&lt;/P&gt;&lt;P&gt;itab_final-value2 = var3.&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear : len, var1,var2, var3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len = strlen( value3).&lt;/P&gt;&lt;P&gt;var1 = value3+9.&lt;/P&gt;&lt;P&gt;var2 = value3+9(len).&lt;/P&gt;&lt;P&gt;concatenate var1 '~' var2  into var3.&lt;/P&gt;&lt;P&gt;itab_final-value3 = var3.&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear : len, var1,var2, var3.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will help u .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 09:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266607#M1018089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T09:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting field separator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266608#M1018090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohamed,&lt;/P&gt;&lt;P&gt;I created this sample code, I think it works for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS: abap.

data: begin of i_final occurs 0,
value1 type char10,
value2 type char20,
value3 type char30,
end of i_final.

DATA:  
        ls_components             TYPE abap_compdescr_tab,
        lo_strucdescr             TYPE REF TO cl_abap_structdescr,
        lv_abap_comp              TYPE abap_compdescr.  "work area for the ls_components table, that provides the name of the field, as one of the components.


FIELD-SYMBOLS: &amp;lt;fs&amp;gt; TYPE ANY.


  lo_strucdescr ?= cl_abap_typedescr=&amp;gt;describe_by_data( i_final ).
  ls_components = lo_strucdescr-&amp;gt;components.

i_final-value1 = 'abc'.
i_final-value2 = 'defghijkl'.
i_final-value3 = 'pqrstuv'.

LOOP AT ls_components INTO lv_abap_comp.
  ASSIGN lv_abap_comp-name TO &amp;lt;fs&amp;gt;.
  CONCATENATE 'i_final-' &amp;lt;fs&amp;gt; INTO &amp;lt;fs&amp;gt;.
  ASSIGN (&amp;lt;fs&amp;gt;) TO &amp;lt;fs&amp;gt;.
  CONCATENATE &amp;lt;fs&amp;gt; '~' INTO &amp;lt;fs&amp;gt;.
ENDLOOP.

WRITE:/ i_final-value1,
        i_final-value2,
        i_final-value3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2008 10:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-field-separator/m-p/4266608#M1018090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-13T10:14:47Z</dc:date>
    </item>
  </channel>
</rss>

