Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Importing pictures to the image table with mdm java api

How to i import images into the Images table with the mdm java api? The images should not be stored as a blob in mdm, just a reference to the file system. How to i have to set the different fields of the ImagesBlobRecord.

i tried something like this:

final ImageBlobRecord record = RecordFactory.createEmptyImageRecord(imagesTableSchema.getTable().getId());

try {

final byte[] demoPicture = { 0x10, 0x10 };

record.setName(new StringValue("8400 Gruppe unten.tif"));

record.setOriginalName(new StringValue("8400 Gruppe unten.tif"));

record.setHasOriginal(new BooleanValue(false));

record.setDataLocationId(new GroupNodeId("



Document and Settings


My Documents"));

record.setDataGroupId(new GroupNodeId(1));

record.setBinary(new BinaryValue(demoPicture));

record.setWidth(new IntegerValue(400));

record.setHeight(new IntegerValue(300));

record.setIsVector(new BooleanValue(false));


} catch (final IllegalArgumentException e) {

// TODO Auto-generated catch block


} catch (final MdmValueTypeException e) {

// TODO Auto-generated catch block



this gives an invalid ID format.

I´m also not sure about all the other fields where IDßs are required, which ID´s to use. Do i have to use third party libraries to get for example width and height of the pictures before using the setWidth and setHeight methods or are these values automatically filled during the import.

Some code snippet about how to use the various set functions would be really nice.

Former Member
Not what you were looking for? View more on this topic or Ask a question