Application Development 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: 

SAP 2021 - How do you update the new Phase/Subphase fields programmatically?

former_member600549
Participant

I am investigating how to trigger a phase/suibphase change from 'Ready to Schedule' to 'Ready for Execution' on operations.

Somethings I have noticed:

  • I can change the operation's status using STATUS_CHANGE_INTERN_VB to 'DSPT', but the phase does not update and it stays in 'Ready to Schedule'.
  • The strange part is in AFVC it also shows the 'Ready to Schedule' phase/subphase on fields: MAINTORDOPPROCESSPHASECODE and MAINTORDOPPROCESSSUBPHASECODE. However in fiori it will show the correct phase/subphase values, 'Ready for Execution'. This makes me suspect that there is logic in the fiori tile.
  • I can force phase/subphase to update in afvc for this operation by running bapi_alm_order_maintain and bapi_transaction_commit, and forcing a save on the operation description and the order description. This only works if I call those function modules twice in a row and only for 1 order's operations at a time. I know that is not the correct way to update phase/subphase but it is something I've tried.

Any insight into how these new fields are updated in AFVC would be helpful.

4 REPLIES 4

Sandra_Rossi
Active Contributor

SAP produces many different software. Here, I guess you're talking about S/4HANA 2021.

former_member600549
Participant

sandra.rossi that is correct. I do not think they currently have a way to do this directly. I think it will be added in 2022.

Good Question, but SAP is actually still developing that.

Warm Regards!

MohitRajput
Newcomer
0 Kudos

Did anyone tried changing Phase & Subphase for order or operations? Any solution to this?