<?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: custom container in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663468#M1097115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u send me the code as i'm new to oops concept&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Oct 2008 03:56:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-11T03:56:42Z</dc:date>
    <item>
      <title>custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663463#M1097110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to capture the field values of the row we have selected from alv grid(custom container).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:41:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663463#M1097110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663464#M1097111</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;Check the sample standard code BCALV_DND_02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663464#M1097111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663465#M1097112</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;If you see the IMPORT parameters of the event double click It gives you the following information&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E_ROW&lt;/P&gt;&lt;P&gt;E_COLUMN&lt;/P&gt;&lt;P&gt;ES_ROW_NO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means you have the row no, and the column name on which the user has clicked. So, just read the internal table with the index of the row number and you should have the data.&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;Omkaram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 08:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663465#M1097112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T08:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663466#M1097113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but the user will just single click. then how to do ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663466#M1097113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663467#M1097114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use this method to get the selected rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL METHOD g_alv-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_row_no = lt_marked_rows.&lt;/P&gt;&lt;P&gt;and the the required table with the specific index l_fs_marked_row-row_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE t_timesheet INTO fs_timesheet INDEX&lt;/P&gt;&lt;P&gt;                                             l_fs_marked_row-row_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manjari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 09:01:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663467#M1097114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-10T09:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663468#M1097115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u send me the code as i'm new to oops concept&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 03:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663468#M1097115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-11T03:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663469#M1097116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab TYPE STANDARD TABLE OF zzzmaterial,"Output table &lt;/P&gt;&lt;P&gt;       i_selected_rows TYPE lvc_t_row,"Selected Rows &lt;/P&gt;&lt;P&gt;       w_selected_rows TYPE lvc_s_row, &lt;/P&gt;&lt;P&gt;       i_modified TYPE STANDARD TABLE OF zzzmaterial,"For getting modified rows &lt;/P&gt;&lt;P&gt;       w_modified TYPE zzzmaterial, &lt;/P&gt;&lt;P&gt;       wa TYPE zzzmaterial, &lt;/P&gt;&lt;P&gt;       o_docking TYPE REF TO cl_gui_docking_container,"Docking Container &lt;/P&gt;&lt;P&gt;       o_grid TYPE REF TO cl_gui_alv_grid."Grid &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Getting the selected rows index &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD o_grid-&amp;gt;get_selected_rows &lt;/P&gt;&lt;P&gt;    IMPORTING &lt;/P&gt;&lt;P&gt;      et_index_rows = i_selected_rows. &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Through the index capturing the values of selected rows &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT i_selected_rows INTO w_selected_rows. &lt;/P&gt;&lt;P&gt;    READ TABLE itab INTO wa INDEX w_selected_rows-index. &lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0. &lt;/P&gt;&lt;P&gt;      MOVE-CORRESPONDING wa TO w_modified. &lt;/P&gt;&lt;P&gt;      APPEND w_modified TO i_modified. &lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;  ENDLOOP. &lt;/P&gt;&lt;P&gt;  MODIFY zzzmaterial FROM TABLE i_modified. &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;Bala Krishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 04:19:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663469#M1097116</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2008-10-11T04:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663470#M1097117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bala,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I'm using this in module pool..how to and where to write all this code..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 04:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663470#M1097117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-11T04:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663471#M1097118</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;Write in the PAI of the corresponding screen where you are displaying the Grid display.&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;Bala Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 04:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663471#M1097118</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2008-10-11T04:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663472#M1097119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Create the custom container in one screen and in the PBO of the screen write this code.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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; MODULE  STATUS_0100  OUTPUT                                         *&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; This module will create the objects for the instance and display    *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; the records                                                         *&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;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS c_alv_scr.&lt;/P&gt;&lt;P&gt;  PERFORM set_titlebar USING w_display.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If program executed in foreground.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF sy-batch IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If g_grid is empty.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF g_grid IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To create object for instance grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT g_grid&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          container_name = g_container.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To create object for object grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT g_alv&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_parent = g_grid.&lt;/P&gt;&lt;P&gt;    ENDIF.                             " IF G_GRID IS INITIAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.                               " IF SY-BATCH IS INITIAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: lt_exclude TYPE ui_functions.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To exclude buttons on the ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  PERFORM exclude_tb_functions CHANGING lt_exclude.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To display ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD g_alv-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_default            = space&lt;/P&gt;&lt;P&gt;      is_layout            = g_fcatlayo&lt;/P&gt;&lt;P&gt;      it_toolbar_excluding = lt_exclude&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab            = pr_table[]&lt;/P&gt;&lt;P&gt;      it_fieldcatalog      = pr_fcat[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.                               " IF W_SUBMIT EQ C_BOOLEAN_YES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                             " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PAI of the screen write this code.&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;   lt_marked_rows TYPE lvc_t_roid,     " Table to get rowid&lt;/P&gt;&lt;P&gt;   l_fs_marked_row LIKE LINE OF lt_marked_rows.&lt;/P&gt;&lt;P&gt;                                       " Field-string for lt_marked_rows&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To get all the selected rows in the table lt_marked_rows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD g_alv-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_row_no = lt_marked_rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reading each row id and updating the database.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT lt_marked_rows INTO l_fs_marked_row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reading the table t_timesheet with rowid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    READ TABLE t_timesheet INTO fs_timesheet INDEX&lt;/P&gt;&lt;P&gt;                                             l_fs_marked_row-row_id.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If record is there in the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      CLEAR fs_timesheet-appstatus.&lt;/P&gt;&lt;P&gt;      GET PARAMETER ID 'ZEMPID' FIELD w_empid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Changing the appstatus.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      fs_timesheet-appstatus = pr_status.&lt;/P&gt;&lt;P&gt;      fs_timesheet-approvedby = w_empid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the database table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      UPDATE zcl_timesheet FROM fs_timesheet.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;       fs_temp-empid = fs_timesheet-empid.&lt;/P&gt;&lt;P&gt;       fs_temp-workdate = fs_timesheet-workdate.&lt;/P&gt;&lt;P&gt;       fs_temp-linenum  = fs_timesheet-linenum.&lt;/P&gt;&lt;P&gt;       append fs_temp to t_temp.&lt;/P&gt;&lt;P&gt;      ENDIF.                           " IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    ENDIF.                             " IF SY-SUBRC EQ 0&lt;/P&gt;&lt;P&gt;  ENDLOOP.                             " LOOP AT LT_MARKED_ROWS...&lt;/P&gt;&lt;P&gt;  perform delete_data .&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manjari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 04:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663472#M1097119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-11T04:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: custom container</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663473#M1097120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Create the custom container in one screen and in the PBO of the screen write this code.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&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; MODULE  STATUS_0100  OUTPUT                                         *&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; This module will create the objects for the instance and display    *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; the records                                                         *&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;&lt;/P&gt;&lt;P&gt;MODULE status_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS c_alv_scr.&lt;/P&gt;&lt;P&gt;  PERFORM set_titlebar USING w_display.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If program executed in foreground.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF sy-batch IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If g_grid is empty.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF g_grid IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To create object for instance grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT g_grid&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          container_name = g_container.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To create object for object grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT g_alv&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_parent = g_grid.&lt;/P&gt;&lt;P&gt;    ENDIF.                             " IF G_GRID IS INITIAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.                               " IF SY-BATCH IS INITIAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH t_fcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA: lt_exclude TYPE ui_functions.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To exclude buttons on the ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  PERFORM exclude_tb_functions CHANGING lt_exclude.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To display ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD g_alv-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_default            = space&lt;/P&gt;&lt;P&gt;      is_layout            = g_fcatlayo&lt;/P&gt;&lt;P&gt;      it_toolbar_excluding = lt_exclude&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab            = pr_table[]&lt;/P&gt;&lt;P&gt;      it_fieldcatalog      = pr_fcat[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.                               " IF W_SUBMIT EQ C_BOOLEAN_YES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                             " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PAI of the screen write this code.&lt;/P&gt;&lt;P&gt;  DATA:&lt;/P&gt;&lt;P&gt;   lt_marked_rows TYPE lvc_t_roid,     " Table to get rowid&lt;/P&gt;&lt;P&gt;   l_fs_marked_row LIKE LINE OF lt_marked_rows.&lt;/P&gt;&lt;P&gt;                                       " Field-string for lt_marked_rows&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To get all the selected rows in the table lt_marked_rows&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD g_alv-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_row_no = lt_marked_rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reading each row id and updating the database.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT lt_marked_rows INTO l_fs_marked_row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reading the table t_timesheet with rowid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    READ TABLE t_timesheet INTO fs_timesheet INDEX&lt;/P&gt;&lt;P&gt;                                             l_fs_marked_row-row_id.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If record is there in the table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      CLEAR fs_timesheet-appstatus.&lt;/P&gt;&lt;P&gt;      GET PARAMETER ID 'ZEMPID' FIELD w_empid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Changing the appstatus.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      fs_timesheet-appstatus = pr_status.&lt;/P&gt;&lt;P&gt;      fs_timesheet-approvedby = w_empid.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Updating the database table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      UPDATE zcl_timesheet FROM fs_timesheet.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;       fs_temp-empid = fs_timesheet-empid.&lt;/P&gt;&lt;P&gt;       fs_temp-workdate = fs_timesheet-workdate.&lt;/P&gt;&lt;P&gt;       fs_temp-linenum  = fs_timesheet-linenum.&lt;/P&gt;&lt;P&gt;       append fs_temp to t_temp.&lt;/P&gt;&lt;P&gt;      ENDIF.                           " IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;    ENDIF.                             " IF SY-SUBRC EQ 0&lt;/P&gt;&lt;P&gt;  ENDLOOP.                             " LOOP AT LT_MARKED_ROWS...&lt;/P&gt;&lt;P&gt;  perform delete_data .&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manjari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2008 04:54:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/custom-container/m-p/4663473#M1097120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-11T04:54:58Z</dc:date>
    </item>
  </channel>
</rss>

