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.
Showing results for 
Search instead for 
Did you mean: 

FM 'CRM_ORDER_SAVE' test run question

Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi all,

Is there any test run flag for this FM?

Actually, I just want to go through the check logic inside the FM, but do not want to do real save.

If there is no such flag, what is the better way to do "return after check but befor save"?


0 Kudos

Hi Eric,

I don't think there is any Test Run flag for this FM. But if you really need to check if the FM execution was successful without actually saving the data, you can take below approach:

Pass IV_UPDATE_TASK_LOCAL = 'X'; this will make system save the data synchronously only after a COMMIT. Basically, this parameter triggers SET UPDATE TASK LOCAL. Therefore, you can make use of it and use ROLLBACK after the execution of FM.

However, I suppose you would also need to know whether there was any errors/messages during saving the order(s). For this, you have to pass IV_SAVE_FRAME_LOG = 'X' and a log handle to IV_LOG_HANDLE and also read the Changing parameter CV_LOG_HANDLE.

[For more details on how to create, use and read the log handle, please go through the Additional Information in the long text of this parameter which will basically elaborate the use of Log Handle using certain FMs like CRM_MESSAGE_REGISTER, CRM_MESSAGE_GET_MSG_INFO and CRM_MESSAGE_SEARCH.]

Hope this helps. Please let me know if it worked or helped with some alterations.