cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching Group Ben

Former Member
0 Kudos

Hi ,

We are in sourcing 10.0.

Need help on piece of code to achieve one requirement.

I am trying to fetch group bean but no luck!! here is my code ,,

I have logged it I am not getting any value in groupBean.

if(collaboratorType.equals("group"))

collabGroupMemObj= collaboratorMember.getPrincipal();

mchl_LogIt("Principal:"+collabGroupMemObj.getDisplayName());// VALUE  : collaboratorMember:Principal: XYZ, Role: Collaborator, Source: USER(showing in logs)

groupHome=IBeanHomeLocator.lookup(session, com.sap.odp.api.usermgmt.masterdata.GroupIBeanHomeIfc.sHOME_NAME);

groupBean = groupHome.find(collabGroupMemObj);

mchl_LogIt("groupBean:"+groupBean);/////  NOT DISPLAYING ANY VALUE

Can anybody help me on this where I am wrong.

Thanks in Advance.

Regards, Geetika

Accepted Solutions (1)

Accepted Solutions (1)

former_member207877
Active Participant
0 Kudos

Hello Geetika,

Give a try for below and check

import com.sap.odp.api.usermgmt.masterdata.GroupIBeanHomeIfc;

import com.sap.odp.api.usermgmt.masterdata.GroupIBeanHomeIfc;

import com.sap.odp.api.ibean.IBeanHomeLocator;

collabs = doc.getCollaborators();

collabsItr = collabs.iterator();

while(collabsItr.hasNext()){

collabsItrMem = collabsItr.next();

if(collabsItrMem.getCollaboratorType().hashCode() ==2){

groupHome=IBeanHomeLocator.lookup(session,GroupIBeanHomeIfc.sHOME_NAME);

groupBean = groupHome.find(collabsItrMem.getPrincipal());

throw new ApplicationException("groupBean " +groupBean);

}

}

Regards,

Raj

Former Member
0 Kudos

HI Raj,

Thanks for your reply.

It worked.:)

But I didn't get what was the error in my code.

Regards,

Geetika

Answers (0)