Hi all,
i am developing WF, my requirement is sending image to SAP.
in sup 2.2 I did the following,
1. created the MBO ( MBO is BAPI with logic of BASE64 to image )
2.Added the create operation to MBO. ( the data type of image parameter is BIGBINARY )
3.in start screen, i added the menu item ( 'get_picture' as type online request and invoke operation is create )
4. I wrote the following code in custom.js
function customBeforeSubmit(screenKey, actionName, workflowMessageToSend) {
if (screenKey == "Start" && (actionName == "Get_Picture")) {
var form = document.forms[screenKey + "Form"];
if (form) {
var popover = new CameraPopoverOptions(300,300,100,100,Camera.PopoverArrowDirection.ARROW_ANY);
var options = { quality: 40, destinationType: Camera.DestinationType.DATA_URL,sourceType: Camera.PictureSource.SAVEDPHOTOALBUM, popoverOptions : popover };
navigator.camera.getPicture(onSuccess, onFail, options);
function onSuccess(imageData) {
MBO cust = new MBO(); // MBO is my MBO name
cust.setIM_IMAGE ( imageData ); //im_image is parameter of MBO
cust.setOBJECT_ID( "Sybase" );
cust.create();
/* var image = document.getElementById('myImage');
image.src = "data:image/jpeg;base64," + imageData; */
}
function onFail(message) {
alert('Failed because: ' + message);
}
}
}
5.Following warning showing.
Operation argument 'MBO->create()->IM_IMAGE' has large object type 'BIGBINARY', but is not mapped to an attribute of the same type. Thus, it will not leverage the streaming I/O mechanism.
It is not working. anything wrong i did?
Thanks
Suresh