11-21-2016 12:46 PM
Dear all
I have to change the header status of milestone billing thro Fm , i have searched forum got
CRM_STATUS_CHANGE_INTERN
CRM_STATUS_CHANGE_EXTERN
The status flow is In process-->released-->completed , now i have go like completed --> released. i have tried
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CALL FUNCTION 'CRM_ORDER_SAVE'
its working fine if i go like released--->completed but its not working if i go backward like completed -->released.i also tried by using fm's CRM_STATUS_CHANGE_INTERN , CRM_STATUS_CHANGE_EXTERN its not working
How to rectify this
Thanks
11-21-2016 11:41 PM
Have you debugged the Function Module when you try and go from Completed to Released? I suspect you will find something in the return table outlining your problem, as i do not believe you can go BACK a stage.
11-22-2016 7:05 AM
Thanks for your reply dan
But how that is happening when i do manually? CALL FUNCTION 'CRM_ORDER_MAINTAIN' gives sy-subrc eq 0 , but CRM_ORDER_SAVE not returning any values in et_Saved_objects.
11-22-2016 7:25 AM
Hi,
instead of using the CRM_ORDER* function modules I'd suggest that you try to change the status using the BOL objects. These are usually much easier to use (cf my blog for some examples https://blogs.sap.com/2016/03/08/bol-or-bapi-which-api-to-use-in-crm-development/)
Christian
11-22-2016 12:55 PM
I found one thing that while calling CRM_ORDER_SAVE , inside there is another Fm CRM_EVENT_PASS_INFO_EXE_OW ..this return values in 'lt_events' if i do manually but thro my zprogram its coming empty ..
11-23-2016 9:49 AM
Hi all
I have created one order with status profile , its working fine for me but some order does not have status profile in this case we do manually by clicking the release flag but for orders with status profile we do by drop down .when i use drop down 'CRM_ORDER_MAINTAIN' getting triggered ..
but if i use flag to release fm CALL FUNCTION 'CRM_ORDER_MAINTAIN' not getting triggered ..
11-28-2016 8:56 PM
This is copied from another scn thread;
CRM_ORDER_MAINTAIN allows you to make changes to a document in memory/buffer.
CRM_ORDER_SAVE allows you to save those changes made by CRM_ORDER_MAINTAIN, in database.
So sounds like you need to use both?
Also check the et_objects_not_saved to see if your values are going there - if not then they arent being passed to save so from the above bold writing you would need to call that FM first then save?
Also check et_exception just in case there is an error in there.