Skip to Content

Error AP_ESI_COMMON 107 when assign value for custom field on Release event Outbound Delivery

Hi,

The error AP_ESI_COMMON 107 is only raised when I "Realse" Outbound Delivery and assign value for custom field on Event-BeforSave of Outbound Delivery Extension object.

It's ok when I click "Save" button.

Here my code on Event-BeforeSave of Outbound Delivery Extension


import ABSL;

this.EDI_Shipment_Date = "abc";


Can you please give me some ideas about this ?

capture.png (109.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on May 16, 2018 at 09:01 AM

    Hi Quyen Nguyen,


    That error occurred because you are update/inserting instance value when your document status is *Not* in write-allowed state.

    So you have to check the status before you assign value.

    example;

    // 3 = Released

    if(this.Status.ReleaseStatusCode != "3") {

    this.EDI_Shipment_Date = "abc";

    }

    *if needed, please check other status also


    Regards,

    May

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2019 at 02:09 PM

    In my case I was working with PurchaseOrder Extension - after_modify.absl script. After reading May T. answer I did open the Repository Explorer under View in Sap Cloud Application Studio. Found the PurchaseOrder object -> Status -> PurchaseOrderLifeCycleCode clicked DataType Tab scroll down where you can find an Appendix - Code List.

    In my case I am interested in: code 1 for "In preparation" and 6 for "Sent" status.

    if(this.Status.PurchaseOrderLifeCycleCode == "1" || this.Status.PurchaseOrderLifeCycleCode == "6") {
        this.SomeExtendedText = "someObject.FromSAP.content";
    }
    
    
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.