<?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: reg table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532364#M849790</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;Declare ur table name in the topinclude.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Mar 2008 05:40:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-11T05:40:20Z</dc:date>
    <item>
      <title>reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532358#M849784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is table control. what is pai and pbo events.&lt;/P&gt;&lt;P&gt;when these event are trigger.&lt;/P&gt;&lt;P&gt;what is describe in table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u give some examples&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 12:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532358#M849784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T12:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532359#M849785</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;&lt;/P&gt;&lt;P&gt;TABLE CONTROL COMPONENTS:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table Control component is used to view the table records and if needed, we can directly modify table records and update the database table using table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, the records can be viewed in rows and columns format separated by horizontal and vertical lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SYNTAX:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS &amp;lt;table_Control_name&amp;gt; TYPE TABLEVIEW USING SCREEN &amp;lt;MPP_screen_number&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS statement is used to create a memory space area for table control component in AS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLEVIEW is a data type for table control component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCREEN NUMBER should be specified to make the system know where the table control was physically created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Navigations to create TABLE CONTROL COMPONENT:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create MPP program -&amp;gt; In TOP INCLUDE FILE, write the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;CONTROLS TABCTRL TYPE TABLEVIEW USING SCREEN '123'.&lt;/P&gt;&lt;P&gt;DATA CUR TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a Normal screen (123) -&amp;gt; Drag and drop TABLE CONTROL component from application toolbar -&amp;gt; Specify its name in attributes box -&amp;gt; Specify title if necessary -&amp;gt; Select HORIZONTAL and VERTICAL SEPARATORS checkbox -&amp;gt; If needed, select COLUMN and ROW selection radiobuttons -&amp;gt; Click on Dictionary/Program Fields from Appn. Toolbar -&amp;gt; Specify internal table name specified in top include file -&amp;gt; Click on 'GET FROM PROGRAM' pushbutton -&amp;gt; Choose required fields -&amp;gt; Click on continue -&amp;gt; Place the fields in table control component -&amp;gt; Add labels for each fields -&amp;gt; Create two pushbuttons (FETCH, EXIT) -&amp;gt; Save -&amp;gt; Flow Logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PAI module, write following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'FETCH'.&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;TABCTRL-LINES = SY-DBCNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Flow Logic editor, write following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt; MODULE STATUS_0123.&lt;/P&gt;&lt;P&gt; LOOP AT ITAB CURSOR CUR WITH CONTROL TABCTRL.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt; MODULE USER_COMMAND_0123.&lt;/P&gt;&lt;P&gt; LOOP AT ITAB.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, LOOP AT ITAB-ENDLOOP statement in PBO event is used to fetch the records and insert into table control component. CURSOR statement is used to make use of the cursor in table control component whenever we try to select a particular field and modify it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB-ENDLOOP statement in PAI event is used to make necessary modifications to the database table from table control component.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Tcode -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2008 12:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532359#M849785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-10T12:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532360#M849786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; i have given u 10 points. its helped me.&lt;/P&gt;&lt;P&gt; but u have not told when to use pai and when pbo events.&lt;/P&gt;&lt;P&gt; plz reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 05:17:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532360#M849786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T05:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532361#M849787</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;EVENTS IN MPP:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT - This event gets triggered whenever the program is executed using Tcode. This event is used to assign initial default values to the screen components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT - This event gets triggered after some user's action in the screen (for eg, after clicking pushbutton, subsequent event functionalities).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS ON VALUE REQUEST - This event is used to assign F1 functionality for the screen components.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS ON HELP REQUEST - This event is used to assign F4 functionality for the input field in the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. code to make field validations in MPP program:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using screen painter, design a screen consisting of four input fields for client, username, password and language as we have in login screen of SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign the first two input fields to one group called GR1, the third input field to a group GR2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two pushbuttons and assign FCT codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the TOP INCLUDE FILE, declare following variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM  SAPMYSCREENVALID.&lt;/P&gt;&lt;P&gt;DATA : IO1(3), IO2(8), IO3(8), IO4(2).&lt;/P&gt;&lt;P&gt;DATA A TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Flow logic editor, decomment PAI MODULE, double click on module name, and inside the module, write the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module USER_COMMAND_0200 input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'LOGIN'.&lt;/P&gt;&lt;P&gt;CALL TRANSACTION 'SE38'.&lt;/P&gt;&lt;P&gt;WHEN 'EXIT'.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " USER_COMMAND_0200  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO module, write the following code to assign default input field attributes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module STATUS_0200 output.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET PF-STATUS 'xxxxxxxx'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET TITLEBAR 'xxx'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF A = 0.&lt;/P&gt;&lt;P&gt;MESSAGE S010(ZMSG).&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;IF SCREEN-GROUP1 = 'GR1'.&lt;/P&gt;&lt;P&gt;SCREEN-REQUIRED = '1'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF SCREEN-GROUP1 = 'GR2'.&lt;/P&gt;&lt;P&gt;SCREEN-INVISIBLE = '1'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;A = 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endmodule.                 " STATUS_0200  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a Transaction Code -&amp;gt; Execute the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i shall post u sample code regarding table control .. go through that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 05:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532361#M849787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T05:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532362#M849788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;as u said i have included structure in top include file.&lt;/P&gt;&lt;P&gt;after activating that when i am  putting itab name in app toolbar and click on get from prog it say itab is not in dictonary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz do me a fevor as soon as possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 05:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532362#M849788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T05:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532363#M849789</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;Normally we use wizard if we are working with table control. This document helps us how to create a table&lt;/P&gt;&lt;P&gt;control without using a wizard and how to manipulate the database based on the records in the table control.&lt;/P&gt;&lt;P&gt;All the fields in the screen should be disabled .After clicking that &amp;#145;Change&amp;#146; button, we should be able to insert&lt;/P&gt;&lt;P&gt;new records and update existing records [Except primary key]. Save in the standard toolbar will be used to&lt;/P&gt;&lt;P&gt;save the changes made. &amp;#145;Delete&amp;#146; button should be used to delete the rows selected from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table Control&lt;/P&gt;&lt;P&gt;Code:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the flow logic of the screen 9000, write the following code.&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;MODULE set_status.&lt;/P&gt;&lt;P&gt;MODULE get_t_ctrl_lines.&lt;/P&gt;&lt;P&gt;LOOP AT i_makt WITH CONTROL t_ctrl CURSOR t_ctrl-current_line.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Dynamic screen modifications&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODULE set_screen_fields.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;LOOP AT i_makt.&lt;/P&gt;&lt;P&gt;FIELD i_makt-pick MODULE check.&lt;/P&gt;&lt;P&gt;FIELD i_makt-zmatnr MODULE zmatnr .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;MODULE user_command_9000.&lt;/P&gt;&lt;P&gt;In the program, write the following code.&lt;/P&gt;&lt;P&gt;PROGRAM SAPMZTC MESSAGE-ID zz.&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Tables Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;TABLES: zzz_makt.&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;DATA : i_makt TYPE STANDARD TABLE OF zzz_makt WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Table control Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;CONTROLS: t_ctrl TYPE TABLEVIEW USING SCREEN '9000'.&lt;/P&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variable Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;***********************************************************************&lt;/P&gt;&lt;P&gt;DATA : flg, "Flag to set the change mode&lt;/P&gt;&lt;P&gt;ln TYPE i. "No. of records&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module get_T_CTRL_lines OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populating data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE get_t_ctrl_lines OUTPUT.&lt;/P&gt;&lt;P&gt;SELECT zmatnr zmaktx&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_makt&lt;/P&gt;&lt;P&gt;FROM zzz_makt.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE i_makt LINES ln.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To make the vertical scroll bar to come on runtime&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_ctrl-lines = ln + 100.&lt;/P&gt;&lt;P&gt;ENDMODULE. " get_T_CTRL_lines OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module USER_COMMAND_9000 INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Triggering event according to the user command&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_9000 INPUT.&lt;/P&gt;&lt;P&gt;DATA :lv_fcode LIKE sy-ucomm, "Function Code&lt;/P&gt;&lt;P&gt;lv_answer(1) type c. "Storing the answer&lt;/P&gt;&lt;P&gt;lv_fcode = sy-ucomm.&lt;/P&gt;&lt;P&gt;CASE lv_fcode.&lt;/P&gt;&lt;P&gt;WHEN 'CHANGE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the flag to make the table control in editable mode[excluding&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;primary key].&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;flg = 'Y'.&lt;/P&gt;&lt;P&gt;WHEN 'DELETE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the flag to make the table control in editable mode after&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;deleting the selected line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;flg = 'Y'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Confirmation of delete&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'POPUP_TO_CONFIRM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;TITLEBAR = 'Confirm'&lt;/P&gt;&lt;P&gt;text_question = 'Are you sure to delete from database?'&lt;/P&gt;&lt;P&gt;TEXT_BUTTON_1 = 'Yes'(001)&lt;/P&gt;&lt;P&gt;TEXT_BUTTON_2 = 'No'(002)&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;ANSWER = lv_answer.&lt;/P&gt;&lt;P&gt;if lv_answer eq '1'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the database table from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;UPDATE zzz_makt FROM TABLE i_makt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the selected row from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DELETE i_makt WHERE pick = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Deleting the selected row from the database table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DELETE FROM zzz_makt WHERE pick = 'X'.&lt;/P&gt;&lt;P&gt;MESSAGE s005 WITH 'Deleted Successfully'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;WHEN 'SAVE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Inserting new record or updating existing record in database table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODIFY zzz_makt FROM TABLE i_makt.&lt;/P&gt;&lt;P&gt;MESSAGE s005 WITH 'Saved Successfully'.&lt;/P&gt;&lt;P&gt;WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;SET SCREEN '0'.&lt;/P&gt;&lt;P&gt;WHEN 'EXIT' OR 'CANCEL'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Leaving the program&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE. " USER_COMMAND_9000 INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module set_screen_fields OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the screen fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE set_screen_fields OUTPUT.&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;IF flg IS INITIAL.&lt;/P&gt;&lt;P&gt;screen-input = 0.&lt;/P&gt;&lt;P&gt;ELSEIF ( flg EQ 'Y' ).&lt;/P&gt;&lt;P&gt;IF ( ( screen-name = 'I_MAKT-ZMAKTX'&lt;/P&gt;&lt;P&gt;OR screen-name = 'I_MAKT-CHECK1' )&lt;/P&gt;&lt;P&gt;AND t_ctrl-current_line LE ln ) .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Making the screen fields as editable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;screen-input = 1.&lt;/P&gt;&lt;P&gt;ELSEIF ( ( screen-name = 'I_MAKT-ZMATNR' )&lt;/P&gt;&lt;P&gt;AND t_ctrl-current_line LE ln ).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Making the screen field as uneditable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;screen-input = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modifying the screen after making changes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDMODULE. " set_screen_fields OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module zmatnr INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Appending records to the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE zmatnr INPUT.&lt;/P&gt;&lt;P&gt;MODIFY i_makt INDEX t_ctrl-current_line.&lt;/P&gt;&lt;P&gt;IF t_ctrl-current_line GT ln.&lt;/P&gt;&lt;P&gt;READ TABLE i_makt WITH KEY zmatnr = i_makt-zmatnr.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Inserting record if it does not exist in database&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND i_makt.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;MESSAGE i005 WITH 'Material Number' i_makt-zmatnr 'already exists'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE. " zmatnr INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Module set_status OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the GUI status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE set_status OUTPUT.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'ZSTATUS'.&lt;/P&gt;&lt;P&gt;SET TITLEBAR 'ZTITLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. " set_status OUTPUT&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Module CHECK INPUT&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modify the internal table using the current line in table control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;MODULE check INPUT.&lt;/P&gt;&lt;P&gt;MODIFY i_makt INDEX t_ctrl-current_line.&lt;/P&gt;&lt;P&gt;ENDMODULE. " CHECK INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 05:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532363#M849789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T05:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532364#M849790</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;Declare ur table name in the topinclude.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 05:40:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532364#M849790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T05:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532365#M849791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;very very thanks for yr support.with yr help i have done it.&lt;/P&gt;&lt;P&gt; but when i am writing the code written under pai into pbo&lt;/P&gt;&lt;P&gt; it is working but after the second click i will getting the data.&lt;/P&gt;&lt;P&gt;but with pai just 1 click is enough. why is it so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;secondly &lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHEN 'FETCH'.&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;*TbcL-LINES = SY-DBCNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i am commenting the TbcL-LINES = SY-DBCNT&lt;/P&gt;&lt;P&gt;still i am getting the data. then what is its use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once again  from my heart i am thanking u.&lt;/P&gt;&lt;P&gt;can i reword u more points if yes then how&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2008 11:52:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532365#M849791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-11T11:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: reg table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532366#M849792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt; i have asked u about tab control. u havent reply.&lt;/P&gt;&lt;P&gt; i think u r to busy. if yes just reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code u have send for sap logon is not working properly. if i does not enter anything then also it calls se38.&lt;/P&gt;&lt;P&gt;plz help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 07:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-table-control/m-p/3532366#M849792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T07:19:29Z</dc:date>
    </item>
  </channel>
</rss>

