<?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 Validation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674295#M617708</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 this case you may not be able to use Error message, you might have to use either Warning or Status message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are not calling the module on any FIELD and even if you give FIELD it will not get called as nothing would have changed on this field and module will not get called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for this you cannot use error message, as error message will open only those fields for edit which are mentioned in FIELD and CHAIN ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Easy thing is to do a warning instead of error message which when shown on some user action will open the screen for edit again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2007 07:40:11 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-08-22T07:40:11Z</dc:date>
    <item>
      <title>Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674289#M617702</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;I want to make the validation on a table control when the 'SAVE' function code is encountered.&lt;/P&gt;&lt;P&gt;Can anyon please let me know how to use 'FIELD' or anyother validation statement w.r.t the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Rupesh R Nair.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:33:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674289#M617702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674290#M617703</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 your flow logic you need to code like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PROCESS AFTER INPUT.
  LOOP AT ITAB.
    CHAIN.
      FIELD ITAB-CARRID.
      FIELD ITAB-CONNID.
      FIELD ITAB-COUNTRYFR.
      FIELD ITAB-CITYFROM.
      FIELD ITAB-AIRPFROM.
      FIELD ITAB-COUNTRYTO.
      FIELD ITAB-CITYTO.
      FIELD ITAB-AIRPTO.
      MODULE TAB_SPFLI_MODIFY ON CHAIN-REQUEST.
    ENDCHAIN.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You have to use FIELD statement between LOOP and ENDLOOP over the itab of the table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:37:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674290#M617703</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-08-22T06:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674291#M617704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sesh,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the table control is not filled then the control will not go in to the loop, right? &lt;/P&gt;&lt;P&gt;My requirement is to check whether the table is initial or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rupesh R Nair.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:40:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674291#M617704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674292#M617705</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;You can always know that by checking the ITAB itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the ITAB is changed after it is shown to the user you will get into this loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you dont get into this LOOP then you always know that nothing is changed on the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just set some global flag in the LOOP ENDLOOP' s module and check  that flag outside this loop for knowing if the data is changed after it is shown to the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:48:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674292#M617705</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-08-22T06:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674293#M617706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That can be checked, whether the internal table is initial or not and based on that the error message can be show.&lt;/P&gt;&lt;P&gt;But after the error message is shown the screen is in 'DISABLE' mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So some field statement should be used with this ereor message on that table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how to code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rupesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674293#M617706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674294#M617707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;       Let me make the Conclusion so you have any field other than this Table control. If SO,you can use this logic...&lt;/P&gt;&lt;P&gt;Suppose you are creating 9001-text1 field then in PAI event.&lt;/P&gt;&lt;P&gt;  CHAIN.&lt;/P&gt;&lt;P&gt;    FIELD : P9001-TEXT1.&lt;/P&gt;&lt;P&gt;    MODULE validation ON CHAIN-REQUEST.&lt;/P&gt;&lt;P&gt;  ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Validation module is used to check the Content in the Table control...&lt;/P&gt;&lt;P&gt;The itab is the internal table connected to the Table control....&lt;/P&gt;&lt;P&gt;Validation Module.&lt;/P&gt;&lt;P&gt;Select single * from PA0001 into table itab where pernr = p9001-pernr.&lt;/P&gt;&lt;P&gt;if itab[] is initial.&lt;/P&gt;&lt;P&gt;Message 'No DATA' type 'E'.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward point if it is useful...&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yogesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 07:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674294#M617707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T07:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674295#M617708</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 this case you may not be able to use Error message, you might have to use either Warning or Status message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you are not calling the module on any FIELD and even if you give FIELD it will not get called as nothing would have changed on this field and module will not get called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for this you cannot use error message, as error message will open only those fields for edit which are mentioned in FIELD and CHAIN ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Easy thing is to do a warning instead of error message which when shown on some user action will open the screen for edit again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 07:40:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674295#M617708</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-08-22T07:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table control Validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674296#M617709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rupesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In dialog programming you are not supposed to issue any error messages in the USER_COMMAND module. If you use any error msgs you will face the same issue which you are getting now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To avoid this, just before the USER_COMMAND Module write a module. in that module write the validation. Make sure you write the fields for the moduel within chain endchain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case sy-ucomm.
  when 'SAVE'.
    if itab[] is initial.
      message E000(ZCL) with 'No records found'
    endif.
endcase.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 07:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-control-validation/m-p/2674296#M617709</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-08-22T07:47:25Z</dc:date>
    </item>
  </channel>
</rss>

