Skip to Content
avatar image
Former Member

How to identify where the change action on BP is executed in?

Hi experts,

In our landscape,we can make changes on BP in CRM GUI,CRM WEB UI,CRM PORTAL. How can I identify where the change is from in ABAP coding?

Thanks.

Jerry.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 19, 2017 at 01:34 AM

    I found the input channel determine logic in SAP FM CRM_PROCTYP_FROM_OBJTYP_SEL_CB,

    codings like below:

    DATA lr_profile TYPE REF TO if_crm_ui_profile.

    DATA lv_profile_type TYPE crmt_ui_profile_type.

    lr_profile ?= cl_crm_ui_profile=>get_instance( ).

    lv_profile_type = lr_profile->get_profile_type( ).

    CASE lv_profile_type.

    WHEN 'C'. "CRM Web UI

    lv_channel = 'GUI'.

    WHEN 'B'. "IC Web Client

    lv_channel = 'ICW'.

    WHEN OTHERS. "On demand to be defined...

    * Firstly, check whether the channel is GUI or IAC.

    CALL FUNCTION 'CCM_INFO_GETKEY'

    EXPORTING object_name = 'PROFILES'

    keyname = 'CICPROF'

    IMPORTING value = lv_prof_value

    EXCEPTIONS

    getinfo_failed = 1

    OTHERS = 2.

    IF lv_prof_value IS INITIAL.

    lv_channel = 'GUI'.

    ELSE.

    lv_channel = 'IAC'.

    ENDIF. ENDCASE.

    Can I use this in the outbound BDOC context to determine the user's input channel?

    Thanks.

    Jerry.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 26, 2017 at 11:20 AM

    Hi Jerry,

    I think it's better to put this code in the application layer and then based on the outcome you can set a flag. You can pass the flag along with other values in the Bdoc to influence your program flow in the Bdocs.

    The only reason why I suggested the above approach is to make sure that COMMIT WORK should not clear any SAP Buffers which holds the value of the channel. I think the old values should be there. But still you can double check the logic by putting the code in the Bdoc and test the scenario.

    Hope this helps.

    Thanks,

    Samantak.

    Add comment
    10|10000 characters needed characters exceeded