<?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: cl_document_bcs=&amp;gt;create_document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717777#M1579700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you send the content as text, simply wrapp your data with html &lt;STRONG&gt;&amp;lt;table&amp;gt;&lt;/STRONG&gt; tag. This way formating of columns can be controlled by means of tag attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Mar 2011 18:54:45 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2011-03-21T18:54:45Z</dc:date>
    <item>
      <title>cl_document_bcs=&gt;create_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717776#M1579699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using create_document method to send email that comprises of listing internal table as email body. However since the data of internal table varies in length the formatting does not look good. Is there a way to achieve the output in a table format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;|Plant|Material           |Description                      |Batch     &lt;/P&gt;&lt;P&gt;|ABCD|MAT1              |Descritption1234           |BATCH1&lt;/P&gt;&lt;P&gt;|ABCD|MAT1              |Descritption1             |BATCH2   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 18:47:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717776#M1579699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-21T18:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: cl_document_bcs=&gt;create_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717777#M1579700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you send the content as text, simply wrapp your data with html &lt;STRONG&gt;&amp;lt;table&amp;gt;&lt;/STRONG&gt; tag. This way formating of columns can be controlled by means of tag attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 18:54:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717777#M1579700</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-03-21T18:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: cl_document_bcs=&gt;create_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717778#M1579701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick reply. I looked at the documenation but was not much of help. &lt;/P&gt;&lt;P&gt;Appreciate if you can copy a small example which can help me understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 19:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717778#M1579701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-21T19:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: cl_document_bcs=&gt;create_document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717779#M1579702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some draft&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data body type string.
data l_htmlext type soli_tab,

"create html format string
concatenate body '&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;table&amp;gt;' into body.

loop at itab1.
  "here add table content within rows (&amp;lt;tr&amp;gt;) and cells (&amp;lt;td&amp;gt;)
  concatenate body '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' itab1-field1 '&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' itab1-field2 '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;' into body.
endloop.
"close table
concatenate body '&amp;lt;/table&amp;gt;' into body.

"here add your other tables
"...

"now close html format
concatenate body '&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;' into body.

"transfer to table type
call function 'SCMS_STRING_TO_FTEXT'
exporting text = body tables ftext_tab = l_htmltext.

"Set your document to accept html body 
document = cl_document_bcs=&amp;gt;create_document( i_type = 'HTM'
                                     i_text = l_htmltext  ... ).
                                     
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 11:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-document-bcs-gt-create-document/m-p/7717779#M1579702</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-03-22T11:10:46Z</dc:date>
    </item>
  </channel>
</rss>

