cancel
Showing results for 
Search instead for 
Did you mean: 

How To Stop Auto Save while clicking End Transaction Button in Ic_agent Buss Role

Former Member
0 Kudos

My Requirent :-  

     In Ic_agent Bussiness Role, while clicking End Transaction Button it will go to home page at the same time saving document with madatory field and all empty. Because of this big issue going b/w vendor and my organization everymonth end payment for service kilometer they travelled. our organization using 6.0 crm version. i was trying to stop saving by writing code ORDER_SAVE Badi, but it is stopped saving and same screen while user fill all mandatory fields while clicking save no navigation at all. Please Provide some solution for this problem.

Thanks,

anbu

Accepted Solutions (1)

Accepted Solutions (1)

VishnAndr
Active Contributor
0 Kudos

Hello, Anbu.

Let me jump into your discussion and suggest to look at the following point.

The actual code which prevents in IC (at least in CRM 7.0 and subsequent) to leave mandatory fields of Interaction Record empty is in CL_ICCMP_BT_BTSHEADER_IMPL (component ICCMP_BTSHEAD view BTSHeader) in method IF_CRM_IC_PREPARE_FOR_CALLBACK~EXECUTE. If the veto is raised there then the saving process is stopped. Also it's possible to register own listeners and implement IF_CRM_IC_PREPARE_FOR_CALLBACK according to your needs but if additional requirements exist.

Please also refer my answer in some other discussion:

So I'd suggest to check if there is the similar logic in 6.0 version as far as I do not have an access to such system.

If the method in place then the next step is to debug it and see why it doesn't work.

Hope this will help you.

Former Member
0 Kudos

Hi,

what even you suggested is very help full for me. In Auto navigation Method. i just reset Bol issue is resolved.

Thanks,

anbu

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi all,

Solution To the End Transaction Issue ( Auto Saving saving Restriction ).

Steps:-

Step 1: Go to SM30--> Enter view name ---> "CRMV_IC_APP_COMP" ----> Click Maintain.

Step 2: Copy the Standard class "CL_CRM_IC_AUTO_NAV2" into Custom Class                                   "YCL_CRM_IC_AUTO_NAV2" . Maintain this custom class to respective  component name           "AUTONAVIGATION".

Step 3: SE24-->YCL_CRM_IC_AUTO_NAV2--->"HANDLE_INTERACTION_ENDED" (Method)-->write

          Below Logic.

Step 4:

            DATA: lr_core TYPE REF TO cl_crm_bol_core.

                      lr_core = cl_crm_bol_core=>get_instance( ).

                      lr_core->reset( ).

Save and Activate.

While clicking end transaction in web-ui, whatever input given in web-ui will present in bol_core only. so while  clicking end transaction button Autonavigation component will trigger . Handle_interaction_ended method have to write the logic. All information will present in bol_core. so declare object with refer to cl_crm_col_core. Then calling Static method Get_instance in cl_crm_col_core. Calling reset method lr_core object reference. IT will reset bol_core so while auto save no information will be present in bol_core, so no changes will happened it will go to initial screen while clicking end transaction.

Thanks and Regards,

Anbusundaram A

Maggie
Employee
Employee
0 Kudos

Hi Anbu,

I am sorry, I did not understand what is the business requirement correctly at the beginning.

Do you mean you want to prevent saving the transaction in an IC role when the mandatory fields are not filled?

You mentioned you have implemented BADI order_save, but it does not work correctly. Becasue the order still cannot be saved after filling all the mandator fields?

If the above understanding are correct, then please check SAP Note 1353553. You can use the parameter NO_SAVE_MAND_FIELDS to influnce the system's behavior.

Best regards,

Maggie

Former Member
0 Kudos

Hi Maggie,

yes this is my Req , Do you mean you want to prevent saving the transaction in an IC role when the mandatory fields are not filled?

... could u please tell me step to reach sap notes. i went to Snotes t-code, after that i was search whatever note no u sended to me.

Thanks,

anbu

Maggie
Employee
Employee
0 Kudos

Hi Anbu

Pleae check in SAP Service Market Place.

Below is the link to Note 1353553

Note 1353553 - Opportunity: Behavior of mandatory fields in Web UI

Best regards,

Maggie

former_member186543
Active Contributor
0 Kudos

Hi Arun,

Yes this is a standard functionality and I faced a similar requirement too , any transactions even if incomplete are saved on the click on END in the IC roles.

For skipping this you need to enhance CRMCMP_IC_FRAME/HiddenView , event EH_ONFORWARDCALL to handle the functionality of the click . You have to put a check of

param-value CS 'End' ( to check if only end was clicked , you can find this through debug ).

Then you can write :

lr_core ?= cl_crm_bol_core=>get_instance( ).

lr_transx ?= lr_core->GET_TRANSACTION( ).

if lr_transx->CHECK_SAVE_NEEDED( ) = abap_true. "Check if any unsaved object

   lr_transx->revert( ).  "Revert all if not saved

endif.

/Hasan

Former Member
0 Kudos

Hi Hassan,

i need your help, actually i am using crm 6.0 version. while i was trying to enhance that component that view context node is not enhanced because that class is final class, so i cant get possibilty to write code there.

former_member186543
Active Contributor
0 Kudos

Hi Arun,

You don't need to enhance the context node , you just need to enhance the controller class ( IMPL ) of that view.

/Hasan

Former Member
0 Kudos

hi Hasan,

While Trying Enhance that component it throwing runtime error as " Runtime repository cound not be copied to the enhancement "... what is problem i dont know?

Thanks,

anbu

former_member186543
Active Contributor
0 Kudos

Hi Anbu,

Are you enhancing the component correctly ? You need to click on the enhance component and enter the name of the bsp app like : ZCRMCMP_IC_FRAME and not the standard component's name.

/Hasan

Former Member
0 Kudos

Hi Hasan,

if i am trying enhance CTXT implementation class final so it is not enhanced at all. which version you used . i am give z oly other wise it wont all to enter inside itelf.

Former Member
0 Kudos

Hi Hasan,

Actually i created one enhancement set and assign that enhancement set to client. then enhancing  component crmcmp_ic_frame . 1. press that enhancement button it asked application name i gave zcrmcmp_ic_frame. then some time it throwing repository b not coping properly or else while trying to enhace that hidden view it throwing error implement.ctxt cant be enhanced because it is final class. please tell  me some solution. whether i did any mistake ... any package u maintained under AET in spro? doubt oly. which version sap crm u using

Thanks,

anbu

former_member186543
Active Contributor
0 Kudos

I am using CRM 7 ehp 2 , this error doesn't occur in CRM 7 . I guess this is something related to crm 6

Former Member
0 Kudos

i am using crm 6.0 version. can u do one favour for me. plz check Implementation Class CL_CRM_IC_CONTEXTAREAVIEW_CTXT properties final is checked or not.. in 6.0 final is checked so we cant enhance .. plz check it in 7.0

former_member186543
Active Contributor
0 Kudos

Hi

No it's not a final class. Take a key and mark it as non-final .

/Hasan

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

how they will give access boss, already using old version 6.0 ... any other solution u know.

former_member186543
Active Contributor
0 Kudos

This will mark it non final for you

Note 1142110.

Also please don't forget to call the super class' event forwardcall in your redefinition code after your custom logic.

Enjoy !!

Former Member
0 Kudos

Hi Hasan,

     i need your help, could u please send me that exact code what you wrote inside that method. i dont know exact line where to insert ur piece of code. could u plz guide and help me. i am struggling to close this issue. send some screen shot for me...

Thanks,

anbu

former_member186543
Active Contributor
0 Kudos

Hi Anbu

Since that project is closed now , I don't have that code . However I have added in my response above , the codes and the place where that need to be added.

/Hasan

Maggie
Employee
Employee
0 Kudos

Hi Anbu,

Please use BADI CRM_IC_IARECORD to stop creating the interaction record on pressing END buttong. SAP Note 1381612 contains the detailed information.

Best regards,

Maggie

Former Member
0 Kudos

Hi Maggie,

I already checking code in this BADI, but i am not getting any idea. do u have idea how to stop saving without filling mandatory fields in sceen

Thanks,

anbu