<?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: Add table lines to a string including the null values. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572736#M22365</link>
    <description>&lt;P&gt;OK. When I used RESPECTING BLANKS, it didn't even concatenate the fields with values. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84509-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84508-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;Now I am using offset to leave the space since concatenate option not working.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 13:55:26 GMT</pubDate>
    <dc:creator>former_member300258</dc:creator>
    <dc:date>2017-11-07T13:55:26Z</dc:date>
    <item>
      <title>Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572726#M22355</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I had to ask this after I did a wide search. &lt;/P&gt;
  &lt;P&gt;I am trying to add a table line especially the values of all the key fields into a string. for example, my table has 3 key fields&lt;/P&gt;
  &lt;P&gt;MANDT | KEY1(length-5)|KEY2(length-3) &lt;/P&gt;
  &lt;P&gt;100| |10&lt;/P&gt;
  &lt;P&gt;100|10023|10&lt;/P&gt;
  &lt;P&gt;i expect to have the result as '100 10' and '1001002310'.&lt;/P&gt;
  &lt;P&gt;For the 1st entry, between value 100 and 10, i need a space of 5 characters as the length of field KEY1&lt;/P&gt;
  &lt;P&gt;I couldn't make it with the option of concatenation. is there any other easy way other than setting by offset.&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 15:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572726#M22355</guid>
      <dc:creator>former_member300258</dc:creator>
      <dc:date>2017-11-06T15:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572727#M22356</link>
      <description>&lt;P&gt;CONCATENATE charfield1 charfield2 charfield3 INTO result &lt;STRONG&gt;RESPECTING BLANKS&lt;/STRONG&gt; SEPARATED BY '|'&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:38:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572727#M22356</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-06T16:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572728#M22357</link>
      <description>&lt;P&gt;Use RESPECTING BLANKS&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapconcatenate.htm"&gt;https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapconcatenate.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 16:40:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572728#M22357</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-06T16:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572729#M22358</link>
      <description>&lt;P&gt;Thanks for the reply Horst. I tried but no luck.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 17:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572729#M22358</guid>
      <dc:creator>former_member300258</dc:creator>
      <dc:date>2017-11-06T17:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572730#M22359</link>
      <description>&lt;P&gt;'Respecting blanks' addition in concatenate statement will work. It will add the space.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 05:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572730#M22359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-07T05:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572731#M22360</link>
      <description>Try again:
  &lt;PRE&gt;&lt;CODE&gt;DATA firstfield(4) VALUE 'A'.
DATA secondfield(4) VALUE 'B'.
DATA result TYPE string.
CONCATENATE firstfield secondfield INTO result RESPECTING BLANKS SEPARATED BY '|'.
ASSERT result = `A   |B   `.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2017 05:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572731#M22360</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-07T05:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572732#M22361</link>
      <description>&lt;P&gt;Not a question of luck ...&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 06:41:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572732#M22361</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-11-07T06:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572733#M22362</link>
      <description>&lt;P&gt;"No luck" is not really a good description of what has not worked. What would be a good description is&lt;/P&gt;
  &lt;P&gt;What you tried.&lt;/P&gt;
  &lt;P&gt;The results you got&lt;/P&gt;
  &lt;P&gt;The results you wanted.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 07:36:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572733#M22362</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-11-07T07:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572734#M22363</link>
      <description>&lt;P&gt;The words "null value" are misleading, as it often refers to the Unicode "NULL" character U+0000.&lt;/P&gt;
  &lt;P&gt;You are of course talking about the &lt;STRONG&gt;space character&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 07:58:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572734#M22363</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-07T07:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572735#M22364</link>
      <description>&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/83460-m6bdp.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/83461-iguts.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Respecting blanks works. &lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 10:42:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572735#M22364</guid>
      <dc:creator>Sathya_Gunasekaran</dc:creator>
      <dc:date>2017-11-07T10:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572736#M22365</link>
      <description>&lt;P&gt;OK. When I used RESPECTING BLANKS, it didn't even concatenate the fields with values. &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84509-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/84508-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;Now I am using offset to leave the space since concatenate option not working.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 13:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572736#M22365</guid>
      <dc:creator>former_member300258</dc:creator>
      <dc:date>2017-11-07T13:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572737#M22366</link>
      <description>&lt;P&gt;For me this has worked. But I only put the data into a string variable. Maybe something is wrong with your data declaration of 'ls_object_key'? How does it look like?&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DATA: lo_struct  TYPE REF TO cl_abap_structdescr,
      lv_tabname TYPE tabname16,
      lt_comp1   TYPE ddfields,
      ls_comp1   TYPE dfies,
      lv_string  TYPE string,
      lt_table   TYPE TABLE OF [tablename],
      ls_struc   TYPE [tablename].
FIELD-SYMBOLS: &amp;lt;fs_tab&amp;gt;   TYPE table,
               &amp;lt;fs_struc&amp;gt; TYPE any,
               &amp;lt;fs_comp&amp;gt;.
lv_tabname = '[tablename]'.
SELECT * FROM (lv_tabname) INTO TABLE lt_table.
ASSIGN lt_table TO &amp;lt;fs_tab&amp;gt;.
ASSIGN ls_struc TO &amp;lt;fs_struc&amp;gt;.
lo_struct ?= cl_abap_elemdescr=&amp;gt;describe_by_name( lv_tabname ).
lt_comp1 = lo_struct-&amp;gt;get_ddic_field_list( ).
LOOP AT &amp;lt;fs_tab&amp;gt; INTO &amp;lt;fs_struc&amp;gt;.
  LOOP AT lt_comp1 INTO ls_comp1 WHERE keyflag = 'X'.
    ASSIGN COMPONENT ls_comp1-fieldname OF STRUCTURE &amp;lt;fs_struc&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
    CONCATENATE lv_string &amp;lt;fs_comp&amp;gt;
    INTO
    lv_string RESPECTING BLANKS.
  ENDLOOP.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2017 15:07:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572737#M22366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-11-07T15:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add table lines to a string including the null values.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572738#M22367</link>
      <description>&lt;P&gt;Thanks Daniel. It is working now after I use a string to concatenate and move to em to ls_object_key-tabkey which is a character. Thanks to Horst as well. Closing the thread.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 15:47:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-table-lines-to-a-string-including-the-null-values/m-p/572738#M22367</guid>
      <dc:creator>former_member300258</dc:creator>
      <dc:date>2017-11-07T15:47:24Z</dc:date>
    </item>
  </channel>
</rss>

