<?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 Cannot amend the field value in class object. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707400#M892644</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Guru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program should able to validate the textfield &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;P_SCAN&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;. After the validation, it should clear the field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a interface and class. However, I cannot clear the field and a error message "The field 'P_SCAN' cannot be changed" keep on prompting when I try to activate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any idea what is not right here and why I cannot change field value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
method ZIF_TESTWONG8~CHECK_2D.
*The '#' between 'A' and 'B' is the identifier for 2D label
    SEARCH P_SCAN FOR 'A#B'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'This is 2D label.'.
      CLEAR: P_SCAN.
    ENDIF.
endmethod.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2008 10:56:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-07T10:56:51Z</dc:date>
    <item>
      <title>Cannot amend the field value in class object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707400#M892644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Guru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My program should able to validate the textfield &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;P_SCAN&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;. After the validation, it should clear the field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a interface and class. However, I cannot clear the field and a error message "The field 'P_SCAN' cannot be changed" keep on prompting when I try to activate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone has any idea what is not right here and why I cannot change field value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
method ZIF_TESTWONG8~CHECK_2D.
*The '#' between 'A' and 'B' is the identifier for 2D label
    SEARCH P_SCAN FOR 'A#B'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'This is 2D label.'.
      CLEAR: P_SCAN.
    ENDIF.
endmethod.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2008 10:56:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707400#M892644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-07T10:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot amend the field value in class object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707401#M892645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZTEST_READ_CLUSTER
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  ztest_read_cluster.

PARAMETERS: p_scan TYPE string.
** CLASS
CLASS: cl_verification DEFINITION DEFERRED.

DATA: gcl_verify TYPE REF TO cl_verification.

*----------------------------------------------------------------------*
*       CLASS cl_verification  DEFINITIOAN
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_verification DEFINITION.

  PUBLIC SECTION.

    METHODS: lcm_check CHANGING p_scan TYPE string.


ENDCLASS.                    "cl_verification DEFINITION

*----------------------------------------------------------------------*
*       CLASS cl_verfication IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_verification IMPLEMENTATION.

  METHOD: lcm_check.

    PERFORM sub_check CHANGING p_scan.


  ENDMETHOD.                    "lcm_check

ENDCLASS.                    "cl_verfication IMPLEMENTATION
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  SUB_CHECK
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      &amp;lt;--P_P_CHECK  text
*----------------------------------------------------------------------*
FORM sub_check  CHANGING cw_check TYPE string.

  SEARCH p_scan FOR 'G#S'.
  IF sy-subrc = 0.
    MESSAGE w208(00) WITH 'This is 2D label. Please scan data matrix!'
.
    CLEAR: p_scan.
  ENDIF.

ENDFORM.                    " SUB_CHECK



AT SELECTION-SCREEN ON p_scan.

  CREATE OBJECT gcl_verify.

  CALL METHOD gcl_verify-&amp;gt;lcm_check
    CHANGING
      p_scan = p_scan.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope That Helps&lt;/P&gt;&lt;P&gt;Anirban M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2008 11:17:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707401#M892645</guid>
      <dc:creator>former_member480923</dc:creator>
      <dc:date>2008-04-07T11:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot amend the field value in class object.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707402#M892646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tips. I found that I have actually used the wrong type. I should use CHANGING instead of EXPORTING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2008 14:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cannot-amend-the-field-value-in-class-object/m-p/3707402#M892646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-07T14:20:57Z</dc:date>
    </item>
  </channel>
</rss>

