<?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>Question Re: Dynamic Selection screen with checkbox on WebDynpro View in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435961#M60752</link>
    <description>&lt;P&gt;You could create the checkboxes dynamically with your WDR_SELECT_OPTIONS. Probably easier. Or create another usage for WDR_SELECT_OPTIONS, and add the checkboxes as parameters within that.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 12:51:57 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2017-07-25T12:51:57Z</dc:date>
    <item>
      <title>Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaq-p/435957</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;I have a requirement to design a selection screen as below.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/57530-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I have used ViewContainerUIElement element named 'VIEW_CONTAINER'.&lt;/P&gt;
  &lt;P&gt;Created Dynamic Selection screen using component WDR_SELECT_OPTIONS inside WDDOINIT method under my main view. Used flow layout for my design.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/57529-untitled.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Then trying to create Labels with check box as given above dynamically inside WDDOMODIFYVIEW method. But not able to align the elements as per requirement.&lt;/P&gt;
  &lt;P&gt;I have created check boxes. but not able to bring it under my dynamic selection parameter (as shown below).&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/57666-allign.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I have to take container w.r.t ROOTUIELEMENTCONTAINER.&lt;/P&gt;
  &lt;P&gt;If i am taking VIEW_CONTAINER as reference, it is giving error for add_child method as it is not available in cl_wd_view_container_uielement.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;Data lr_container TYPE REF TO cl_wd_uielement_container.

lr_container ?= view-&amp;gt;get_element( 'ROOTUIELEMENTCONTAINER' ).

lr_container-&amp;gt;add_child(
        EXPORTING
          index     = sy-tabix
          the_child = lr_check_box&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Taken reference from below threads. &lt;/P&gt;
  &lt;P&gt;&lt;A target="_blank" href="https://archive.sap.com/discussions/thread/630107"&gt;https://archive.sap.com/discussions/thread/630107&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;A target="_blank" href="https://archive.sap.com/discussions/thread/3246709"&gt;https://archive.sap.com/discussions/thread/3246709&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Please help on this.&lt;/P&gt;
  &lt;P&gt;Thanks in advance,&lt;/P&gt;
  &lt;P&gt;Manoj&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 15:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaq-p/435957</guid>
      <dc:creator>MKM</dc:creator>
      <dc:date>2017-07-21T15:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435958#M60749</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;Awaiting Response.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 04:14:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435958#M60749</guid>
      <dc:creator>MKM</dc:creator>
      <dc:date>2017-07-24T04:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435959#M60750</link>
      <description>&lt;P&gt;Your question is unclear. What is the problem you are experiencing? What do you mean "not able to align the things"? What is a "thing"? What do you want the screen to look like? etc. etc.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 09:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435959#M60750</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-07-25T09:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435960#M60751</link>
      <description>&lt;P&gt;added more clarity.&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 10:06:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435960#M60751</guid>
      <dc:creator>MKM</dc:creator>
      <dc:date>2017-07-25T10:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435961#M60752</link>
      <description>&lt;P&gt;You could create the checkboxes dynamically with your WDR_SELECT_OPTIONS. Probably easier. Or create another usage for WDR_SELECT_OPTIONS, and add the checkboxes as parameters within that.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 12:51:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435961#M60752</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-07-25T12:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435962#M60753</link>
      <description>&lt;P&gt;Hello Matthew,&lt;/P&gt;
  &lt;P&gt;Now i am able to design my selection screen as below.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/55679-untitled123.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Now struggling with making check box side by side having caption.&lt;/P&gt;
  &lt;P&gt;I have created a transparent container to align checkbox.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/55680-layout123.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Manoj&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 16:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435962#M60753</guid>
      <dc:creator>MKM</dc:creator>
      <dc:date>2017-07-25T16:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435963#M60754</link>
      <description>&lt;P&gt;Hi Manoj, &lt;/P&gt;
  &lt;P&gt;What I see is the missing Layout Info. Before you '&lt;EM&gt;add_child'&lt;/EM&gt; apply layout to the ui element. &lt;/P&gt;
  &lt;P&gt;cl_wd_matrix_data=&amp;gt;new_matrix_data( element = lr_check_box ). " Add Matrix Head data OR Matrix data based on where the ui is required. &lt;/P&gt;
  &lt;P&gt;And instead of adding directly the UI at index place. Create a Transparent Container / Group UI and insert the check boxes within the Transparent container to have the Title for each section. &lt;/P&gt;
  &lt;P&gt;Hope this helps, &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Kiran&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 08:29:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435963#M60754</guid>
      <dc:creator>Kiran_Valluru</dc:creator>
      <dc:date>2017-07-28T08:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435964#M60755</link>
      <description>&lt;P&gt;Hello Kiran,&lt;/P&gt;
  &lt;P&gt;After Matthew's comment, I have created it in WDDOINIT method.&lt;/P&gt;
  &lt;P&gt;I have created a transparent container at design time as per my previous post.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;METHOD wddoinit .

  DATA:
    lref_componentcontroller TYPE REF TO ig_componentcontroller,
    lref_cmp_usage           TYPE REF TO if_wd_component_usage,
*    lref_label               TYPE REF TO cl_wd_label,
    lref_range_table         TYPE REF TO data.

  DATA:
    lv_id          TYPE string,
    lv_sel_f_id    TYPE string,
    lv_description TYPE string.

* Instantiate the select-options component
  lref_cmp_usage = wd_this-&amp;gt;wd_cpuse_select_options( ).
  IF lref_cmp_usage-&amp;gt;has_active_component( ) IS INITIAL.
    lref_cmp_usage-&amp;gt;create_component( ).
  ENDIF.

* Sets the helper reference
  wd_this-&amp;gt;m_wd_select_options = wd_this-&amp;gt;wd_cpifc_select_options( ).
  wd_this-&amp;gt;m_handler = wd_this-&amp;gt;m_wd_select_options-&amp;gt;init_selection_screen( ).

* Hide the standard select-options components.
  wd_this-&amp;gt;m_handler-&amp;gt;set_global_options(
                              i_display_btn_cancel  = abap_false
                              i_display_btn_check   = abap_false
                              i_display_btn_reset   = abap_false
                              i_display_btn_execute = abap_false ).

* Adding a block (type Tray) to the select-options
  wd_this-&amp;gt;m_handler-&amp;gt;add_block(
    i_id         = 'BK01'
    i_block_type = if_wd_select_options=&amp;gt;mc_block_type_tray
    i_title      = 'Work item Selection' ).

  CLEAR lv_id.
  FREE lref_range_table.

  lv_id = 'XUBNAME'.

* Create a range table that consists of this new data element
  lref_range_table = wd_this-&amp;gt;m_handler-&amp;gt;create_range_table( i_typename = lv_id ).

* Add a new field to the selection
  wd_this-&amp;gt;m_handler-&amp;gt;add_selection_field( i_id           = lv_id
                                           i_within_block = 'BK01'
                                           it_result      = lref_range_table
                                           i_read_only    = abap_false ).

  lv_id = 'CHECK_BOX'.

  DO 6 TIMES.

    FREE lref_range_table.

    lv_sel_f_id = sy-index. CONDENSE lv_sel_f_id.

    IF sy-index = 1.
      CONCATENATE 'CHECK_BOX_' lv_sel_f_id INTO lv_sel_f_id.
      lv_description = 'FI Invoices'.
    ELSEIF sy-index = 2.
      CONCATENATE 'CHECK_BOX_' lv_sel_f_id INTO lv_sel_f_id.
      lv_description = 'MM Invoices'.
    ELSEIF sy-index = 3.
      CONCATENATE 'CHECK_BOX_' lv_sel_f_id INTO lv_sel_f_id.
      lv_description = 'Travel Expenses'.
    ELSEIF sy-index = 4.
      CONCATENATE 'CHECK_BOX_' lv_sel_f_id INTO lv_sel_f_id.
      lv_description = 'Travel Requests'.
    ELSEIF sy-index = 5.
      CONCATENATE 'CHECK_BOX_' lv_sel_f_id INTO lv_sel_f_id.
      lv_description = 'Shopping Cart'.
    ELSEIF sy-index = 6.
      CONCATENATE 'CHECK_BOX_' lv_sel_f_id INTO lv_sel_f_id.
      lv_description = 'Purchase Order'.
    ENDIF.

* Create a range table that consists of this new data element
    lref_range_table = wd_this-&amp;gt;m_handler-&amp;gt;create_range_table( i_typename = lv_id ).

* Add a new field to the selection
    wd_this-&amp;gt;m_handler-&amp;gt;add_selection_field( i_id           = lv_sel_f_id
                                             i_within_block = 'BK01'
                                             i_description  = lv_description
                                             it_result      = lref_range_table
                                             i_no_extension = abap_true
                                             i_no_intervals = abap_true
                                             i_as_checkbox  = abap_true ).

  ENDDO.

ENDMETHOD.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Now i am struggling with creating block. there is no such method inside WDR_SELECT_OPTIONS.&lt;/P&gt;
  &lt;P&gt;Please guide.&lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Manoj&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 10:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435964#M60755</guid>
      <dc:creator>MKM</dc:creator>
      <dc:date>2017-07-28T10:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Selection screen with checkbox on WebDynpro View</title>
      <link>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435965#M60756</link>
      <description>&lt;P&gt;Hi Manoj, &lt;/P&gt;
  &lt;P&gt;With Select options, it's always matrix head data (new row); There is no provision to control the layout with the standard select options component. You will have to follow your initial approach(custom transparent container) and start adding the ui fields dynamically with the Layout data taken into account while adding the dynamic fields. &lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;Standard select options (always new row) -&amp;gt; for your reference. &lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/58436-std-sel-opt.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;Hope this helps, &lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Kiran&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 07:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dynamic-selection-screen-with-checkbox-on-webdynpro-view/qaa-p/435965#M60756</guid>
      <dc:creator>Kiran_Valluru</dc:creator>
      <dc:date>2017-08-01T07:03:11Z</dc:date>
    </item>
  </channel>
</rss>

