cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CRM: When create and save opportunity stays editable

Former Member
0 Kudos

Hi experts,

I created a copy of the standard opportunity to create a personalized opportunity to be called from a role Z. This new opportunity is called from a copy of standard role IC_AGENT (ZIC_AGENT).

When we create the opportunity and save the opportunity remains editable and not locked. If we execute the creation of the opportunity from a Z role copy of sales standard role works fine.

We have seen that when the event SAVE (EH_ONSAVE) runs and execute the method save inside the class cl_crm_uiu_bt_tools at line 49 execute the following code:

** document is not a service confirmation
    lr_access = cl_crm_uiu_bt_channel_asp_fac=>get_instance( ).
    lv_edit_after_save = lr_access->if_crm_uiu_channel_aspects~keep_edit_mode_after_save( ).

This code causes the opportunity is not locked and remaining editable. What means the message "document is not a service confirmation"?

Can anybody help us?

Thanks and kind regards,

David

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello David Quílez Muñoz,

Locking mechanism is standard delivered functionality.

correct me if i am wrong, i guess you have added few value attributes on Opportunity UI and when you are saving the opportunity, expect these value attributes rest all are coming in non editable mode.

btadminh is the Root context node for opportunity.

in your GET_I method of that attribute which is coming in editable mode, place the following code.

DATA: lr_entity TYPE REF TO cl_crm_bol_entity.

lr_entity ?= owner->typed_context->btadminh->collection_wrapper->get_current( ).

     IF lr_entity IS BOUND.

       IF lr_entity->is_locked( ) EQ abap_false.

         rv_disabled = 'TRUE'.

       ENDIF.

     ENDIF.


Declare a variable "owner" in your context node class (For Ex: z****CN00 ) for accessing the context node collection in your getter methods.


Owner should be of type controller class. i.e z***_IMPL...


This above code will check for root node is locked or not and if Yes then set your field property as rv_disabled = 'TRUE'.


Let me know if you are facing any issues more. Try pasting screens of your screen.


Cheers !

Nikhil Kulkarni

Answers (3)

Answers (3)

kavindra_joshi
Active Contributor
0 Kudos

If you are in IC this I guess is standard behavior.

~Kavindra

deepika_chandrasekar
Active Contributor
0 Kudos

Hi,

We also faced this issue and then we found one table SMOFPARSFA.

in Parameter2 we maintained Z role and it solved the issue. Check whether this can help you.

Regards,

Deepika.

Former Member
0 Kudos

Hi Deepika,

I'm working with SAP CRM EhP3, i tried input that parameter at table SMOFPARSFA and the problem persists.

The problem is when we try to save the custom opportunity because remains editable and not locked.

Any idea?

Thanks,

David

deepika_chandrasekar
Active Contributor
0 Kudos

HI,

In SPRO in Transaction type choose your type and check one option is there for that.you need to check or uncheck the checkbox for your process type.

Regards,

Deepika.

sandeepkumar_b
Explorer
0 Kudos

Hi David,

Ideally setting parameter in table SMOFPARSFA ( CRMIC ) will work. It worked for me also in earlier project. But actual interaction will not be ended until you END the interaction.

If you want to keep the lock even after Save then you can call lr_entity->lock( ) method at the end of SAVE method by enhancing it.  ( lr_entity is opportunity header entity )

Or you can just call interaction end method at the end od SAVE method to clear complete IC context along with SAVE.

Best Regards

Sandeep Kumar B

dharmakasi
Active Contributor
0 Kudos

Hi David,

Try the following SAP note

1457641 - Interaction center: distribution lock on save

let me know if its help you.

Best Regards,

Dharmakasi.

Former Member
0 Kudos

Hi Dharmakasi,

I'm working with SAP CRM EhP3, i think that note it's implemented. Moreover, reading the note I see that talks about connecting with ERP, but we are not going to connect to any ERP.

The problem is when we try to save the custom opportunity because remains editable and not locked.

Any idea?

Thanks,

David

former_member182421
Active Contributor
0 Kudos

I guess you have a custom development which makes the system behaves that way, can you disable the Web UI enhancements and log on with your Z role and do all the stuff? Should work as desire.

Cheers!

Luis

Former Member
0 Kudos

Hi Luis,

I have already made ​​that choice and the problem persists.

We have desimplemented the modifications and the problem persists.

Any idea?

Cheers,

David

former_member182421
Active Contributor
0 Kudos

to be honest, I have no idea, to me its very weird, If is not something related to custom development. But just to clairfy:

ZIC_AGENT  (copy of IC_AGENT) doesn't lock the opportunity

IC_AGENT -> ???

Z* (Copy of a standard sales role, SALESPRO maybe?) locks the opportunity.

Is this correct?