<?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 Dynamic customer table maintenance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319638#M1226187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on dynamic development of cusomter tables mainenance. The program provides selection screen dynamically based on the key fields of each table and generates ALV list with table contents. When user double click on any of row, I would like to open up non-key fields in edit mode for editing. Somehow I am stuck when I tried to update work area of internal table with deep structure - handle style - lvc_s_styl. Can anybody help me on it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  any ideas?&lt;/P&gt;&lt;P&gt;  your help will be very appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Kelly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;tab&amp;gt; TYPE standard TABLE,&lt;/P&gt;&lt;P&gt;                   &amp;lt;wa_tab&amp;gt; type any,&lt;/P&gt;&lt;P&gt;                   &amp;lt;ls_edit&amp;gt; type lvc_s_styl,&lt;/P&gt;&lt;P&gt;                   &amp;lt;col&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ls_edit-fieldname = e_column-fieldname.&lt;/P&gt;&lt;P&gt;  ls_edit-style     = cl_gui_alv_grid=&amp;gt;mc_style_enabled.&lt;/P&gt;&lt;P&gt;  ls_edit-style2    = space.&lt;/P&gt;&lt;P&gt;  ls_edit-style3    = space.&lt;/P&gt;&lt;P&gt;  ls_edit-style4    = space.&lt;/P&gt;&lt;P&gt;  ls_edit-maxlen    = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT ls_edit INTO TABLE lt_edit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;tab&amp;gt; ASSIGNING &amp;lt;wa_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF e_row = sy-tabix .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ASSIGN COMPONENT l_colname OF STRUCTURE &amp;lt;wa_tab&amp;gt; TO &amp;lt;col&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ASSIGN ls_edit TO &amp;lt;col&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to update &amp;lt;wa_tab&amp;gt;-handle_style with &amp;lt;col&amp;gt;, how do I do it? &amp;lt;Col&amp;gt; contains the same structure with deep structure handle_style.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MANDT	                                   	400&lt;/P&gt;&lt;P&gt;WERKS	                                   	0002&lt;/P&gt;&lt;P&gt;MATNR	                                   	000000000000040066&lt;/P&gt;&lt;P&gt;VERID	                                   	0110&lt;/P&gt;&lt;P&gt;SEQUENCE	                                   	010&lt;/P&gt;&lt;P&gt;PPRESRC	                                   &lt;/P&gt;&lt;P&gt;PAN_SIZE	                                   	0000&lt;/P&gt;&lt;P&gt;DOCUMENT	                            	&lt;BR /&gt;Toriis02\Inetpub\MasterProAndPKGDoc\sappdf\ALL-BPO-300CA.pdf&lt;/P&gt;&lt;P&gt;DIVIDER	                                   	0000&lt;/P&gt;&lt;P&gt;HANDLE_STYPE	                                   	Structure: flat &amp;amp; not charlike&lt;/P&gt;&lt;P&gt;                                  	          FIELDNAME                                                                                &lt;/P&gt;&lt;P&gt;STYLE	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          STYLE2	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          STYLE3	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          STYLE4	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          MAXLEN	                                   	0    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODIFY &amp;lt;tab&amp;gt; FROM &amp;lt;wa_tab&amp;gt;.   &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;Edited by: Kelly Gao on Mar 13, 2009 7:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2009 18:21:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-13T18:21:34Z</dc:date>
    <item>
      <title>Dynamic customer table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319638#M1226187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on dynamic development of cusomter tables mainenance. The program provides selection screen dynamically based on the key fields of each table and generates ALV list with table contents. When user double click on any of row, I would like to open up non-key fields in edit mode for editing. Somehow I am stuck when I tried to update work area of internal table with deep structure - handle style - lvc_s_styl. Can anybody help me on it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  any ideas?&lt;/P&gt;&lt;P&gt;  your help will be very appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Kelly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;tab&amp;gt; TYPE standard TABLE,&lt;/P&gt;&lt;P&gt;                   &amp;lt;wa_tab&amp;gt; type any,&lt;/P&gt;&lt;P&gt;                   &amp;lt;ls_edit&amp;gt; type lvc_s_styl,&lt;/P&gt;&lt;P&gt;                   &amp;lt;col&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ls_edit-fieldname = e_column-fieldname.&lt;/P&gt;&lt;P&gt;  ls_edit-style     = cl_gui_alv_grid=&amp;gt;mc_style_enabled.&lt;/P&gt;&lt;P&gt;  ls_edit-style2    = space.&lt;/P&gt;&lt;P&gt;  ls_edit-style3    = space.&lt;/P&gt;&lt;P&gt;  ls_edit-style4    = space.&lt;/P&gt;&lt;P&gt;  ls_edit-maxlen    = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  INSERT ls_edit INTO TABLE lt_edit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT &amp;lt;tab&amp;gt; ASSIGNING &amp;lt;wa_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF e_row = sy-tabix .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ASSIGN COMPONENT l_colname OF STRUCTURE &amp;lt;wa_tab&amp;gt; TO &amp;lt;col&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ASSIGN ls_edit TO &amp;lt;col&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to update &amp;lt;wa_tab&amp;gt;-handle_style with &amp;lt;col&amp;gt;, how do I do it? &amp;lt;Col&amp;gt; contains the same structure with deep structure handle_style.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MANDT	                                   	400&lt;/P&gt;&lt;P&gt;WERKS	                                   	0002&lt;/P&gt;&lt;P&gt;MATNR	                                   	000000000000040066&lt;/P&gt;&lt;P&gt;VERID	                                   	0110&lt;/P&gt;&lt;P&gt;SEQUENCE	                                   	010&lt;/P&gt;&lt;P&gt;PPRESRC	                                   &lt;/P&gt;&lt;P&gt;PAN_SIZE	                                   	0000&lt;/P&gt;&lt;P&gt;DOCUMENT	                            	&lt;BR /&gt;Toriis02\Inetpub\MasterProAndPKGDoc\sappdf\ALL-BPO-300CA.pdf&lt;/P&gt;&lt;P&gt;DIVIDER	                                   	0000&lt;/P&gt;&lt;P&gt;HANDLE_STYPE	                                   	Structure: flat &amp;amp; not charlike&lt;/P&gt;&lt;P&gt;                                  	          FIELDNAME                                                                                &lt;/P&gt;&lt;P&gt;STYLE	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          STYLE2	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          STYLE3	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          STYLE4	                                   	00000000&lt;/P&gt;&lt;P&gt;                                   	          MAXLEN	                                   	0    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODIFY &amp;lt;tab&amp;gt; FROM &amp;lt;wa_tab&amp;gt;.   &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;Edited by: Kelly Gao on Mar 13, 2009 7:22 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 18:21:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319638#M1226187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T18:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic customer table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319639#M1226188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kelly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my Wiki posting&lt;/P&gt;&lt;P&gt;[Creating Flat and Complex Internal Tables Dynamically using RTTI|https://wiki.sdn.sap.com/wiki/display/Snippets/Creating&lt;EM&gt;Flat&lt;/EM&gt;and&lt;EM&gt;Complex&lt;/EM&gt;Internal&lt;EM&gt;Tables&lt;/EM&gt;Dynamically&lt;EM&gt;using&lt;/EM&gt;RTTI]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have described in detail how to build and fill complex itabs dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 21:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319639#M1226188</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-03-13T21:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic customer table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319640#M1226189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess &amp;lt;wa_tab&amp;gt;-handle_style is of type &lt;STRONG&gt;lvc_t_styl&lt;/STRONG&gt; therefore you can do the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ls_edit-style = cl_gui_alv_grid=&amp;gt;mc_style_enabled.

"I assume you know your non-key fields' names so you can use subrotuine to perform update on each of them
ls_edit-fieldname =  'First field name' .
PERFORM update ls_edit.
ls_edit-fieldname =  'Second field name'.
PERFORM update ls_edit.
ls_edit-fieldname = 'Third field name'.
PERFORM update ls_edit 


FORM update USING fs_edit type lvc_s_styl.

field-symbols: &amp;lt;style_tab&amp;gt; type lvc_t_styl,
                     &amp;lt;style_wa&amp;gt; type lvc_s_styl.

LOOP AT &amp;lt;tab&amp;gt; ASSIGNING &amp;lt;wa_tab&amp;gt;.
   if e_row = sy-tabix .
     "get you style table
     assign component 'HANDLE_STYLE' of structure &amp;lt;wa_tab&amp;gt; to &amp;lt;style_tab&amp;gt;.

     "as &amp;lt;style_tab&amp;gt; is typed fully you can read the row you are interested in
     read table &amp;lt;style_tab&amp;gt; assigning &amp;lt;style_wa&amp;gt; with key fieldname = fs_edit-fieldname
     if sy-subrc = 0.
       "update this entry
        &amp;lt;style_wa&amp;gt; = fs_edit.
*        modify table &amp;lt;style_tab&amp;gt; from &amp;lt;style_wa&amp;gt;.  
     endif.
   endif.
endloop.

endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note!&lt;/P&gt;&lt;P&gt;Though, this should work, the use of RTTI as Uwe suggested would be best practise approach as far as dynamic programming is concerned. Anyhow it is still up to you which one you pick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed now that this line is not necessary&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 modify table &amp;lt;style_tab&amp;gt; from &amp;lt;style_wa&amp;gt;.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as we simply are working with field symbols, so changes made to &amp;lt;style_wa&amp;gt; are already visible in that table &amp;lt;style_tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on Mar 15, 2009 12:44 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2009 23:41:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319640#M1226189</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-03-14T23:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic customer table maintenance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319641#M1226190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for Uwe and Marcin's input. It worked now. I can continue working on my program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 15:50:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-customer-table-maintenance/m-p/5319641#M1226190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T15:50:08Z</dc:date>
    </item>
  </channel>
</rss>

