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: 

CRMD_ORDER

former_member211992
Active Participant
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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.

former_member211992
Active Participant
0 Kudos

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.

ceedee666
Active Contributor

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

former_member211992
Active Participant
0 Kudos

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 ..

former_member211992
Active Participant
0 Kudos

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 ..

Former Member
0 Kudos

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.