Openning document in CRMD_ORDER transaction

Problem: You want to programmatically open a document in CRMD_ORDER transaction.

Solution: One solution is to use Batch Input and solution presented in one of my previous posts: [cref openning-transaction-in-a-new-windowsession].

On the other hand there is a very simple and fast way to achive this goal (presented below). You can show your document in the display or change mode if needed.

  CONSTANTS: lc_mode_display TYPE crmt_component_type VALUE 'A',
             lc_mode_change TYPE crmt_component_type VALUE 'B'.
 
  DATA: lv_document_guid TYPE crmt_object_guid.
 
  SUBMIT crm_busprocessnd_submit_report
    WITH guid =  lv_document_guid
    WITH mode =  lc_mode_display
    AND RETURN.
  CONSTANTS: lc_mode_display TYPE crmt_component_type VALUE 'A',
             lc_mode_change TYPE crmt_component_type VALUE 'B'.

  DATA: lv_document_guid TYPE crmt_object_guid.

  SUBMIT crm_busprocessnd_submit_report
    WITH guid =  lv_document_guid
    WITH mode =  lc_mode_display
    AND RETURN.

The only con of it is that CRMD_ORDER is opened in the same session.

Komentowanie jest zakończone.