Hi all, I have a question, please help.
I have a button on the view SOHOverView(BT115H_SLSO) to change the status.
*** part of code of event ***
CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
EXPORTING
objnr = objnr
user_status = estat
EXCEPTIONS
object_not_found = 1
status_inconsistent = 2
status_not_allowed = 3
OTHERS = 4.
"WAIT UP TO 1 SECONDS.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1. message = 'object_not_found'.
WHEN 2. message = 'status_inconsistent'.
WHEN 3. message = 'status_not_allowed'.
ENDCASE.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = abap_true.
ENDIF.
***
this code is executed and changes the state correctly, but to see the change you have to re-open the document. I need to refresh the page and the user can see the new status immediately.