cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_ORDER_INITIALIZE Problem?

Former Member
0 Kudos

Hi Guys,

I have following problem:

I have to delete the buffer in a BaDI for the CRMD_ORDER transaction after saving my changes. I use following FM's:



 SET UPDATE TASK LOCAL.

 CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save         = it_crmd_guids
           iv_update_task_local       = 'X'  .

COMMIT WORK

CALL FUNCTION 'CRM_ORDER_INITIALIZE'
      EXPORTING
        it_guids_to_init  = it_crmd_guids
        iv_init_frame_log = 'X'
        iv_keep_lock      = 'X'
      EXCEPTIONS
        error_occurred    = 1
        OTHERS            = 2.

My actual problem is that I get an error message which says "The log was not found" and the screen closes. It only does not happen when I save the dynpro with the Save button. It seems for me that I have to refresh the buffer for the CRMD_ORDER after deleting it.

Is my suggestion right?

If yes, does anybody has a tipp for me how to that? I have already tried to debugg the standard but with out an efficent result.

Thanks in advance.

Ali

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have found the solution.

Just use

  CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
   EXPORTING
     UPDATE_TASK_LOCAL       = True
     SAVE_FRAME_LOG          = True
   IMPORTING
     LOG_HANDLE              = lv_log_handle
    TABLES
      OBJECTS_TO_SAVE         =  objects_to_save
*     SAVED_OBJECTS           =
*     RETURN                  =
            .

and then you will have no problems with the buffer.

gopalkrishna_baliga
Participant
0 Kudos

Hi

I am facing problems with order save.

Please tell how did you resolve it?

I tried your FM but still getting document cannot be saved error.

Please help!

Thanks

Gopal