cancel
Showing results for 
Search instead for 
Did you mean: 

Master Agreement->Line Item->Plant->Org Unit

former_member182290
Participant
0 Kudos

Hi ,

Trying to get OrganisalUnit object associated with a plant using below code (Master Agreement-Line Item Tab)

lineItems=doc.getLineItems();

for(int i=0;i<lineItems.size();i++){

lineItem=lineItems.get(i);

material=lineItem.getMaterialObjRef();

materialHome=IBeanHomeLocator.lookup(session,material);

materialBean=materialHome.find(material);

plant=materialBean.getPlantObjRef();

plantHome=IBeanHomeLocator.lookup(session,plant);

plantBean=plantHome.find(plant);

businessUnitCollection=plantBean.getCollectionMetadata("COLLN:3:647").get(plantBean);

for(int i=0;i<businessUnitCollection.size();i++){

businessUnitRow=businessUnitCollection.get(i);

}

}

businessUnitCollection object size is 1. But the object is null.

Please help!

Goverdhan Totawar

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182290
Participant
0 Kudos

Got response from e-sourcing tech team. getCollectionMetadata can not be used for getting collection table.

Since the ORG Unit is standard object provided by esourcing, if an API method is not exposed we need to log a ticke, and SAP will provide a standard method.