<?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: Checking Input field in table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683731#M1576282</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;Try this inside your table control loop. wa_tabctrl denotes the field which you are using on the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD:&lt;/P&gt;&lt;P&gt;             wa_tabctrl-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODULE CHECKMATNR 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;-Danish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Mar 2011 10:36:15 GMT</pubDate>
    <dc:creator>Danish</dc:creator>
    <dc:date>2011-03-02T10:36:15Z</dc:date>
    <item>
      <title>Checking Input field in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683728#M1576279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I am writing a module pool program, where i want to check an input field in table control with respect to specific table entry.&lt;/P&gt;&lt;P&gt;my flow logic is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for screen 800:(initial screen)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt; MODULE STATUS_0800.&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;CHAIN.&lt;/P&gt;&lt;P&gt;FIELD RESB-RSNUM MODULE CHECK.&lt;/P&gt;&lt;P&gt;ENDCHAIN.&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0800.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for screen 801( where table control is present)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt; MODULE STATUS_0801.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   MODULE GETDATA.&lt;/P&gt;&lt;P&gt;   LOOP AT ITAB2 WITH CONTROL TAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHAIN.&lt;/P&gt;&lt;P&gt;FIELD RESB-MATNR. "MODULE CHECKMATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCHAIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; MODULE USER_COMMAND_0801.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;module pool program is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM  ZDEMO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: RESB, makt.&lt;/P&gt;&lt;P&gt;DATA: ITAB LIKE STANDARD TABLE OF RESB WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      itab2 LIKE STANDARD TABLE OF itab WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      itab3 like STANDARD TABLE OF makt WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;      cnt type i VALUE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WA LIKE LINE OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROLS TAB1 TYPE TABLEVIEW USING SCREEN '0801'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_0800 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ZSTAT'.&lt;/P&gt;&lt;P&gt;  SET TITLEBAR 'ZTITLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0800  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0800 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;  WHEN 'ENTER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL SCREEN '0801'.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM .&lt;/P&gt;&lt;P&gt;      WHEN 'CANCEL'.&lt;/P&gt;&lt;P&gt;        EXIT..&lt;/P&gt;&lt;P&gt;        ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0800  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_0801 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ZSTAT'.&lt;/P&gt;&lt;P&gt;  SET TITLEBAR 'ZTITLE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0801  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0801 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE SY-UCOMM.&lt;/P&gt;&lt;P&gt;    WHEN 'ENTER'.&lt;/P&gt;&lt;P&gt;      perform checkmatnr.&lt;/P&gt;&lt;P&gt;      PERFORM getmaktx.&lt;/P&gt;&lt;P&gt;      WHEN 'BACK'.&lt;/P&gt;&lt;P&gt;        CALL SCREEN '0800'.&lt;/P&gt;&lt;P&gt;        WHEN 'CANCEL'.&lt;/P&gt;&lt;P&gt;          LEAVE TO SCREEN '000'.&lt;/P&gt;&lt;P&gt;          ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0801  INPUT&lt;/P&gt;&lt;P&gt;MODULE CHECK INPUT.&lt;/P&gt;&lt;P&gt;SELECT RSNUM MATNR WERKS FROM RESB INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;  WHERE RSNUM = RESB-RSNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E001(ZAM).&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " CHECK  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE GETDATA OUTPUT.&lt;/P&gt;&lt;P&gt;  DO 50 TIMES.&lt;/P&gt;&lt;P&gt;SELECT RSNUM WERKS  FROM RESB INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;  WHERE RSNUM = RESB-RSNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE itab INTO wa WITH key rsnum = resb-rsnum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa to ITAB2.&lt;/P&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " GETDATA  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form getmaktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select matnr maktx from makt INTO CORRESPONDING FIELDS OF TABLE itab3&lt;/P&gt;&lt;P&gt;    WHERE matnr = resb-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDFORM.&lt;/P&gt;&lt;P&gt;FORM CHECKMATNR ."INPUT..&lt;/P&gt;&lt;P&gt;if cnt = 0.&lt;/P&gt;&lt;P&gt;  SELECT RSnum MATNR FROM RESB INTO CORRESPONDING FIELDS OF TABLE itab3&lt;/P&gt;&lt;P&gt;  WHERE rsnum = resb-rsnum and  matnr = resb-matnr. "and werks = resb-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE E002(ZAM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     ELSE.&lt;/P&gt;&lt;P&gt;       cnt = cnt + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                " CHECKMATNR  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In subroutine i.e. in form checkmatnr i want to check material no is present or not. but system autofield check is automatically done. my subroutine never get called........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, please can anyone tell me what is solution for checking input field in table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: amar_war on Mar 1, 2011 2:26 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 13:25:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683728#M1576279</guid>
      <dc:creator>former_member925838</dc:creator>
      <dc:date>2011-03-01T13:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Input field in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683729#M1576280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my subroutine never get called........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before or after you commented out the call?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have a development or QA lead that can advise you?  You have many other issues with your dialog program code as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 15:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683729#M1576280</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2011-03-01T15:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Input field in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683730#M1576281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I can call module, but my problem is that i am giving input in table control.&lt;/P&gt;&lt;P&gt;my input is matnr and i have to check that no is present or not and if present then give its description in table.&lt;/P&gt;&lt;P&gt;so when i give input in table control it checks the value for all rows of table control. because of loop. but if i write field statement outside the loop it is giving me error.&lt;/P&gt;&lt;P&gt;so how can i check or process my value for single row in table control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to abap and &lt;/P&gt;&lt;P&gt;I am under training....but i am learning all things myself. no proper guidance is there.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 05:13:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683730#M1576281</guid>
      <dc:creator>former_member925838</dc:creator>
      <dc:date>2011-03-02T05:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: Checking Input field in table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683731#M1576282</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;Try this inside your table control loop. wa_tabctrl denotes the field which you are using on the screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CHAIN.&lt;/P&gt;&lt;P&gt;      FIELD:&lt;/P&gt;&lt;P&gt;             wa_tabctrl-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      MODULE CHECKMATNR 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;-Danish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 10:36:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-input-field-in-table-control/m-p/7683731#M1576282</guid>
      <dc:creator>Danish</dc:creator>
      <dc:date>2011-03-02T10:36:15Z</dc:date>
    </item>
  </channel>
</rss>

