Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Syntax error in modify statement

Hi Friends,

There is an Internal table IT_STATUS which is the Parameter in BADI Method IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE.

Below is the code i have written

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 <> 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.

At Modify statement it is giving a syntax error 'The <b>field "IT_STATUS" cannot be changed.-</b>'. what could be the reason?

Please provide me the solution.

Thanks & Regards,

Satish

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question