<?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: Syntax error in modify statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081806#M730897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish,&lt;/P&gt;&lt;P&gt;         Do you mean to say that IT_STATUS is a "TABLES" parameter? Did you try using "CHANGING"? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, here's something that i found in SAP Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For sorted tables and hashed tables, no table key components may be specified after TRANSPORTING.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Dec 2007 05:48:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-05T05:48:25Z</dc:date>
    <item>
      <title>Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081796#M730887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; There is an Internal table IT_STATUS which is the Parameter in BADI Method IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code i have written&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Data:  wa_status type cobai_s_status,
                   stat TYPE TABLE OF jstat,
                   wa_stat type jstat.

      CALL FUNCTION 'STATUS_READ'
        EXPORTING
         client                 = sy-mandt
          objnr                  = gv_objnr
*     ONLY_ACTIVE            = ' '
*   IMPORTING
*     OBTYP                  =
*     STSMA                  =
*     STONR                  =
       TABLES
         status                 = stat
       EXCEPTIONS
         object_not_found       = 1
         OTHERS                 = 2
                .
      IF sy-subrc &amp;lt;&amp;gt; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
       loop at it_status into wa_status.
        read table stat into wa_stat with key STAT = wa_status-stat.
        if sy-subrc = 0.
         wa_status-stat = wa_stat-stat.
         wa_status-INACT = wa_stat-INACT.
         modify it_status from wa_status transporting stat inact.
        endif.
       endloop.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At Modify statement it is giving a syntax error 'The &amp;lt;b&amp;gt;field "IT_STATUS" cannot be changed.-&amp;lt;/b&amp;gt;'. what could be the reason?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide me the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 18:41:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081796#M730887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T18:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081797#M730888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tested this so no guarantees:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: status_index type sy-tabix.       "&amp;lt;====

LOOP AT it_status INTO wa_status.
  status_index = sy-tabix.      "&amp;lt;=====
  READ TABLE stat INTO wa_stat WITH KEY stat = wa_status-stat.
  IF sy-subrc = 0.
    wa_status-stat = wa_stat-stat.
    wa_status-inact = wa_stat-inact.
    MODIFY it_status index status_index       "&amp;lt;=====
      FROM wa_status TRANSPORTING stat inact.
  ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:04:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081797#M730888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T19:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081798#M730889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Rob, No Luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:08:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081798#M730889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T19:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081799#M730890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your code with my modifications?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:20:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081799#M730890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T19:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081800#M730891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Satish,&lt;/P&gt;&lt;P&gt;The table IT_STATUS is am Importing Parameter for the Method BEFORE_UPDATE and you cannot Modify the Importing parameter of a Method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081800#M730891</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-12-03T19:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081801#M730892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the whole code which i had written in method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;METHOD if_ex_workorder_update~before_update.
  DATA: gv_aufnr TYPE afih-aufnr,
        gv_objnr TYPE jest-objnr,
        stat TYPE TABLE OF jstat,
        wa_stat TYPE jstat,
        wa_header TYPE cobai_s_header,
        wa_status TYPE cobai_s_status,
        it_status_new TYPE cobai_t_status.

  DATA: status_index TYPE sy-tabix.
  BREAK-POINT.
  LOOP AT it_header INTO wa_header.
    SELECT SINGLE aufnr FROM afih INTO gv_aufnr WHERE warpl = wa_header-warpl AND abnum = 1.
    IF sy-subrc = 0.

      CONCATENATE 'OR' gv_aufnr INTO gv_objnr.
      CALL FUNCTION 'STATUS_READ'
        EXPORTING
         client                 = sy-mandt
          objnr                  = gv_objnr
*     ONLY_ACTIVE            = ' '
*   IMPORTING
*     OBTYP                  =
*     STSMA                  =
*     STONR                  =
       TABLES
         status                 = stat
       EXCEPTIONS
         object_not_found       = 1
         OTHERS                 = 2
                .
      IF sy-subrc &amp;lt;&amp;gt; 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        LOOP AT it_status INTO wa_status.
          status_index = sy-tabix.
          READ TABLE stat INTO wa_stat WITH KEY stat = wa_status-stat.
          IF sy-subrc = 0.
            wa_status-stat = wa_stat-stat.
            wa_status-inact = wa_stat-inact.
            MODIFY it_status INDEX status_index FROM wa_status TRANSPORTING stat inact.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will get resolved &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;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:24:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081801#M730892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T19:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081802#M730893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Satish,&lt;/P&gt;&lt;P&gt;The table IT_STATUS is am Importing Parameter for the Method BEFORE_UPDATE and you cannot Modify the Importing parameter of a Method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this not correct??? Hope your issue is solved &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:27:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081802#M730893</guid>
      <dc:creator>former_member195698</dc:creator>
      <dc:date>2007-12-03T19:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081803#M730894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abhishek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply, but IT_STATUS is updating the Work Order User Status with initial status after Creating the Work Order. I need to change that status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 19:29:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081803#M730894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T19:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081804#M730895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the Field symbols to change the tables which are not changable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this in BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  FIELD-SYMBOLS: &amp;lt;tab&amp;gt; type COBAI_T_STATUS.

  ASSIGN ('(SAPLCOIH)IT_STATUS') TO &amp;lt;tab&amp;gt;. 
 &amp;lt;tab&amp;gt; = IT_STATUS.
" SAPLCOIH  is main program
" IT_STATUS table you want to change of the program  - I am not sure which table you are changing from the main program.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 20:28:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081804#M730895</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-12-03T20:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081805#M730896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_STATUS is the table parameter in BADI Method IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This Internal table will update the System Status &amp;amp; User Status of the Work Order when it is created and updating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before updating the system status &amp;amp; User status, i need to change those values from the program to update with my values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you understood my scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2007 09:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081805#M730896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-04T09:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081806#M730897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish,&lt;/P&gt;&lt;P&gt;         Do you mean to say that IT_STATUS is a "TABLES" parameter? Did you try using "CHANGING"? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, here's something that i found in SAP Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For sorted tables and hashed tables, no table key components may be specified after TRANSPORTING.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2007 05:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081806#M730897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-05T05:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error in modify statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081807#M730898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;years later, I have the same problem.&lt;/P&gt;&lt;P&gt;I'm sure, you have the solution for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Wolfgang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 16:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-in-modify-statement/m-p/3081807#M730898</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-18T16:24:49Z</dc:date>
    </item>
  </channel>
</rss>

