<?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: Table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431032#M1051915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gayitri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am giving the logic for your second point ie for deleting the records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before implementing this code define a variable 'MARK' in the table control properties in the w/selcolumn input field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This below module must be placed inside the Loop of the PAI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE READ_TABLE_CONTROL INPUT.&lt;/P&gt;&lt;P&gt;  DATA  : MARK  ,&lt;/P&gt;&lt;P&gt;          L_ANSWER1 TYPE C.&lt;/P&gt;&lt;P&gt;  IF SY-UCOMM EQ 'DELETE'.&lt;/P&gt;&lt;P&gt;    IF MARK &amp;lt;&amp;gt; 'X' .&lt;/P&gt;&lt;P&gt;      READ TABLE GIT_TAB_CTRL_102 INTO GWA_TAB_CTRL_102 INDEX TAB_CTRL-CURRENT_LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND  GWA_TAB_CTRL_102 TO  GIT_TAB_CTRL_12.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " READ_TABLE_CONTROL  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This below module must be placed outside the Loop in the PAI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constants: GC_1(1)   TYPE C VALUE '1',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE DELETE_OPTION INPUT.&lt;/P&gt;&lt;P&gt;  IF SY-UCOMM = 'DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To display a popup screen&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        TITLEBAR              = Delete Entries&lt;/P&gt;&lt;P&gt;        TEXT_QUESTION         = 'Do you want to Delete the selected Row?&lt;/P&gt;&lt;P&gt;        TEXT_BUTTON_1         = Yes                    "(004)&lt;/P&gt;&lt;P&gt;        TEXT_BUTTON_2         = No                    "'No'(005)&lt;/P&gt;&lt;P&gt;        DEFAULT_BUTTON        = GC_1&lt;/P&gt;&lt;P&gt;        DISPLAY_CANCEL_BUTTON = ' '&lt;/P&gt;&lt;P&gt;        START_COLUMN          = 20&lt;/P&gt;&lt;P&gt;        START_ROW             = 6&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ANSWER                = L_ANSWER1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF  L_ANSWER1 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      REFRESH : GIT_TAB_CTRL_102.&lt;/P&gt;&lt;P&gt;      LOOP AT GIT_TAB_CTRL_12 INTO GWA_TAB_CTRL_102.&lt;/P&gt;&lt;P&gt;        APPEND GWA_TAB_CTRL_102 TO GIT_TAB_CTRL_102.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    REFRESH : GIT_TAB_CTRL_12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " DELETE_OPTION  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2008 12:34:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-17T12:34:56Z</dc:date>
    <item>
      <title>Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431028#M1051911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;         I am doing an object on table control i have doubt in logic which i have listed below &lt;/P&gt;&lt;P&gt;  a.	When insert Button is Pressed Blank record should be created in the next line of the Current Cursor position. User can enter a New record and SAVE, while saving 2 validations need to be done.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1.Finished Good should not be the repeated one.&lt;/P&gt;&lt;P&gt;2.Flag Value should be in the Range of 00 to 99 or Y. Else error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b. When user selects one or more records and Press Delete button, POP UP should show asking, u2018Are you sure for Deletion of Selected Recordsu2019 ,if he Press Yes ,we can Delete the records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this all should be done table control without wizard. Please help me with code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Gayathri S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 10:32:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431028#M1051911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T10:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431029#M1051912</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;1. While designing set the table control as input field.&lt;/P&gt;&lt;P&gt;2. In ur program create an internal table, with the same structure as your table control.&lt;/P&gt;&lt;P&gt;3. Whenever an entry is made in the table control, modify your internal table.&lt;/P&gt;&lt;P&gt;4. While saving use the internal table data to update the custom table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If internal table name is same in both screen painter(table control) and in the program then the values will automatically come into the internal table in the program with out programming.&lt;/P&gt;&lt;P&gt;Otherwise we have programtically transfer the values.&lt;/P&gt;&lt;P&gt;In the PAI event using move or move-corresponding statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this program will help you&lt;/P&gt;&lt;P&gt;Check the program &lt;U&gt;&lt;STRONG&gt;RSDEMO02&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab and check wheather is there any duplicates for Finished Good, then display message.&lt;/P&gt;&lt;P&gt;for popup use popup_to_confirm module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yogesh N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 10:43:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431029#M1051912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T10:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431030#M1051913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while inserting use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET CURSOR Line line &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if tc-top_line &amp;gt; 1.&lt;/P&gt;&lt;P&gt; LINE = LINE + ( TC-TOP_LINE - 1 ).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;now clear wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now insert wa_itab to itab index line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will ionsert blank line next to selected line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 11:00:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431030#M1051913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T11:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431031#M1051914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.for inserting a row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case ok_code.
when 'INSERT'.
if v_index is  initial.
   get cursor line  v_line.
   move : v_line to v_index.
   v_index = v_index + 1.
   insert initial line into itab index v_index.
endif.
   tc-lines = v_lines + 1.
endcase.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2.for validating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;process after input.
  loop at itab.
   field  itab-field1 module check.
   field  itab-field2 module check1.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the modules write the code for validating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. for deleting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;when 'DELETE'. 
 
call function popup_to_confirm.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sathish Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 11:05:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431031#M1051914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T11:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431032#M1051915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gayitri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am giving the logic for your second point ie for deleting the records:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before implementing this code define a variable 'MARK' in the table control properties in the w/selcolumn input field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This below module must be placed inside the Loop of the PAI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE READ_TABLE_CONTROL INPUT.&lt;/P&gt;&lt;P&gt;  DATA  : MARK  ,&lt;/P&gt;&lt;P&gt;          L_ANSWER1 TYPE C.&lt;/P&gt;&lt;P&gt;  IF SY-UCOMM EQ 'DELETE'.&lt;/P&gt;&lt;P&gt;    IF MARK &amp;lt;&amp;gt; 'X' .&lt;/P&gt;&lt;P&gt;      READ TABLE GIT_TAB_CTRL_102 INTO GWA_TAB_CTRL_102 INDEX TAB_CTRL-CURRENT_LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND  GWA_TAB_CTRL_102 TO  GIT_TAB_CTRL_12.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " READ_TABLE_CONTROL  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This below module must be placed outside the Loop in the PAI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constants: GC_1(1)   TYPE C VALUE '1',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE DELETE_OPTION INPUT.&lt;/P&gt;&lt;P&gt;  IF SY-UCOMM = 'DELETE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To display a popup screen&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        TITLEBAR              = Delete Entries&lt;/P&gt;&lt;P&gt;        TEXT_QUESTION         = 'Do you want to Delete the selected Row?&lt;/P&gt;&lt;P&gt;        TEXT_BUTTON_1         = Yes                    "(004)&lt;/P&gt;&lt;P&gt;        TEXT_BUTTON_2         = No                    "'No'(005)&lt;/P&gt;&lt;P&gt;        DEFAULT_BUTTON        = GC_1&lt;/P&gt;&lt;P&gt;        DISPLAY_CANCEL_BUTTON = ' '&lt;/P&gt;&lt;P&gt;        START_COLUMN          = 20&lt;/P&gt;&lt;P&gt;        START_ROW             = 6&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ANSWER                = L_ANSWER1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF  L_ANSWER1 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      REFRESH : GIT_TAB_CTRL_102.&lt;/P&gt;&lt;P&gt;      LOOP AT GIT_TAB_CTRL_12 INTO GWA_TAB_CTRL_102.&lt;/P&gt;&lt;P&gt;        APPEND GWA_TAB_CTRL_102 TO GIT_TAB_CTRL_102.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    REFRESH : GIT_TAB_CTRL_12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " DELETE_OPTION  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2008 12:34:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control/m-p/4431032#M1051915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-17T12:34:56Z</dc:date>
    </item>
  </channel>
</rss>

