Skip to Content
0

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

Jan 18, 2017 at 10:18 AM

128

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Jerry Cui Jan 19, 2017 at 01:34 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Samantak Chatterjee Jan 26, 2017 at 11:20 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded