‎2021 Jun 27 4:21 PM
Hi,
I'm trying to add some code to this enhancement spot. The code doesn't trigger and I've been reading about "switches" and "conflict switches" and how you can't have multiple implemtentations....
Can anyone help me understand what I need to do to activate my code here?
The switch framework seems interesting but I can't find anything meaningful in there.
It sounds like we can only have 1 switch active. So, if we need two active, we have to.... create a custom one and copy the code from the others??? How do you find the switches? How do you create this "conflict" switch to control which one is the "active" switch?
Thanks for any help you can offer.
FORM docflow_user_command "#EC CALLED.
USING
iv_selected_item TYPE document_flow_alv_struc
ir_details_container TYPE REF TO cl_gui_docking_container
ir_tree_control TYPE REF TO cl_gui_alv_tree
CHANGING
cv_ucommand TYPE syucomm
ct_docflow TYPE document_flow_alv_tt
ct_listheader TYPE docfl_t_listheader.
STATICS: lv_details_displayed TYPE c.
DATA: ls_listheader TYPE docfl_s_listheader.
MOVE-CORRESPONDING iv_selected_item TO hide_info.
ENHANCEMENT-SECTION DOCFLOW_USER_COMMAND_1 SPOTS ES_MV75FF04ALV INCLUDE BOUND .
hide_info-vbeln = iv_selected_item-docnum.
END-ENHANCEMENT-SECTION.
*$*$-Start: DOCFLOW_USER_COMMAND_1--------------------------------------------------------------$*$*
ENHANCEMENT 1 FIN_CFIN_SDFLOW. "active version
IF iv_selected_item-vbeln IS INITIAL.
hide_info-vbeln = iv_selected_item-docnum.
ELSE.
hide_info-vbeln = iv_selected_item-vbeln.
ENDIF.
IF iv_selected_item-vrkme = cl_im_fin_cfin_sd_docflow=>gc_vrkme_cfin.
hide_info-logsys = cl_im_fin_cfin_sd_docflow=>get_logsys_cfin( ).
ENDIF.
ENDENHANCEMENT.
ENHANCEMENT 2 OIC_MV75FF04ALV. "active version
IF iv_selected_item-VBTYP_N NE 'J' AND iv_selected_item-VBTYP_N NE 'M' AND iv_selected_item-VBTYP_N NE 'N'.
hide_info-vbeln = iv_selected_item-docnum.
ENDIF.
ENDENHANCEMENT.
ENHANCEMENT 3 ZEI_SALESFORCE_DOCFLOW_SD. "active version
hide_info-vbeln = iv_selected_item-docnum.
include ZSF_SD_DOCFLOW_USER_COMMAND.
ENDENHANCEMENT.
*$*$-End: DOCFLOW_USER_COMMAND_1--------------------------------------------------------------$*$*
hide_info-posnr = iv_selected_item-itemnum.
‎2021 Jun 27 7:23 PM
Hi Ray,
There are switches assigned to the enhancement operation. So, you can go to the respective enhancement operation and find out the switches and the status whether it's active or not.
The below images shows available enhancement implementations for enhancement point ES_MV75FF04ALV

Let's open the enhancement implementation OIC_MV75FF04ALV and let's go to the Property tab.
In below image we can see the switch and the status of the implementation.

Thanks,
Gourab
‎2021 Jun 27 6:27 PM
You say that your "code doesn't trigger", have you checked that in debug you stop at the first statement of the subroutine DOCFLOW_USER_COMMAND, and after "step by step" debug, your code is not reached? If you activated your enhancement, and you don't use a switch, and you restarted the whole program, I see no reason that your code is not called.
‎2021 Jun 27 7:23 PM
Hi Ray,
There are switches assigned to the enhancement operation. So, you can go to the respective enhancement operation and find out the switches and the status whether it's active or not.
The below images shows available enhancement implementations for enhancement point ES_MV75FF04ALV

Let's open the enhancement implementation OIC_MV75FF04ALV and let's go to the Property tab.
In below image we can see the switch and the status of the implementation.

Thanks,
Gourab
‎2021 Jun 27 7:26 PM
Regarding the copy, the code inside enhancement section will be copied to the new enhancment implementation. Once you figured out the implementation which is switched on, you can copy the code from respective implementation. For example, let's say we found out the enhancement 2 active, then we can copy the code to our new implementation.

Thanks,
Gourab
‎2021 Jun 29 12:23 PM
Thank you very much. I really appreciate you taking the time to provide such a helpful explanation.
‎2021 Jun 29 12:24 PM
‎2021 Jun 29 2:40 PM
ray.mannion If you find the reason why your enhancement implementation was not called, I'd be glad to hear it 😉
‎2022 May 12 1:48 AM
Well, I'm sorry to say that I still haven't figured it out.
I implemented this same functionality at a different client (ECC) without any issues.
Thank you gdey.sapabap and sandra.rossi
I went through all of the enhancement implementations and the ones that have switches were all set to "Off".
I tried creating a new one and copying the code from the active implementation ( FIN_CFIN_SDFLOW ) - that is the one which executes when I single step into it from the statement preceeding the enhancement spot.
I can't change that one without an access key.
So, I'm still quite stuck.

‎2022 May 12 7:47 AM
I read again your initial question about using a conflict switch, and I don't understand how your "answer" is related to conflict switches. If it's not, you'd better ask a new question. You should ask a clear question, what is the context (your ERP version), what you want to achieve (I guess creating an implementation on spot ES_MV75FF04ALV, but which point, which section?), what are the steps to reproduce, what do you actually get, what do you expect.
In my S/4HANA system, for ES_MV75FF04ALV, I have only 2 standard implementations linked to deactivated switches, so I can't try it myself, but of course in a simple case I don't have any issue when creating an implementation of a standard enhancement point/section.