<?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: html document ... button in am html table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722730#M1108858</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should put the button column in the Line with layout. &lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call method form1-&amp;gt;line_with_layout exporting start = 'X'.

* logic for button
*...

   call method form1-&amp;gt;line_with_layout exporting end = 'X'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check report DD_ADD_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naimesh Patel on Nov 7, 2008 10:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Nov 2008 16:38:46 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2008-11-07T16:38:46Z</dc:date>
    <item>
      <title>html document ... button in am html table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722729#M1108857</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;I have been exploring the dd classes for some days now. I have a persistent problem which I can not find a way of resolving. I create an html table into which I want to put text and buttons. If for every column I only put in text, then the alignement is quite acceptable. That is the height of the cells are commensurate with the height of the text, or there does not appear to be any padding in the cells above or elow the texts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to add a button I first add a form area in the column which will contain the button. This works fine but then the height of the cell is no longer just the height of the button. I have tried the methods NO_LINEBREAK( start = 'X' ) and NO_LINEBREAK( end = 'X' ) at the begining and end of the column, that is before going to the next column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has the effect of removing the first break only, so the top of the button is just below the cell top but the bottom of the button is one line break away from the bottom of the cell. So it would appear that a for area always ends with a line break.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way I found to almost do this is to assign 'X' to the attribute line_with_layout. Which should not be done and adds a column to the table anyway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how do I make a cell with the same height as the button taht is inside it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Surely there is some simple method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 15:38:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722729#M1108857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T15:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: html document ... button in am html table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722730#M1108858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should put the button column in the Line with layout. &lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call method form1-&amp;gt;line_with_layout exporting start = 'X'.

* logic for button
*...

   call method form1-&amp;gt;line_with_layout exporting end = 'X'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check report DD_ADD_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naimesh Patel on Nov 7, 2008 10:39 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 16:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722730#M1108858</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-11-07T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: html document ... button in am html table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722731#M1108859</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;Let me send the code snippets. I have tried all that is available. Either there is something missing or I am doing this wrong :&lt;/P&gt;&lt;P&gt;This first snippets works the best but adds two extra columns after each button. with lv_button = 2 this produces four columns even though I only created for 2.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create the table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD gobj_html_doc-&amp;gt;add_table&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      no_of_columns               = lv_columns&lt;/P&gt;&lt;P&gt;      width                       = '100%'&lt;/P&gt;&lt;P&gt;      cell_background_transparent = 'X'&lt;/P&gt;&lt;P&gt;      border                      = '0'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      table                       = lv_table_element&lt;/P&gt;&lt;P&gt;      tablearea                   = lv_table_area.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add columns&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO lv_columns TIMES.&lt;/P&gt;&lt;P&gt;    lv_width = lv_i MOD 2.&lt;/P&gt;&lt;P&gt;    IF lv_mod EQ 0.&lt;/P&gt;&lt;P&gt;      lv_str = '30%'.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      lv_str = '70%'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    ADD 1 TO lv_i.&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_table_element-&amp;gt;add_column&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        width  = lv_width&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        column = lv_column.&lt;/P&gt;&lt;P&gt;    APPEND lv_column TO lt_column.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add buttons&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT lt_column INTO lv_column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_column-&amp;gt;add_form&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        formarea = lv_form_area.&lt;/P&gt;&lt;P&gt;    lv_form_area-&amp;gt;is_line_with_layout = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_form_area-&amp;gt;add_button&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        sap_icon = 'ICON_CHANGE'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        button   = lobj_button.&lt;/P&gt;&lt;P&gt;     CALL METHOD lv_table_element-&amp;gt;new_row.&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;&lt;/P&gt;&lt;P&gt;the following does not work either but no extrra columns are added.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add buttons&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT lt_column INTO lv_column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_column-&amp;gt;add_form&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        formarea = lv_form_area.&lt;/P&gt;&lt;P&gt;    lv_form_area-&amp;gt;line_with_layout( start = 'X' ).&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_form_area-&amp;gt;add_button&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        sap_icon = 'ICON_CHANGE'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        button   = lobj_button.&lt;/P&gt;&lt;P&gt;     CALL METHOD lv_table_element-&amp;gt;new_row.&lt;/P&gt;&lt;P&gt;     lv_form_area-&amp;gt;line_with_layout( end = 'X' ).&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;and the folling does not help much either.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add buttons&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT lt_column INTO lv_column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_column-&amp;gt;add_form&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        formarea = lv_form_area.&lt;/P&gt;&lt;P&gt;    lv_form_area-&amp;gt;no_line_break( start = 'X' ).&lt;/P&gt;&lt;P&gt;    CALL METHOD lv_form_area-&amp;gt;add_button&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        sap_icon = 'ICON_CHANGE'&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        button   = lobj_button.&lt;/P&gt;&lt;P&gt;     CALL METHOD lv_table_element-&amp;gt;new_row.&lt;/P&gt;&lt;P&gt;     lv_form_area-&amp;gt;no_line_with_layout( end = 'X' ).&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;all I can tell is that there is always a &amp;lt;br&amp;gt; token at the end of the form area. Perhaps the answer is to redefine the method in a derived class? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have more ideas I am certainly opened to them ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2008 17:17:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/html-document-button-in-am-html-table/m-p/4722731#M1108859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-07T17:17:52Z</dc:date>
    </item>
  </channel>
</rss>

