<?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 no data in ALV when using MC_STYLE_ENABLED in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912822#M379848</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 want to display some data in a ALV-Grid control, with just one column which is editable. So the ALV-Grid looks well, when I only display the data. But when I add the attributes for the editable column into my internal table, then I cannot see any data in there. But I can see the rows with the editable column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the operations:&lt;/P&gt;&lt;P&gt;1) All items of an transparent table is viewed in the ALV-LIST1&lt;/P&gt;&lt;P&gt;2) User can select the specific rows which he/she want to edit.&lt;/P&gt;&lt;P&gt;3) User press a button in the toolbar of ALV-LIST1&lt;/P&gt;&lt;P&gt;4) The ALV-LIST2 comes up with the selected rows and one editabled column, but no data in there...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already looked in this great example, but I cannot see any special command, posted here:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="133634"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also looked in the examples of BCALV_EDIT_0*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The method for creating the second ALV-Grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    

METHOD create_alv_list2.

DATA: ls_selected_line TYPE lvc_s_row,
      lf_row_index TYPE lvc_index,
      lt_celltab TYPE lvc_t_styl,
      ls_celltab TYPE lvc_s_styl,
      l_index TYPE i,
      lt_exclude TYPE ui_functions
      .
  IF container23 is initial.

    CREATE OBJECT container23
        EXPORTING   container_name = 'LIST_AREA2'
        EXCEPTIONS
            cntl_error = 1
            cntl_system_error = 2
            create_error = 3
            lifetime_error = 4
            lifetime_dynpro_dynpro_link = 5.

    IF sy-subrc &amp;lt;&amp;gt; 0.
      CALL FUNCTION 'POPUP_TO_INFORM'
           EXPORTING
                titel = g_repid
                txt2  = sy-subrc
                txt1  = 'Control element couldn't be created'(510).
    ENDIF.

    CREATE OBJECT alv_list2
           EXPORTING i_parent = container23.
  ELSE.
    CALL METHOD alv_list2-&amp;gt;refresh_table_display.
  ENDIF.                               "IF container23 IS INITIAL.



* Layout
  g_lvc_layout-grid_title = 'Edit the rows'.
  g_lvc_layout-sel_mode   = ' '.
  g_lvc_layout-stylefname = 'CELLTAB'.


  CLEAR: lt_celltab,
         wa_lab_dispo2,
         it_lab_dispo2,
         wa_lab_dispo3,
         it_lab_dispo3
         .

* catch all selected rows from ALV-Grid1
  CALL METHOD alv_list1-&amp;gt;get_selected_rows
           IMPORTING et_index_rows = it_lvc_rows.

* write the lines into the it_lab_dispo3
  LOOP AT it_lvc_rows INTO ls_selected_line.
    lf_row_index = ls_selected_line-index.
    READ TABLE it_lab_dispo INDEX lf_row_index INTO wa_lab_dispo.
    wa_lab_dispo3-lab_dispo_struk = wa_lab_dispo.
    APPEND wa_lab_dispo3 TO it_lab_dispo3.
  ENDLOOP.

  CLEAR: wa_lab_dispo3.
  
* make the cell XBEME editable
  LOOP AT it_lab_dispo3 INTO wa_lab_dispo3.
    l_index = sy-tabix.

    ls_celltab-FIELDNAME = 'XBEME'.
    ls_celltab-STYLE = CL_GUI_ALV_GRID=&amp;gt;MC_STYLE_ENABLED.
    ls_celltab-STYLE2 = SPACE.
    ls_celltab-STYLE3 = SPACE.
    ls_celltab-STYLE4 = SPACE.

    INSERT ls_celltab INTO TABLE lt_celltab.

    INSERT LINES OF lt_celltab INTO TABLE wa_lab_dispo3-celltab.
    
    MODIFY it_lab_dispo3 FROM wa_lab_dispo3 INDEX l_index TRANSPORTING celltab.
  ENDLOOP.

  CALL METHOD alv_list2-&amp;gt;set_ready_for_input
          EXPORTING i_ready_for_input = 1.


  PERFORM exclude_tb_functions CHANGING lt_exclude.


* display the second grid
  CALL METHOD alv_list2-&amp;gt;set_table_for_first_display
       EXPORTING i_structure_name      = 'zmm_lab_dispo'
                 i_save                = 'A'
                 it_toolbar_excluding  = lt_exclude
                 is_layout             = g_lvc_layout
       CHANGING
                 it_outtab             = it_lab_dispo3[]
                 .


  CALL METHOD cl_gui_control=&amp;gt;set_focus 
  	EXPORTING control = alv_list2.
  CALL METHOD cl_gui_cfw=&amp;gt;flush.


  IF sy-subrc &amp;lt;&amp;gt; 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              titel = g_repid
              txt2  = sy-subrc
              txt1  = 'Error in Flush ALV'(500).
  ENDIF.
ENDMETHOD.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If I follow my coding by processing the application, I could see that in the Method "SET_VALUES (CL_ALV_VARIANT)" which was executed by "CALL METHOD alv_list2-&amp;gt;set_table_for_first_display" the table "it_outtab" is just filled with the data of my selected rows!&lt;/P&gt;&lt;P&gt;And after this Method their called "FUNCTION K_KKB_PUT_GLOBALS" which has only one command: &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
create data gs_table_row like es_table_row.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;b&amp;gt;And the gs_table_row has the needed deep-structure.&lt;/P&gt;&lt;P&gt;After it i cannot see any really intressting backend-functions related to my Problem.&lt;/P&gt;&lt;P&gt; &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also try to do something with the fieldcatalog but in this case I only could add columns to the existing table which was editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Feb 2007 10:30:09 GMT</pubDate>
    <dc:creator>former_member183924</dc:creator>
    <dc:date>2007-02-06T10:30:09Z</dc:date>
    <item>
      <title>no data in ALV when using MC_STYLE_ENABLED</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912822#M379848</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 want to display some data in a ALV-Grid control, with just one column which is editable. So the ALV-Grid looks well, when I only display the data. But when I add the attributes for the editable column into my internal table, then I cannot see any data in there. But I can see the rows with the editable column.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the operations:&lt;/P&gt;&lt;P&gt;1) All items of an transparent table is viewed in the ALV-LIST1&lt;/P&gt;&lt;P&gt;2) User can select the specific rows which he/she want to edit.&lt;/P&gt;&lt;P&gt;3) User press a button in the toolbar of ALV-LIST1&lt;/P&gt;&lt;P&gt;4) The ALV-LIST2 comes up with the selected rows and one editabled column, but no data in there...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already looked in this great example, but I cannot see any special command, posted here:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="133634"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also looked in the examples of BCALV_EDIT_0*.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The method for creating the second ALV-Grid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    

METHOD create_alv_list2.

DATA: ls_selected_line TYPE lvc_s_row,
      lf_row_index TYPE lvc_index,
      lt_celltab TYPE lvc_t_styl,
      ls_celltab TYPE lvc_s_styl,
      l_index TYPE i,
      lt_exclude TYPE ui_functions
      .
  IF container23 is initial.

    CREATE OBJECT container23
        EXPORTING   container_name = 'LIST_AREA2'
        EXCEPTIONS
            cntl_error = 1
            cntl_system_error = 2
            create_error = 3
            lifetime_error = 4
            lifetime_dynpro_dynpro_link = 5.

    IF sy-subrc &amp;lt;&amp;gt; 0.
      CALL FUNCTION 'POPUP_TO_INFORM'
           EXPORTING
                titel = g_repid
                txt2  = sy-subrc
                txt1  = 'Control element couldn't be created'(510).
    ENDIF.

    CREATE OBJECT alv_list2
           EXPORTING i_parent = container23.
  ELSE.
    CALL METHOD alv_list2-&amp;gt;refresh_table_display.
  ENDIF.                               "IF container23 IS INITIAL.



* Layout
  g_lvc_layout-grid_title = 'Edit the rows'.
  g_lvc_layout-sel_mode   = ' '.
  g_lvc_layout-stylefname = 'CELLTAB'.


  CLEAR: lt_celltab,
         wa_lab_dispo2,
         it_lab_dispo2,
         wa_lab_dispo3,
         it_lab_dispo3
         .

* catch all selected rows from ALV-Grid1
  CALL METHOD alv_list1-&amp;gt;get_selected_rows
           IMPORTING et_index_rows = it_lvc_rows.

* write the lines into the it_lab_dispo3
  LOOP AT it_lvc_rows INTO ls_selected_line.
    lf_row_index = ls_selected_line-index.
    READ TABLE it_lab_dispo INDEX lf_row_index INTO wa_lab_dispo.
    wa_lab_dispo3-lab_dispo_struk = wa_lab_dispo.
    APPEND wa_lab_dispo3 TO it_lab_dispo3.
  ENDLOOP.

  CLEAR: wa_lab_dispo3.
  
* make the cell XBEME editable
  LOOP AT it_lab_dispo3 INTO wa_lab_dispo3.
    l_index = sy-tabix.

    ls_celltab-FIELDNAME = 'XBEME'.
    ls_celltab-STYLE = CL_GUI_ALV_GRID=&amp;gt;MC_STYLE_ENABLED.
    ls_celltab-STYLE2 = SPACE.
    ls_celltab-STYLE3 = SPACE.
    ls_celltab-STYLE4 = SPACE.

    INSERT ls_celltab INTO TABLE lt_celltab.

    INSERT LINES OF lt_celltab INTO TABLE wa_lab_dispo3-celltab.
    
    MODIFY it_lab_dispo3 FROM wa_lab_dispo3 INDEX l_index TRANSPORTING celltab.
  ENDLOOP.

  CALL METHOD alv_list2-&amp;gt;set_ready_for_input
          EXPORTING i_ready_for_input = 1.


  PERFORM exclude_tb_functions CHANGING lt_exclude.


* display the second grid
  CALL METHOD alv_list2-&amp;gt;set_table_for_first_display
       EXPORTING i_structure_name      = 'zmm_lab_dispo'
                 i_save                = 'A'
                 it_toolbar_excluding  = lt_exclude
                 is_layout             = g_lvc_layout
       CHANGING
                 it_outtab             = it_lab_dispo3[]
                 .


  CALL METHOD cl_gui_control=&amp;gt;set_focus 
  	EXPORTING control = alv_list2.
  CALL METHOD cl_gui_cfw=&amp;gt;flush.


  IF sy-subrc &amp;lt;&amp;gt; 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              titel = g_repid
              txt2  = sy-subrc
              txt1  = 'Error in Flush ALV'(500).
  ENDIF.
ENDMETHOD.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;If I follow my coding by processing the application, I could see that in the Method "SET_VALUES (CL_ALV_VARIANT)" which was executed by "CALL METHOD alv_list2-&amp;gt;set_table_for_first_display" the table "it_outtab" is just filled with the data of my selected rows!&lt;/P&gt;&lt;P&gt;And after this Method their called "FUNCTION K_KKB_PUT_GLOBALS" which has only one command: &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
create data gs_table_row like es_table_row.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;b&amp;gt;And the gs_table_row has the needed deep-structure.&lt;/P&gt;&lt;P&gt;After it i cannot see any really intressting backend-functions related to my Problem.&lt;/P&gt;&lt;P&gt; &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also try to do something with the fieldcatalog but in this case I only could add columns to the existing table which was editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2007 10:30:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912822#M379848</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2007-02-06T10:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: no data in ALV when using MC_STYLE_ENABLED</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912823#M379849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steffen,&lt;/P&gt;&lt;P&gt;   Just give the name in capital letters and try:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;display the second grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD alv_list2-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;       EXPORTING i_structure_name      = &amp;lt;b&amp;gt;'ZMM_LAB_DISPO'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;                 i_save                = 'A'&lt;/P&gt;&lt;P&gt;                 it_toolbar_excluding  = lt_exclude&lt;/P&gt;&lt;P&gt;                 is_layout             = g_lvc_layout&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;                 it_outtab             = it_lab_dispo3[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2007 10:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912823#M379849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-06T10:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: no data in ALV when using MC_STYLE_ENABLED</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912824#M379850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the same result... as I described.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks, steffen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2007 10:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912824#M379850</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2007-02-06T10:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: no data in ALV when using MC_STYLE_ENABLED</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912825#M379851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok I have found this number in the oss: 695910&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it means that SAP do not support such methods like: IS_READY_FOR_INPUT&lt;/P&gt;&lt;P&gt;and attribute MC_STYLE_ENABLED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2007 09:27:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-in-alv-when-using-mc-style-enabled/m-p/1912825#M379851</guid>
      <dc:creator>former_member183924</dc:creator>
      <dc:date>2007-02-08T09:27:34Z</dc:date>
    </item>
  </channel>
</rss>

