Current position: Home > Default > CRM order giving the document could not be saved exception! Please help!
CRM order giving the document could not be saved exception! Please help!
I am changing the status of a order using CRM_STATUS_CHANGE_EXTERN and CRM_STATUS_CHANGE_INTERN.
After this I call CRM_ORDER_INITIALIZE and the BAPI_BUSPROCESSND_SAVE.
CALL FUNCTION 'CRM_ORDER_INITIALIZE'
it_guids_to_init = lt_crmd_guids
iv_init_frame_log = 'X'
iv_keep_lock = 'X'
error_occurred = 1
OTHERS = 2.
ls_obj_save-guid = v_header_guid.
append ls_obj_save TO lt_obj_save.
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
UPDATE_TASK_LOCAL = 'X' "commented. Taking default
SAVE_FRAME_LOG = 'X'
LOG_HANDLE = lv_log_handle
OBJECTS_TO_SAVE = lt_obj_save
SAVED_OBJECTS = lt_obj_saved
RETURN = lt_return.
The function BAPI_BUSPROCESSND_SAVE is returning error: The document could not be saved in it_return. I am not getting any other details. What am I doing wrong? Please help!
Thanks & Regards
The SPRO settings seems to be fine.
The problem is that the order is not getting saved whenever there is backward status change. However if I see the item status via tcode "crmd_order" then it actually shows the new status. In other words status is changing but still order is not getting saved.
When I debugged the code I found that first It has successfully executed the FM CRM_STATUS_CHANGE_EXTERN and then when CRM_ORDER SAVE is called the parameter et_saved_objects is empty. I am passing header Guid in it_objects_to_save. If order is saved properly then et_saved_objects should be filled with order guid.
CALL FUNCTION 'CRM_ORDER_SAVE'
it_objects_to_save = lt_save
et_saved_objects = lt_saved_obj
document_not_saved = 1
OTHERS = 2.
On further debugging inside CRM_ORDER SAVE I found that the FM CRM_EVENT_PASS_INFO_EXE_OW returns lt_events empty. That means the given guid is not registered for saving. Why is this so?
are there objects registered for saving
call function 'CRM_EVENT_PASS_INFO_EXE_OW'
iv_exetime = gc_event_exec_time-save_order
iv_order_guid = ls_object_to_save
iv_obj_kind = gc_object_kind-orderadm_h
et_event_calls = lt_events
others = 99.
if lt_events is initial.
The problem is when the order is not getting saved the status change is not getting transferred to BW or BI.
What could be the issue?
Edited by: gopalkrishna baliga on Apr 7, 2011 5:59 AM
Edited by: gopalkrishna baliga on Apr 7, 2011 6:09 AM
- 1Is it possible that someone can disable my OUTLOOK EXPRESS by not letting me log in my password. and also not allowing me to log in to my gaming account. 10-11
- 2So I am trying to copy my hard drive "Macintosh HD" to an external hard drive, i want to use Terminal and have tried many ways. For example cp -r /Volumes/"Macintosh HD" /Volumes/"NO NAME". When i do it says No such file or directory. Ideas? 10-11
- 3Store Business Document 10-11
- 4Can I turn off the Properties Panel in Photoshop CC? 10-11
- 5Can I set up folders for major classifications of music as opera, country, etc. and then put all the albums with the genre into those folders folders? 10-11
- 6Creating Excel + word document i java 11-30
- 7Oracle Date function. 11-30
- 8My iPhone3GS is stuck at the apple logo. 11-30
- HP Deskjet F4480 Unable to Scan in 10.610/11
- How to install 2 instances of minisap on the same computer10/11
- Here we go again - software update available (not)10/11
- Mac Mini as a "Media Center"...Anyone doing this?10/11
- Ever since I updated firefox to 3.6.13 I am no longer able to bookmark any pages. I am on a netbook running 32 bit windows 710/11
- Which DTW template to use to import all the open G/L Accounts 14k accounts.10/11
- Using amazon prime11/30
- Which thread for events?11/30
- Joining vbak to cdhdr table for document changes11/30
- Changing name of Apple bluetooth keyboard?11/30