on 05-14-2008 3:18 PM
Hi,
I have written a java program , to create an attribute and add attributes values to the taxonomy table.
Using the method CreateAttributeCommand -- i am able to do both the creation of attribute and adding of values to the attribute.
Can anyone , please let me know,how to add values to an existing attribute??
Thanks in Advance.
Priya.
Hello.
I would use the RetrieveAttributeCommand to get the desired attribute. Note that you have to know the attribute Id and table Id for this.
As you mentioned the taxonomy table, I guess you know the table Id already, don't you?
All you need now is the attribute Id(s) of the existing attribute(s) you want to alter. (A for-loop will allow to alter more than one, or are you using a GUI for this? However you can handle more than one at each time, too. Depends on your program)
Using the RetrieveAttributesCommand the retrieval of the attribute Ids should be possible. With the table Id you can get an array with AttributeProperties back. Loop over all of them and pick the desired one(s). With its/their Id(s) you are able to call the ModifyAttributeCommand.
Before using the ModifyAttributeCommand modify the AttributeProperties object as whished. Then use the ModifyAttributeCommand to write it back.
[Link to the current Java API, if you did not had it by now|https://help.sap.com/javadocs/MDM/current/index.html]
A final note to this:
I do not know if the ModifyAttributeCommand will work, as the ModifyUserCommand somehow failed me. I had to delete the user and re-add him to make it work properly. But this occoured only due to the fact that the password could not be modified nor retrieved.
Best regards
Dominik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.