<?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 include space between two variables from internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499812#M1258081</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 an internal table with 4 fields with values for a b c d , i have to arrange them in the specific order so that i can download all the data in a text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first 3 variables are already arranged , the format is a bc, but the var d should be put in a specific positon after predefined spaces from var c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer below for the sample of of the output text file. In this example:&lt;/P&gt;&lt;P&gt;a = A20N&lt;/P&gt;&lt;P&gt;b = 7227802&lt;/P&gt;&lt;P&gt;c = 0300207&lt;/P&gt;&lt;P&gt;d = 010109&lt;/P&gt;&lt;P&gt;Space between c &amp;amp; d is determined by a POS variable in internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a        b         c                                          d&lt;/STRONG&gt;                        &lt;/P&gt;&lt;P&gt;A20N 72278020300207                               010109	&lt;/P&gt;&lt;P&gt;A20A 72278020300207        21	&lt;/P&gt;&lt;P&gt;A20N 72278020300207	     2511100	&lt;/P&gt;&lt;P&gt;A21F 72278020300207        Van Capellen	&lt;/P&gt;&lt;P&gt;A21G 72278020300207	   Tim	&lt;/P&gt;&lt;P&gt;A20E 72278020300207	               1	&lt;/P&gt;&lt;P&gt;A20T 72278020300207        2	&lt;/P&gt;&lt;P&gt;A20T 72278020300207                    	                          1	&lt;/P&gt;&lt;P&gt;A20E 72278020300207               	01	&lt;/P&gt;&lt;P&gt;A20E 72278020300207	                   Vilvoorde	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help me out as i have to resolve this as soon as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Apr 2009 08:18:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-11T08:18:51Z</dc:date>
    <item>
      <title>include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499812#M1258081</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 an internal table with 4 fields with values for a b c d , i have to arrange them in the specific order so that i can download all the data in a text file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the first 3 variables are already arranged , the format is a bc, but the var d should be put in a specific positon after predefined spaces from var c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer below for the sample of of the output text file. In this example:&lt;/P&gt;&lt;P&gt;a = A20N&lt;/P&gt;&lt;P&gt;b = 7227802&lt;/P&gt;&lt;P&gt;c = 0300207&lt;/P&gt;&lt;P&gt;d = 010109&lt;/P&gt;&lt;P&gt;Space between c &amp;amp; d is determined by a POS variable in internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a        b         c                                          d&lt;/STRONG&gt;                        &lt;/P&gt;&lt;P&gt;A20N 72278020300207                               010109	&lt;/P&gt;&lt;P&gt;A20A 72278020300207        21	&lt;/P&gt;&lt;P&gt;A20N 72278020300207	     2511100	&lt;/P&gt;&lt;P&gt;A21F 72278020300207        Van Capellen	&lt;/P&gt;&lt;P&gt;A21G 72278020300207	   Tim	&lt;/P&gt;&lt;P&gt;A20E 72278020300207	               1	&lt;/P&gt;&lt;P&gt;A20T 72278020300207        2	&lt;/P&gt;&lt;P&gt;A20T 72278020300207                    	                          1	&lt;/P&gt;&lt;P&gt;A20E 72278020300207               	01	&lt;/P&gt;&lt;P&gt;A20E 72278020300207	                   Vilvoorde	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help me out as i have to resolve this as soon as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 08:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499812#M1258081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T08:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499813#M1258082</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;How to calculate POS ?&lt;/P&gt;&lt;P&gt;Do you want place each row of internal table in to the string ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using Posotion and Offset this might help you ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 08:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499813#M1258082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T08:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499814#M1258083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not calculating POS , that i have in my internal table . for every variable i have the POS.&lt;/P&gt;&lt;P&gt;plz explain me how to use offset and position.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for reply..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 08:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499814#M1258083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T08:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499815#M1258084</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;Check this code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA l_string TYPE char100.
DATA : l_data1 TYPE char4 VALUE 'Test'.
DATA : l_data2 TYPE char10 VALUE '10000'.
DATA l_pos TYPE i VALUE 10.

l_string = l_data1.
l_string+l_pos =  l_data2.  " l_pos is the position value from where l_date2 is started.
WRITE l_string.

Output:
Test      10000
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 08:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499815#M1258084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T08:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499816#M1258085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why dont you create one more internal table that has all the four a b c d ..&lt;/P&gt;&lt;P&gt;Also it has all three combined in one field in the way you want it to be..&lt;/P&gt;&lt;P&gt;ie using the pos condition determine the space and then concatenate in one variable.&lt;/P&gt;&lt;P&gt;does pos define the space between c and d then you can do this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;concatenate a b c into e separated by space.
len = strlen( e ).  
len = len + pos.   " this will give the exact offset.
lend = strlen( e ).  " this defines lenght of e
e+len(lend) = d.
write: e.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now the field e contains your thing to be displayed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lalit Mohan Gupta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 08:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499816#M1258085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T08:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499817#M1258086</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 a lott...it worked ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 09:34:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499817#M1258086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T09:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499818#M1258087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;use concatenate like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
date: text(50).
loop at itab. 
CONCATENATE  itab-a  itab-b  itab-c  itab-c  INTO text SEPARATED BY SPACE .
write: text. 
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will work&lt;/P&gt;&lt;P&gt;your output will be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text = A202 0875467 885548 0098765&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appeciate and give mark if  it works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt; Prashant Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 09:39:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499818#M1258087</guid>
      <dc:creator>former_member459142</dc:creator>
      <dc:date>2009-04-11T09:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: include space between two variables from internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499819#M1258088</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;Check this sample code using offsets, and modify as per ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : L1 TYPE I.&lt;/P&gt;&lt;P&gt;DATA : L2 TYPE I.&lt;/P&gt;&lt;P&gt;DATA : L3 TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;       A(30) TYPE C,&lt;/P&gt;&lt;P&gt;       B(30) TYPE C,&lt;/P&gt;&lt;P&gt;       C(30) TYPE C,&lt;/P&gt;&lt;P&gt;       D(30) TYPE C,&lt;/P&gt;&lt;P&gt;       POS(2) TYPE C,&lt;/P&gt;&lt;P&gt;       END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : TEXT(120) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ITAB-A = 'ABC'.&lt;/P&gt;&lt;P&gt;  ITAB-B = 'IND'.&lt;/P&gt;&lt;P&gt;  ITAB-C = 'CATOR'.&lt;/P&gt;&lt;P&gt;  ITAB-D = 'FINAL'.&lt;/P&gt;&lt;P&gt;  ITAB-POS = '3'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND ITAB.&lt;/P&gt;&lt;P&gt;  CLEAR ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    L1 = STRLEN( ITAB-A ).&lt;/P&gt;&lt;P&gt;    L2 = STRLEN( ITAB-B ).&lt;/P&gt;&lt;P&gt;    L3 = STRLEN( ITAB-C ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TEXT = ITAB-A.&lt;/P&gt;&lt;P&gt;    L1 = L1 + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TEXT+L1 = ITAB-B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    L1 = L1 + L2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TEXT+L1 = ITAB-C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    L1 = L1 + L3 + ITAB-POS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TEXT+L1 = ITAB-D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR L1.&lt;/P&gt;&lt;P&gt;    CLEAR L2.&lt;/P&gt;&lt;P&gt;    CLEAR L3.&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;  WRITE : TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Apr 2009 09:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/include-space-between-two-variables-from-internal-table/m-p/5499819#M1258088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-11T09:51:18Z</dc:date>
    </item>
  </channel>
</rss>

