Skip to Content
0

How to determine if a BO is read-only at runtime

Feb 08 at 09:09 AM

77

avatar image

Hi,

actually there is a problem within the AfterModify script of a BOs Item.

SAP told me that we are trying to modify a property, which is not allowed at this time.

I wonder why the AfterModify triggers, if it is not allowed to make any changes.

How can I check in ABSL if a property is writable?

Thanks

Best Regards

Erhan

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

2 Answers

Best Answer
Tobias Kuhn Feb 14 at 12:37 PM
0

Hi,

Most of the SAP Business Objects have an Status (Mostly shown also in the UI) which defines if the content is read-only or not. In most of the cases the behavior of changing the BO from the ABSL is the same as trying to change the BO from the UI. If the field is read-only in an specific status in the UI it is unlikely that the value can be changed with ABSL code in the same Status.

You have to manually implement the status checks in your ABSL to reduce errors which could be thrown by the underlying SAP BO.

Best regards

Tobias

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi,

thanks, yes that is exactly what I am looking for, the Status for SalesOrder which makes the SalesOrder readonly.

I can not see this Status in the UI.

Any suggestions for the Status Code of a Sales Order?

Thanks & Regards

Erhan

0

Hi,

is the Status field not visible in your screens?

Best regards

Tobias Kuhn

1

Yes, it must be the "Finished"-State then.

Thank you for your help.

Regards

Erhan

0
Lewis Peters Feb 12 at 04:13 PM
0

You can check by trying to assign a value --- if, when you try to activate it, you get an error saying 'is not writeable' or something of the ilk then it's read-only. You can also look at the properties in the repository explorer, it'll tell you what's read-only and what isn't. Remember that the deployment unit of the solution can make a difference.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Lewis,

thanks for your answer, but there is no error when activating. The error is thrown by the backend, if the SalesOrder is in a special state. My question now is, what state causes this readonly?

Regards

Erhan

0

If a sales order is completed or cancelled then it's read-only; besides that, generally it's writeable from the sales order itself. Attempts to write to a sales order from, say, a script on a purchase order will not work, I've tried.

0