<?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 event question. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236157#M1525575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if writing the below mentioned code in the perform routine for event 03 helps you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT extract.
  CASE &amp;lt;xact&amp;gt;.
*   Check Deleted/Entry first changed and then deleted.
    WHEN 'GELOESCHT'
    OR   'UPDATE_GELOESCHT'.
*     Check if the row is selected
      IF &amp;lt;xmark&amp;gt; = 'MARKIERT'.
*       Your logic for Field1 and Field2
        IF extract-field1 = 'X'.
          IF extract-field2 IS INITIAL.
            extract-field2 = 'X'.
          ENDIF.
*         Clear the Selected row to not to be considered for deletion
          CLEAR extract-mark.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDIF.
  ENDCASE.
  MODIFY extract.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sitakant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sitakant Tripathy on Sep 24, 2010 11:26 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Sep 2010 09:26:17 GMT</pubDate>
    <dc:creator>sitakant_tripathy2</dc:creator>
    <dc:date>2010-09-24T09:26:17Z</dc:date>
    <item>
      <title>Table event question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236156#M1525574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       We have a custom table in which we have 16 fields. There are 2 fields filed1 and field2 among 16 fields. &lt;/P&gt;&lt;P&gt;Whenever a user goes to table maintenance and deletes an entry we need to check if field1 is X, set field2 to X&lt;/P&gt;&lt;P&gt;and not delete the entry else if field1 is empty delete the entry. We can use before delete table event but how to update and prevent deletion.Please suggest a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;aditya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 08:25:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236156#M1525574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-24T08:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Table event question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236157#M1525575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if writing the below mentioned code in the perform routine for event 03 helps you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT extract.
  CASE &amp;lt;xact&amp;gt;.
*   Check Deleted/Entry first changed and then deleted.
    WHEN 'GELOESCHT'
    OR   'UPDATE_GELOESCHT'.
*     Check if the row is selected
      IF &amp;lt;xmark&amp;gt; = 'MARKIERT'.
*       Your logic for Field1 and Field2
        IF extract-field1 = 'X'.
          IF extract-field2 IS INITIAL.
            extract-field2 = 'X'.
          ENDIF.
*         Clear the Selected row to not to be considered for deletion
          CLEAR extract-mark.
        ELSE.
          CONTINUE.
        ENDIF.
      ENDIF.
  ENDCASE.
  MODIFY extract.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sitakant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sitakant Tripathy on Sep 24, 2010 11:26 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 09:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236157#M1525575</guid>
      <dc:creator>sitakant_tripathy2</dc:creator>
      <dc:date>2010-09-24T09:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Table event question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236158#M1525576</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;For every table maintaianace there is function group this may be the same table name or some thing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go to se80&lt;DEL&gt;&amp;gt;enter the function group of table maintianance gicen in se11&lt;/DEL&gt;&amp;gt;and go to screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the table control ...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"in th PAI..

LOOP AT &amp;lt;TABLE control&amp;gt;
chain.

"Add the custom module...
Module check_delete.

endchain.

Endloop.


MOdule check_delete Input.
  if &amp;lt;tablename&amp;gt;- field1 is X and   &amp;lt;tablename&amp;gt;- field2 to X and SY-ucomm = 'DELE'.
  message 'unable to delte entry because the field1 and field 2 eq 'X'
  ENDIF.
ENDMODULE.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 09:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236158#M1525576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-24T09:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table event question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236159#M1525577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sitakanth&lt;/P&gt;&lt;P&gt;The extract table has only one field Line so i modified your code like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT extract.&lt;/P&gt;&lt;P&gt;  CASE &amp;lt;xact&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Check Deleted/Entry first changed and then deleted.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    WHEN 'GELOESCHT'&lt;/P&gt;&lt;P&gt;    OR   'UPDATE_GELOESCHT'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Check if the row is selected&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IF &amp;lt;xmark&amp;gt; = 'MARKIERT'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Your logic for Field1 and Field2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        IF extract+135(1) NE 'X'.&lt;/P&gt;&lt;P&gt;             extract+134(1) = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        Clear the Selected row to not to be considered for deletion&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          CLEAR &amp;lt;xmark&amp;gt;.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          CONTINUE.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;  MODIFY extract.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this also doesnt seem to work. Could you suggest anything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;aditya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 10:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-event-question/m-p/7236159#M1525577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-24T10:07:54Z</dc:date>
    </item>
  </channel>
</rss>

