Skip to Content
avatar image
Former Member

Impossible to Retrieve an instance for an Association. Is there anything new regarding ABSL coding?

Dear All,

I am working on creating a new BO, and i want to store the association of one Instance in my BO.

Unfortunately, this is not working.
Here is my BO declaration :

import AP.Common.GDT as apCommonGDT; import AP.FO.ProductDataMaintenance.Global; import AP.FO.BusinessPartner.Global; import AP.Common.Global;

Label("Employé")]element EmployeeID:EmployeeID; association ToEmployee to Employee;

Then, in one After Modify Script event, I try the following like seen in the SAP Open course :

var employee = Employee.Identification.Retrieve(this.GetFirst().EmployeeID);

if(employee.IsSet()) { this.ToEmployee = employee.ToRoot; }

Here is my error message : Identifier 'ToEmployee' Is read-only and cannot be changed

Also the diffeerence between my Code and the SAP Open course Code is that they are not using the GetFirst(). after the retrieve.
However, the system will not let me do that as he does not find an Employee ID.

Has there been any change regarding associations? I have been able to have a look on another development on one our customer which was working with that Old SAP code!

Is it because this is a development tenant?

Please help me retrieve the association based on the instance of the element, this is mandatory for me to start building screens!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 24, 2017 at 10:03 AM

    I found the answer... Just remove the Mass Enable and it will work.... As simple as that but do not see the point when that concerns the root.... Well.... Thanks all for reading

    Add comment
    10|10000 characters needed characters exceeded