on 10-15-2008 3:18 PM
Hi,
I need to retrieve a GroupID giving the GroupName or group description.
Can anyone help on the API for this. I could not find any for this.
The groupID is autogenerated one similar to RecordId.
Thanks,
Padmaja
Hi padmaja,
is your problem solved ?
if not why dont u try in this way?
The only way to get GroupId is you must know grouptype.There are three types available ,your groupName would be one among them.
see com.sap.mdm.group.GroupTypes - static int DATA_GROUP_TYPE
static int DATA_LOCATION_TYPE
static int VALIDATION_GROUP_TYPE
I guess you are using DATA_GROUP_TYPE , becase in dataManager DATA_GROUP_TYPE , so you can use it;
if not change the type;
once you find out of which type your GroupName belongs , follow as follows;
use RetrieveGroupTreeCommand
1 ) setGroupType(int groupType) // set GroupType
2 ) execute execute() method // run execute method
3 ) GroupNodeId getRootId() // get GroupRootId
if you still face problem, let me know;
Regards,
Rajasekhar K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padmaja,
You can use RetrieveGroupTreeCommand to get the groups.
Then use method getGroupTree() method which returns hierarchical structure of group. Then you can use getId() method to get groupNodeID.
Regards,
Deepti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padmaja
Check out the class 'com.sap.mdm.group.GroupTypes'. This gives three static options which cover the type of group you could be looking for.
The types apply to Validation Group, Data Group and Data Location.
If you knwo the name of the group you will probably know which type it is too, so just use the appropropriate static value
Regards
Paul
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.