cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Modifying Object not possible, object locked by user

how2kode
Explorer
0 Likes
1,567

1.Problem Statement:

Requirement:-

At the time of addition of sales data to account, client wants to populate employee responsible. To incorporate this we have written logic in Before-Save Event of Root node of Sales Arrangement BO. So whenever user add new sales data then automatically at the time of save custom logic will create employee responsible as well.

In general we are trying to add employee responsible in customer BO from sale arrangement BO.

CASE-1:-[Customer TI Screen in Read Only Mode]

When user add data in read only mode of customer TI screen then custom logic to determine and create employee responsible is working properly.

CASE 2:-[Customer TI Screen in EDIT Mode]

When user add data in edit mode of customer TI screen then custom logic to determine and create employee responsible is not working.

Getting Below Exception in Backend

Modifying Object not possible, object locked by XXX

SAP told us that this is the custom logic implementation and we does not provide support for this.

They also told us that if you needed these then you have to add sales in read only mode.

But advised us to post issue to this community.

Please guide us if any workaround

2.Implemented and Configured Objects:

Business Object’s:-

Customer &

SalesArrangement

LOGIC ADDED TO CREATE CURRENT EMPLOYEE RESPONSIBLE NODE

Business Object : SalesArrangement

Node : Root

Event : BeforeSave

Accepted Solutions (0)

Answers (1)

Answers (1)

anant_acharya
Product and Topic Expert
Product and Topic Expert
0 Likes

Dear Dharmendra,

I don't think this is allowed by the standard BO validations, you cannot modify the value in the edit mode.

Please refer to the KBA - https://userapps.support.sap.com/sap/support/knowledge/en/2541804

Note sure your requirement can be fulfilled by before save, you can try using after modify script and see if it fulfills your custom requirement.

Regards

Anant

how2kode
Explorer
0 Likes

Dear Anant,

Thank you for your valuable input.

I tried adding logic in after modify script but same error. I think I need to prevent user from adding data in edit mode.

How can I check if object is locked or not ? In script.

Do I need to use platinum library for this lock check ?