<?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: Validating Table control line items in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647224#M1285080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you validate after the loop then table control will always in the greyed out mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing you can do is to perform validation, only if user has changed a particular field  in the table control. For ths use "On request" or "On Chain-request" with module statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to check something line....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  field: t_mara-matnr module validate_matnr on request.&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;Module Validate_matnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Validate&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 May 2009 06:59:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-18T06:59:18Z</dc:date>
    <item>
      <title>Validating Table control line items</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647223#M1285079</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;In My report , I am displaying a table control where user can enter some data. My requirement is to validate the entered data only when user presses a button. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So For this , I have not used command like FIELD t_item-matnr  MODULE validate_matnr , as it is getting triggered evrytime. I need to validate fields only when a particular button 'Select' is prseesd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I have written the validations after loop...endloop  in a seprate module in PAI . I have thrown an error message if validation fails which is putting my table control in non editable mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is, on click of select button  if validation fails, only that particular field should be in editable mode and cursor should be on that field only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajneesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 06:51:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647223#M1285079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T06:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Validating Table control line items</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647224#M1285080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you validate after the loop then table control will always in the greyed out mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing you can do is to perform validation, only if user has changed a particular field  in the table control. For ths use "On request" or "On Chain-request" with module statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to check something line....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  field: t_mara-matnr module validate_matnr on request.&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;Module Validate_matnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Validate&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 06:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647224#M1285080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T06:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Validating Table control line items</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647225#M1285081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IN PAI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Use Warning Message in the LOOP it will make the Table control Editable.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Message 'XXX' TYPE 'W' Display like 'E'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use SET CURSOR to place the cursor to set cursor at line where error has occured.&lt;/P&gt;&lt;P&gt;Use system field Sy-Stepl to get the line where error has occured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Use Loop at screen to Disable the the rows that are not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 07:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647225#M1285081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-18T07:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Validating Table control line items</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647226#M1285082</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;In the Flow Logic of the corresponding screen , I kept code like the following one....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;MODULE EXIT_9998 AT EXIT-COMMAND.&lt;/P&gt;&lt;P&gt;MODULE MODIFY_ITAB .&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_EKKO .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_9998.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now kept code in Modify_itab like the following one................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODULE Modify_Itab INPUT.&lt;/P&gt;&lt;P&gt; data: index type sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR Ch.CLEAR lin.CLEAR val.&lt;/P&gt;&lt;P&gt;  GET CURSOR FIELD f LINE lin VALUE val.&lt;/P&gt;&lt;P&gt;  index = tc_9998-current_line - 1 + lin.&lt;/P&gt;&lt;P&gt;READ TABLE IT_EKKO INTO WA_EKKO INDEX index.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;     DFELD              = 'ZSAR_TCNTRL-MENGE'&lt;/P&gt;&lt;P&gt;     DMZEI              = ','&lt;/P&gt;&lt;P&gt;     DTYPE              = 'QUAN'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DYPNO              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     EFELD              = val&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FNAME              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PROGR              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     IMP_DECIMALS       = '3'&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     ERROR              = Ch&lt;/P&gt;&lt;P&gt;     IFELD               = temp_val&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MESSG              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    MSGLN              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;   IF Ch &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;    WA_EKKO-MENGE = temp_val.&lt;/P&gt;&lt;P&gt;    MODIFY IT_EKKO FROM WA_EKKO INDEX index. &lt;/P&gt;&lt;P&gt;    clear WA_EKKO.&lt;/P&gt;&lt;P&gt; MESSAGE S016.&lt;/P&gt;&lt;P&gt;   ELSE.&lt;/P&gt;&lt;P&gt;     MESSAGE I017 DISPLAY LIKE 'E'.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope in this way you can solve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sarbajit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2009 07:05:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647226#M1285082</guid>
      <dc:creator>sarbajitm</dc:creator>
      <dc:date>2009-05-18T07:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Validating Table control line items</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647227#M1285083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Displaying 'W' like 'E' was all that it required in PAI MODULE. Thanks a lot Gurpreet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 06:57:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-table-control-line-items/m-p/5647227#M1285083</guid>
      <dc:creator>former_member228783</dc:creator>
      <dc:date>2014-07-31T06:57:39Z</dc:date>
    </item>
  </channel>
</rss>

