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_EXTERN

Former Member
0 Likes
10,210

Hello,

I'm trying to use the FM, "STATUS_CHANGE_EXTERN" to change the user status on a PM order.

I am calling the FM as follows:

CALL FUNCTION 'STATUS_CHANGE_EXTERN'
          EXPORTING
*           CHECK_ONLY                = ' '
           CLIENT                    = SY-MANDT
            objnr                     = 'OR000001000005'
            user_status               = 'E0001'
*           SET_INACT                 = ' '
           SET_CHGKZ                 = 'X'
*           NO_CHECK                  = ' '
*         IMPORTING
*           STONR                     =
         EXCEPTIONS
           OBJECT_NOT_FOUND          = 1
           STATUS_INCONSISTENT       = 2
           STATUS_NOT_ALLOWED        = 3
           OTHERS                    = 4
                  .

The FM returns return code 0, but there are no changes to the PM order. Any ideas why?

Hello,

I'm trying to use the FM, "STATUS_CHANGE_EXTERN" to change the user status on a PM order.

I am calling the FM as follows:

CALL FUNCTION 'STATUS_CHANGE_EXTERN'
          EXPORTING
*           CHECK_ONLY                = ' '
           CLIENT                    = SY-MANDT
            objnr                     = 'OR000001000005'
            user_status               = 'E0001'
*           SET_INACT                 = ' '
           SET_CHGKZ                 = 'X'
*           NO_CHECK                  = ' '
*         IMPORTING
*           STONR                     =
         EXCEPTIONS
           OBJECT_NOT_FOUND          = 1
           STATUS_INCONSISTENT       = 2
           STATUS_NOT_ALLOWED        = 3
           OTHERS                    = 4
                  .

The FM returns return code 0, but there are no changes to the PM order. Any ideas why?

3 REPLIES 3
Read only

Former Member
0 Likes
4,603

Try 'COMMIT WORK' after using FM.

Read only

0 Likes
4,603

Perfect. Thanks!

Read only

Former Member
0 Likes
4,603

Hi,

Check the documentation of the FM...

Notes

The status change is first executed in the internal buffer only and is written to the database later using a "COMMIT WORK".

If the message handler is active, no error messages or exceptions are triggered. Instead an appropriate message is written in the message handler.

Thanks and Regards,

Bharat Kumar Reddy.V