<?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: Editable &amp; Dynamic ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247797#M1527160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I got the data into &amp;lt;t_celltab&amp;gt; by using the below code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN lt_styletab TO &amp;lt;t_celltab&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, when i try to pass this value to my dunamic internal table, its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm presently using the below code for that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN ('&amp;lt;dyn_wa&amp;gt;-celltab') TO &amp;lt;t_celltab&amp;gt;.
APPEND &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_table&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Oct 2010 08:48:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-10-06T08:48:18Z</dc:date>
    <item>
      <title>Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247794#M1527157</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 the situation where I want to create an editable ALV whose column fields will be known during run time. So, here I'm using Dynamic Internal table concept. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me give a picture how my present program works,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the fieldcatalog, ifc I have passed the deep structure of type lvc_s_styl, by pointing to the reference table and reference field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I'm using the below code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog           = ifc
      i_length_in_byte          = 'X'
    IMPORTING
      ep_table                  = dy_table
    EXCEPTIONS
      generate_subpool_dir_full = 1
      OTHERS                    = 2.

  ASSIGN dy_table-&amp;gt;* TO &amp;lt;dyn_table&amp;gt;.
  CREATE DATA dy_line LIKE LINE OF &amp;lt;dyn_table&amp;gt;.
  ASSIGN dy_line-&amp;gt;* TO &amp;lt;dyn_wa&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I got the dynamic Internal table having one field (let it be the first column of that internal table) corresponding to the deep structure where we need to pass the fieldname and style = cl_gui_alv_grid=&amp;gt;mc_style_enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose, I have an internal table containing all the fieldnames (consider there are 5 fields) to be in editable mode, lets say, itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS &amp;lt;t_celltab&amp;gt; TYPE ANY.

DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .

    LOOP AT itab INTO wa.
      ASSIGN COMPONENT 1 OF STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;t_celltab&amp;gt;.
      CLEAR ls_stylerow.
      ls_stylerow-fieldname = wa-fildname.
      ls_stylerow-style     = cl_gui_alv_grid=&amp;gt;mc_style_enabled.
      INSERT ls_stylerow INTO TABLE lt_styletab.
      INSERT LINES OF lt_styletab INTO TABLE &amp;lt;t_celltab&amp;gt;.
    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the last bit of code is not working.&lt;/P&gt;&lt;P&gt;My question is simple, How can i assign an internal table (type lvc_s_styl) containing values, to that deep structure field of that dynamic internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Oct 5, 2010 9:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 15:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247794#M1527157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T15:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247795#M1527158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar requirement and was able to get this to work.  This may help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a local field symbol.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols: &amp;lt;l_celltab&amp;gt; type lvc_t_styl,

data:  li_celltab type line of lvc_t_styl.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then assign the contents (assuming you already declared this celltab of type lvc_t_styl in your fieldcatalog and therefore into your &amp;lt;dyn_wa&amp;gt; table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;assign ('&amp;lt;dyn_wa&amp;gt;-celltab') to &amp;lt;l_celltab&amp;gt;.

loop at &amp;lt;dyn_wa&amp;gt;-celltab into li_celltab.
  insert li_celltab into table &amp;lt;l_celltab&amp;gt;.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you find this helpful.  I have this working for me in a complex ALV I wrote a few years back.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Oct 2010 22:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247795#M1527158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-05T22:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247796#M1527159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srihari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just write,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
assign lt_styletab to &amp;lt;t_celltab&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in place of &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INSERT LINES OF lt_styletab INTO TABLE &amp;lt;t_celltab&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amitava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 04:51:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247796#M1527159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T04:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247797#M1527160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I got the data into &amp;lt;t_celltab&amp;gt; by using the below code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN lt_styletab TO &amp;lt;t_celltab&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, when i try to pass this value to my dunamic internal table, its not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm presently using the below code for that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ASSIGN ('&amp;lt;dyn_wa&amp;gt;-celltab') TO &amp;lt;t_celltab&amp;gt;.
APPEND &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_table&amp;gt;.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 08:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247797#M1527160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T08:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247798#M1527161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srihari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

LOOP AT &amp;lt;dyn_table&amp;gt; assigning &amp;lt;dyn_wa&amp;gt;.
LOOP AT itab into wa. 
      ASSIGN ('&amp;lt;dyn_wa&amp;gt;-celltab') TO &amp;lt;t_celltab&amp;gt;.

      CLEAR ls_stylerow.
      ls_stylerow-fieldname = wa-fildname.
      ls_stylerow-style     = cl_gui_alv_grid=&amp;gt;mc_style_enabled.
      INSERT ls_stylerow INTO TABLE lt_styletab.

      assign lt_styletab to &amp;lt;t_celltab&amp;gt;.

ENDLOOP.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now your dynamic table will be populated with the styles. This is the code if I have assumed ur code correctly....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amitava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 11:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247798#M1527161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-06T11:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247799#M1527162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hi Amitava/Srihari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above code, I can see data in &amp;lt;t_celltab&amp;gt; , but i don't see in &amp;lt;dyn_wa&amp;gt; . In my case instead of modyfing , i am appending data to &amp;lt;dyn_table&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what my code looks like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 'CELLTAB' Of STRUCTURE &amp;lt;dyn_wa&amp;gt; TO &amp;lt;t_celltab&amp;gt;&lt;/P&gt;&lt;P&gt;IF syst-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASSIGN assign lt_styletab to &amp;lt;t_celltab&amp;gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "I can see data &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND &amp;lt;dyn_wa&amp;gt; TO &amp;lt;dyn_table&amp;gt; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "No data in &amp;lt;dyn_wa&amp;gt; , obviosuly no data in &amp;lt;dyn_table&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know, what i am doing wrong . Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 22:39:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247799#M1527162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-09T22:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Editable &amp; Dynamic ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247800#M1527163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 May 2013 16:58:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editable-dynamic-alv/m-p/7247800#M1527163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-13T16:58:04Z</dc:date>
    </item>
  </channel>
</rss>

