In this step, you will add logic to the Sections’ Details command handler to display the details of a section's employees in the Details command handler of the Employees business object.
The switch to the Employees’ Details command handler is executed in the button click event.
Override Field(#UB_PUSHB1) Default('Details')Invoke Method(#avListManager.BeginListUpdate) ForBusinessObject(EMPLOYEES)
Invoke Method(#avListManager.ClearList)
Select Fields(#EMPNO #GIVENAME #SURNAME) From_File(PSLMST1) With_key(#DEPTMENT #SECTION) Generic(*yes) Nbr_Keys(*Compute)
Invoke #avListManager.AddtoList Visualid1(#EMPNO) Visualid2(#SURNAME) AColumn1(#givename)AKey1(#EMPNO)
EndSelect
Invoke Method(#avListManager.EndListUpdate)
In WAM command handlers you can name the instance list you want to use, in this case the instance list for business object EMPLOYEES. (In Windows you use the avAddSwitchInstances event to work with another business object's instance list.)
#avframeworkmanager.avSwitch To(BUSINESSOBJECT) NAMED(EMPLOYEES) EXECUTE(DETAILS) Caller(#com_owner)
Your code will now look like this:

