<?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: field enable for input when error occurs in module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843232#M1318381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i say when i execute the module of main program. Main program throws the error to me at that time all subscrren fields are disable for input mode so what i do for enabling the subscreen fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2009 14:29:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-22T14:29:56Z</dc:date>
    <item>
      <title>field enable for input when error occurs in module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843230#M1318379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we use field or chain to enable field if error occurs within pai module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i use tabstrip control&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in main screen there is one tabstrip control.&lt;/P&gt;&lt;P&gt;for that i have two subscreen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when errors occurs on main screen module then how can i enable the subscrren fields for input mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2009 09:38:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843230#M1318379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-21T09:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: field enable for input when error occurs in module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843231#M1318380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"main screen's PAI 
 CHAIN.
  FIELD ...
  FIELD ...
    MODULE main_pai.
ENDCHAIN.

CALL SUBSCREEN sub.  

"in program
data: flag type c.

MODULE main_pai INPUT.
   if condition = true.
      flag = 'X'.
   endif.
ENDMODULE.

"subscreen's PAI 
CHAIN.
   FIELD ...
   FIELD ...
       MODULE sub_pai.
ENDCHAIN.

"in program

MODULE sub_pai INPUT.
   if flag = 'X'.
      message 'Please enter correct value' type 'E'.
   endif.
ENDMODULE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2009 11:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843231#M1318380</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-21T11:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: field enable for input when error occurs in module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843232#M1318381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i say when i execute the module of main program. Main program throws the error to me at that time all subscrren fields are disable for input mode so what i do for enabling the subscreen fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 14:29:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843232#M1318381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-22T14:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: field enable for input when error occurs in module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843233#M1318382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, there is no direct soltion because you are working with two screen and can't group those field together. &lt;/P&gt;&lt;P&gt;You could send a &lt;STRONG&gt;W&lt;/STRONG&gt; message on main screen's PAI, so after you press ENTER all fields will be back ready for input. The problem is that you want only those fields from subscreen be left active, not those from main screen. This is kind of overcomming solution which comes to my mind:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say we have two fields in main screen:&lt;/P&gt;&lt;P&gt;- SFLIGHT-CARRID&lt;/P&gt;&lt;P&gt;- SFLIGHT-CONNID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And one field in subscreen&lt;/P&gt;&lt;P&gt;- SFLIGHT-FLDATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now lets say when you enter CARRID diffetent than 'LH' we will disable CONNID field but leave FLDATE input enabled.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"first in program we declare a strcutre to transfer data b/w screen and program
tables: sflight. 

"then we use field FLAG which will indicate when user picks value different from LH
DATA: flag type c.

"and we use additional field for storing field name which is not to be disabled at main screen
DATA: field_name LIKE screen-name.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now lets say screen 100 is mian screen and 200 is subscreen so the flow dialog will look like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"screen 100
PROCESS BEFORE OUTPUT.
  MODULE pbo_0100.
  CALL SUBSCREEN sub_area INCLUDING sy-repid '0200'.

PROCESS AFTER INPUT.
  CALL SUBSCREEN sub_area.
  FIELD sflight-carrid MODULE validate.   "this field we want to validate
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our validate module would look like&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODULE validate INPUT.
  IF sflight-carrid ne 'LH'.
    MESSAGE 'Only LH entry allowed' TYPE 'W'.  "&amp;lt;- message type W will allow to leave rest fields input ready
                                                                      "we will disable rest fields ourselves
    flag = 'X'.        "mark that error was encountered
    field_name = 'SFLIGHT-CARRID'. "remeber field name where error was raised (we wan't to have ability to correct our entry, so this field must stay input ready)
  ELSE.
    CLEAR: flag, field_name.  "otherwise LH entry so everything input enabled
  ENDIF.
ENDMODULE.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PBO we will therefore disable all fields except this one if error was raised&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODULE pbo_0100 OUTPUT.
  LOOP AT SCREEN.
    IF flag = 'X' AND screen-name NE field_name.
      screen-input = 0.   
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
ENDMODULE.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way each time user select entry other than LH, CONNID field will be disabled, CARRID we will be enabled for correction and subscreen field FLDATE is left input enabled &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2009 15:12:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-enable-for-input-when-error-occurs-in-module/m-p/5843233#M1318382</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-22T15:12:24Z</dc:date>
    </item>
  </channel>
</rss>

