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

BAPI - STATUS_CHANGE_EXTERN

Former Member
0 Likes
5,777

Hello

We are using STATUS_CHANGE_EXTERN to update PLM Work Order and Operation statuses. When the status is changed manually using IW32, a change record is created. However, using the BAPI there is not, even though the status gets changed correctly.

Can any one assist?

Regards

Richard

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,342

One of the import parameter of STATUS_CHANGE_EXTERN is SET_CHGKZ. Pass 'X' to this parameter and a change number will get generated.

6 REPLIES 6
Read only

Former Member
0 Likes
3,343

One of the import parameter of STATUS_CHANGE_EXTERN is SET_CHGKZ. Pass 'X' to this parameter and a change number will get generated.

Read only

0 Likes
3,342

Thank you for the answer, but it didn't work. ABAP Changed the code but still no change record, any other ideas?

1543 CALL FUNCTION 'STATUS_CHANGE_EXTERN'

EXPORTING

  • CHECK_ONLY = ' '

CLIENT = SY-MANDT

OBJNR = TBL_DATA-OBJNR

USER_STATUS = G_STATUS_TO

  • SET_INACT = ' '

SET_CHGKZ = 'X'

  • IMPORTING

  • STONR =

EXCEPTIONS

OBJECT_NOT_FOUND = 1

STATUS_INCONSISTENT = 2

STATUS_NOT_ALLOWED = 3

OTHERS = 4

.

1589 CALL FUNCTION 'STATUS_CHANGE_EXTERN'

EXPORTING

  • CHECK_ONLY = ' '

CLIENT = SY-MANDT

OBJNR = L_OBJNR

USER_STATUS = G_STATUS_TO_OP

  • SET_INACT = ' '

SET_CHGKZ = 'X'

  • IMPORTING

  • STONR =

EXCEPTIONS

OBJECT_NOT_FOUND = 1

STATUS_INCONSISTENT = 2

STATUS_NOT_ALLOWED = 3

OTHERS = 4

Read only

0 Likes
3,342

Hi, I know this is long after the question, but I have not seen any response to this.

This FM works 100%, but you have to call COMMIT WORK after a sy-subrc = 0 has been received from the FM.

PS: Remember to set SET_CHGKZ = 'X'.

Read only

0 Likes
3,342

Hello,

Late in the day for this reply but Ive had the same problem.

I used this FM when releasing production orders, followed through in debug and everything worked fine.....except that the status did not update.

But I also assumed that the FM was the end of the matter so did not select 'save' when closing CO02.

Make sure the user saves the production order or the status will not be updated.

Hope this helps.

Read only

0 Likes
3,342

Thanks Nollie, after "commit work", it works.

Read only

0 Likes
3,342

Thanks a lot.

(Nollie Hietbrink May 3, 2011 4:51 PM)

Five years after. Your advise has seen very useful.