<?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 Greyed out fields not triggering ON CHAIN-REQUEST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544401#M1428597</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text box on a screen with input not possible (greyed box). But the value of that text box can be changed by clicking a button in the same screen. Now, I wrote a code to give a pop-up upon exiting the screen, if the user didn't save the data. I got this fuctionality using keyword ON CHAIN-REQUEST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is getting triggered, if the user changes the value on the white text box. But I changed the value of greyed text box using the button on the screen. For that, ON CHAIN-REQUEST is not getting triggered. Please help me out to solve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS AFTER INPUT.
  CHAIN.
    FIELD: zmm_spa_item-uptby_tc, " Greyed text box
           zmm_spa_item-rmrk1_tc,
           zmm_spa_item-rmrk2_tc,
           zmm_spa_item-rmrk3_tc,
           zmm_spa_item-rmrk4_tc.
    MODULE get_changed_data ON CHAIN-REQUEST.
  ENDCHAIN.
  MODULE user_command_2300.

MODULE get_changed_data INPUT.

  DATA: lv_answer TYPE c .

  CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
      titlebar       = 'Exit Review'
      text_question  = 'Do you wish to save your data?'
      text_button_1  = 'Yes'
      text_button_2  = 'No'
    IMPORTING
      answer         = lv_answer
    EXCEPTIONS
      text_not_found = 1
      OTHERS         = 2.
  IF lv_answer EQ '1'.
    MODIFY zmm_spa_header FROM zmm_spa_header.
    MODIFY zmm_spa_item FROM zmm_spa_item.
    IF sy-subrc EQ 0.
      MESSAGE s001 WITH 'Saved'.
    ENDIF.
  ELSEIF lv_answer EQ 'A'.
    CLEAR ok_code.
    LEAVE SCREEN.
  ENDIF.

ENDMODULE.                 " GET_CHANGED_DATA  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yasin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Jan 2010 10:55:41 GMT</pubDate>
    <dc:creator>former_member1292715</dc:creator>
    <dc:date>2010-01-16T10:55:41Z</dc:date>
    <item>
      <title>Greyed out fields not triggering ON CHAIN-REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544401#M1428597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text box on a screen with input not possible (greyed box). But the value of that text box can be changed by clicking a button in the same screen. Now, I wrote a code to give a pop-up upon exiting the screen, if the user didn't save the data. I got this fuctionality using keyword ON CHAIN-REQUEST. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is getting triggered, if the user changes the value on the white text box. But I changed the value of greyed text box using the button on the screen. For that, ON CHAIN-REQUEST is not getting triggered. Please help me out to solve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PROCESS AFTER INPUT.
  CHAIN.
    FIELD: zmm_spa_item-uptby_tc, " Greyed text box
           zmm_spa_item-rmrk1_tc,
           zmm_spa_item-rmrk2_tc,
           zmm_spa_item-rmrk3_tc,
           zmm_spa_item-rmrk4_tc.
    MODULE get_changed_data ON CHAIN-REQUEST.
  ENDCHAIN.
  MODULE user_command_2300.

MODULE get_changed_data INPUT.

  DATA: lv_answer TYPE c .

  CALL FUNCTION 'POPUP_TO_CONFIRM'
    EXPORTING
      titlebar       = 'Exit Review'
      text_question  = 'Do you wish to save your data?'
      text_button_1  = 'Yes'
      text_button_2  = 'No'
    IMPORTING
      answer         = lv_answer
    EXCEPTIONS
      text_not_found = 1
      OTHERS         = 2.
  IF lv_answer EQ '1'.
    MODIFY zmm_spa_header FROM zmm_spa_header.
    MODIFY zmm_spa_item FROM zmm_spa_item.
    IF sy-subrc EQ 0.
      MESSAGE s001 WITH 'Saved'.
    ENDIF.
  ELSEIF lv_answer EQ 'A'.
    CLEAR ok_code.
    LEAVE SCREEN.
  ENDIF.

ENDMODULE.                 " GET_CHANGED_DATA  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yasin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2010 10:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544401#M1428597</guid>
      <dc:creator>former_member1292715</dc:creator>
      <dc:date>2010-01-16T10:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Greyed out fields not triggering ON CHAIN-REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544402#M1428598</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;PRE&gt;&lt;CODE&gt;Try using the following

  CHAIN.
    FIELD: zmm_spa_item-uptby_tc, " Greyed text box
           zmm_spa_item-rmrk1_tc,
           zmm_spa_item-rmrk2_tc,
           zmm_spa_item-rmrk3_tc,
           zmm_spa_item-rmrk4_tc.
    MODULE get_changed_data ON CHAIN-INPUT. "CHAIN-REQUEST.
  ENDCHAIN.

Or take a flag in the User Command of button where you are making this field Grey
if that flag is = 'X' or Check sy-datar

Then call the Function Module POP UP&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheerz&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2010 11:17:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544402#M1428598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-16T11:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Greyed out fields not triggering ON CHAIN-REQUEST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544403#M1428599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input. But I have 10 screen with many buttons and based on the button clicked, I change the value of the grey text box. So I want some generic thing like ON CHAIN-REQUEST. I can even compare the old value from PBO and new value from PAI, if they are not same, I can give a pop-up. But I am just wondering, is there anyother way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Yasin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2010 11:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/greyed-out-fields-not-triggering-on-chain-request/m-p/6544403#M1428599</guid>
      <dc:creator>former_member1292715</dc:creator>
      <dc:date>2010-01-16T11:38:07Z</dc:date>
    </item>
  </channel>
</rss>

