cancel
Showing results for 
Search instead for 
Did you mean: 

Change/Rename the existing group from (Group Test) to (Group XYZ) using Webdynpro JAVA

Former Member
0 Kudos

Dear Friends,

I have existing group (Group Test) in Portal. This group having Roles, Parent groups, Child groups and Users.

My requirement is:-

 

I need to change/rename the existing group from (Group Test) to (Group XYZ).

1.       How to change/rename the Group name? :- by using Webdynpro JAVA.

2.       If change/rename the group name. By default Roles, Parent groups, Child groups and Users, it will come under new group or not?

3.       If not:- how to assign Roles, Parent groups, Child groups and Users under new group by using webdynpro JAVA?

Regards

Chowdary.

Accepted Solutions (1)

Accepted Solutions (1)

vijay_kumar49
Active Contributor
0 Kudos

creating a new group, copy all the data from the old group to the new group, and delete the old one

Create New group:

 

iGroup = groupFactory.newGroup(wdContext.currentContextElement().getNewGrpwithPermission());

iGroup.commit();

copy all the data from the old group to the new group

 

String newGroupUniqueID = iGroup.getUniqueID();

newGroupUniqueName = iGroup.getUniqueName();

 

iGroup = UMFactory.getGroupFactory().getGroup(selectedOldGroupUniqueID);

Iterator getOldRole = iGroup.getRoles(true);

while (getOldRole.hasNext()) { 

String oldRoleName = (String) getOldRole.next(); 

IGroup newGroup = groupFactory.getGroup(newGroupUniqueID);

newGroup.addToRole(oldRoleName);

newGroup.save();  

}

like that will get remaing data

delete the old one 

 

IResourceAclManager ram = asm.getAclManager(); 

IResourceAcl ra = ram.getAcl(resource); 

ra.removeEntry(acl); //remove the Group mapping


Regards

Vijay K

Former Member
0 Kudos

Solved Vijay.. Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1.       How to change/rename the Group name? :- by using Webdynpro JAVA.-

Ans:- Not Possible by using Webdynpro JAVA.

You can perform following steps to change/rename the Group Name in SAP Portal :-

  • Select the groups (Group Test) in User management > Identity management....then press the button "export"
  • Copy and paste the generated text to a temporary text file or MS Excel.
  • Change the names(Group XYZ) of the existing groups (Group Test)i in the file
  • Use the manipulated text file as input in User management > Import...
  • Remove the old groups

2.       If change/rename the group name. By default Roles, Parent groups, Child groups and Users, it will come under new group or not?

Ans:-If change/rename the group name By default Roles, Parent groups, Child groups and Users, it will come under new group as in MS Excel you are not changing those.

3.       If not:- how to assign Roles, Parent groups, Child groups and Users under new group by using webdynpro JAVA?

Ans:-Not Required

Thanks,

Patralekha Sur

Qualiture
Active Contributor
0 Kudos

Well, actually you can "rename" a Portal group using Web Dynpro Java, but this also involves creating a new group, copy all the data from the old one into the new one, and delete the old one.

Use the IGroupFactory interface for creating and deleting groups, and the IGroup interface for copying the data from the old group to the new one.

Best,

Robin