on 09-02-2009 11:58 AM
Hello,
with the following code I try to import (create) images in the MDM image table. The original should NOT be stored in the MDM.
When I run the code, the Image will be created in the images table but there it shows no thumbnail of the image. If the image is imported manually the thumbnail appears.
I there anything I forgot?
ImageBlobRecord r;
r = RecordFactory.createEmptyImageRecord(rSchema.getTableId("Images"));
r.setDataLocationId(location);
r.setDataGroupId(datagroup);
r.setOriginalName(new StringValue(filename));
r.setHasOriginal(new BooleanValue(false));
r.setBinary(new BinaryValue(data));
r.setFormat(new IntegerValue(3));
r.setCode(filename);
r.setName(new StringValue(filename));
r.setDescription(new StringValue("description"));
r.setHasThumbnail(new BooleanValue(true));
try{
CreateRecordCommand crc = new CreateRecordCommand(usc);
crc.setRecord(r);
crc.execute();
} catch (Exception e){
...
}
I use MDM 5.5.
Thanks!
Hi Dennis,
I want to upload an image in MDM via Java APIs. Can you please tell me what is DataLocationId and DataGoupId? What values should i set for these parameters?
The other thing i want to ask is, can I save this image as a Lookup Value in Main Table?
Any help would be great.
Regards,
Sruti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for your hint Walter!
I also found the [SAP Note 1235244|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_mdm/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31323335323434%7d] on this topic.
When I import an image there is the option either to store the original in the repository or just to create a link to the original on the filesystem. After I generate the thumbnails with the datamanager as mentioned above, the attribute "original in repository" is "YES".
As we do not store our images in the rep, is there any possibility to avoid this?
Cheers, Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The behaviour you are seeing is not an error. The MDM API's do not generate thumbnails for uploaded images. If you wish to create thumbnails for images not imported via the MDM Data Manager, you will need open the Data Manager and generate the thumbnails for the images which were uploaded via the API.
Walter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.