Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

STATUS_CHANGE_INTERN

Former Member
0 Likes
5,208

Hey,

what is wrong wit this code?

REPORT ZEQUISTAT.

"I0184 = ELAG

DATA status TYPE TABLE OF JSTAT WITH HEADER LINE.
status-STAT = 'I0184'.



CALL FUNCTION 'STATUS_CHANGE_INTERN'
  EXPORTING
*   CHECK_ONLY                = ' '
   CLIENT                     = '100'
    objnr                     = 'IE000000000010006921'
*   ZEILE                     = ' '
*   SET_CHGKZ                 =
* IMPORTING
*   ERROR_OCCURRED            =
*   OBJECT_NOT_FOUND          =
*   STATUS_INCONSISTENT       =
*   STATUS_NOT_ALLOWED        =
  tables
    status                    = status
* EXCEPTIONS
*   OBJECT_NOT_FOUND          = 1
*   STATUS_INCONSISTENT       = 2
*   STATUS_NOT_ALLOWED        = 3
*   OTHERS                    = 4
          .



CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = ''
 "IMPORTING
   "RETURN        = ''
          .

With SE37 it is working.

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
4,517


DATA status TYPE TABLE OF JSTAT WITH HEADER LINE.
status-STAT = 'I0184'.
append status.     " <-- here




CALL FUNCTION 'STATUS_CHANGE_INTERN'
  EXPORTING
*   CHECK_ONLY                = ' '
   CLIENT                     = '100'
    objnr                     = 'IE000000000010006921'
*   ZEILE                     = ' '
*   SET_CHGKZ                 =
* IMPORTING
*   ERROR_OCCURRED            =
*   OBJECT_NOT_FOUND          =
*   STATUS_INCONSISTENT       =
*   STATUS_NOT_ALLOWED        =
  tables
    status                    = status
* EXCEPTIONS
*   OBJECT_NOT_FOUND          = 1
*   STATUS_INCONSISTENT       = 2
*   STATUS_NOT_ALLOWED        = 3
*   OTHERS                    = 4
          .



CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = ''
 "IMPORTING
   "RETURN        = ''
          .

Hey,

what is wrong wit this code?

REPORT ZEQUISTAT.

"I0184 = ELAG

DATA status TYPE TABLE OF JSTAT WITH HEADER LINE.
status-STAT = 'I0184'.



CALL FUNCTION 'STATUS_CHANGE_INTERN'
  EXPORTING
*   CHECK_ONLY                = ' '
   CLIENT                     = '100'
    objnr                     = 'IE000000000010006921'
*   ZEILE                     = ' '
*   SET_CHGKZ                 =
* IMPORTING
*   ERROR_OCCURRED            =
*   OBJECT_NOT_FOUND          =
*   STATUS_INCONSISTENT       =
*   STATUS_NOT_ALLOWED        =
  tables
    status                    = status
* EXCEPTIONS
*   OBJECT_NOT_FOUND          = 1
*   STATUS_INCONSISTENT       = 2
*   STATUS_NOT_ALLOWED        = 3
*   OTHERS                    = 4
          .



CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = ''
 "IMPORTING
   "RETURN        = ''
          .

With SE37 it is working.

5 REPLIES 5
Read only

FredericGirod
Active Contributor
4,518


DATA status TYPE TABLE OF JSTAT WITH HEADER LINE.
status-STAT = 'I0184'.
append status.     " <-- here




CALL FUNCTION 'STATUS_CHANGE_INTERN'
  EXPORTING
*   CHECK_ONLY                = ' '
   CLIENT                     = '100'
    objnr                     = 'IE000000000010006921'
*   ZEILE                     = ' '
*   SET_CHGKZ                 =
* IMPORTING
*   ERROR_OCCURRED            =
*   OBJECT_NOT_FOUND          =
*   STATUS_INCONSISTENT       =
*   STATUS_NOT_ALLOWED        =
  tables
    status                    = status
* EXCEPTIONS
*   OBJECT_NOT_FOUND          = 1
*   STATUS_INCONSISTENT       = 2
*   STATUS_NOT_ALLOWED        = 3
*   OTHERS                    = 4
          .



CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = ''
 "IMPORTING
   "RETURN        = ''
          .
Read only

4,517

or

status = value tt_jstat( ( stat = 'I0184' ) ).
Read only

0 Likes
4,517

Thank you, it works 🙂

Read only

4,517

you should try to use VALUE instead of playing with header line.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
4,517

what is wrong, the usage of an unreleased FM.

System statuses are associated with processes that set/unset them, look for the system status in transaction BS23, where-used search icon.

Did you look for BAPI FM of function group ITOB_BAPI_EQ or class CL_ITOB_BAPI_EQ ?

In your case, is the equipment actually in stock, are there correct data in tables such as EQBS, etc?