cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment

Former Member
0 Kudos

Hi All,

I am getting attachment from Mobile device it is in the form of byt string ( Actually Mobile device scan the Images and converting in to byt formate ), so from Back end side I have to captyure that Formate and I have to convert it again in to Image formate and store the data in to database.

Thanks&regds,

Srinivas.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

well, I am a little lost here - what is your problem here?

I tis correct that MI has no possibility to send large attachments as such. If you want to send an image for example, you have to read it as BYTE stream, split it into chunks of 250Chars, store thiese chars into an Text field of an item of the syncBO and then send it to the backend.

There you take these items, read them properly and rebuild the image out of the single items. Then you save it and all is fine.

Was there an issue on your side with that procedure?

Regards,

Oliver

Former Member
0 Kudos

Hi Oliver,

Your right, My problem is from backend side how to capture this BYTE stream and how to convert it into Image(BIT map). I don't know how Sync Bo MAM30_080 capture this BYTE stream and converts into Image formate, I saw somany of your for replies, I hope you can sole my problem.

Thanks&regds,

srinivas.

Former Member
0 Kudos

Hi,

well, MAM80 - the signature SyncBO does it like I explained it in the few wors:

Read the images as byte stream, splits the stream into chunks of 250chars, store them into an item 010 of SyncBO 080 and number this instance.

At the end you end up with lets say 20 Item010 structures and these are all with the simple structure:

Item010:

- Field number : (the number 01 - 20 of this structure)

- Field ByteStream: the 250 chars

The Header of SyncBO 080 sontains some information about hte image like the related order and that stuff.

In the backend you simply take all ITEM010 structures, bring them into the correct order (based on the NUMBER field and then add the ByteStream strings together to one single, long string.

While you save that, you have your Image back restored in the original way.

If you want to do pretty much the same thing, I guess it is much more helpfull to do that for your own in a separate ZMAM SyncBO.

Hope this helps.

Regards,

Oliver

former_member304703
Contributor
0 Kudos

Hi Srinivas,

SyncBo MAM 30_080 does not convert byte stream into image. It's BAPI MAM30_080_CREATE that does it in the backend.

If you look in the ABAP code you can see (and debug) how it is done and which particular SAP function module does this. Then you can call the same module in your own code.

Regards,

Larissa Limarova

Former Member
0 Kudos

Hi Larissa,

your answer is confusing compared to my answer - even it is correct as such, but it is exactly what I explained above.

The Byte stream has to be converted into chunks first - it is clear that this is done on the client as I descibed above. And then - because it is a Upload SyncBO - it is as well clear, that in the backend there is a CREATE BAPI handler.

So your answer is correct, that MAM30_080_CREATE badi is the one in the backend, that converts BYTE stream back to image.

The only part that I am not so happy with is the beginning of your answer. Because the syncBO MAM30_080 transfers the signature image, the CREATE BADI is a part of the syncBO - or am I wrong here?

So in my understanding: client splits image into chunks - badi puts chunks back to image and one end can not life without the other.

So in my understanding it would be better to say:

To convert MAM30_080 data back into an image, have a look into the BAPI MAM30_080 create........ in that case it is not that confusing for the reader if he is new in that area.

Regards,

Oliver

Answers (0)