There's one Dump of 'MESSAGE_TYPE_X' for the program SAPLCOKO1 when the user tries to modify one particular production order.

The dump point is the return of the function module 'STATUS_TEXT_EDIT', and the root error message is BS(001) which is "No status object is available for ORD XXXXXX" when the program fetches the status object from DB for this production order.

So why this production order doesn't have a status entry at JSTO?
Check 1: Notes 52546 - Status object does not exist in the sales order?
This particular production order comes from one sales order, check the linkage of the sales order and production order by AFPO-KDAUF = VBAK-VBELN where AFPO-AUFNR equals the production order number.
After creating a sales order, the status profile does not exist on the header or item level. The system displays the error message BS001 "No status object is available for &" when you change the sales document.
You can use the repair program SDSTATU2 to correct the incorrect sales and distribution documents. You can also use report SDSTATU1 to list all incorrect documents.
Nothing special after checking the order header level profile setting by VOV8 and item level profile setting by VOV7. Field VBAK-OBJNR is blank at the header and got valid VBAP-OBJNR per SO items. Seems no issue from the SO level.
If we check program SDSTATU1/SDSTATU2 will find that only VBAK-OBJNR <> SPACE will be considered, VBAK-OBJNR is blank should be fine. Besides, it'll try to use FM
'STATUS_OBJECT_CREATE' to re-create the status for the order.
Check 2: Notes 2720065 - Object status is not updated to table JEST?
Object statuses with object types e.g. OKP, ORH are not updated to table JEST even if the production order can be saved successfully.
Due to this, unexpected issues (e.g. short dump :MESSAGE_TYPE_X) occur when changing the production order.
Indeed, there's no entry from JEST for this production order; but In T-code: BS12, the "External status" indicator is not been ticked for object type: OKP or ORH, should not be this one~
Check 3: Notest 94699 - Production order/network/process order: Objects without status object
There are no entries in the table JEST or JSTO.
There can be various causes for objects without a status object:
A "commit work" is triggered within a user exit or a modification before the actual "commit work" of the production order is started and, therefore, before the number assignment of the status objects. A "commit work" statement must not be executed within a user exit or a modification in an SAP transaction!
One customized program called ZPSFC008B should be created which should be able to fix the errored production order.

And this works for me.
