04-23-2014 12:57 PM
Hi all,
I have a requirement in which I have to capture an image while Weight is being captured.
And I have to use that image in smartform.
Does anyone having idea of this?
04-23-2014 1:08 PM
Hi yash,
i didn't get by weight in ur query.for upload picture into the system you can use the tcode se78,where image is in bmp format or FM 'GUI_UPLOAD'.and then in smartform u can create graphic.
hope it helps..
04-23-2014 1:13 PM
I mean to say that during weight capturing of a truck a CCTV would capture the image of the truck.
I have to get that image in application server and use that image in smartform.
04-23-2014 1:23 PM
you can use oops find the link below
FM for uploading Image to SAP | SCN
or via FM
data: begin of l_bitmap occurs 0,
l(64) type x,
end of l_bitmap.
l_filename type string.
l_filename = 'c:/file'
call function 'GUI_UPLOAD'
exporting
filename = l_filename
filetype = 'BIN'
importing
filelength = l_bytecount
tables
data_tab = l_bitmap
data:
l_bytecount type i.
l_type_out type c.
call function 'SAPSCRIPT_CONVERT_BITMAP'
exporting
old_format = 'BMP'
new_format = 'ITF'
bitmap_file_bytecount_in = l_bytecount
itf_bitmap_type_in = l_type_in
importing
bitmap_file_bytecount = l_bytecount
itf_bitmap_type_out = l_type_out
tables
itf_lines = l_itflines
bitmap_file = l_bitmap
exceptions
no_bitmap_file = 1
format_not_supported = 2
bitmap_file_not_type_x = 3
no_bmp_file = 4
bmperr_invalid_format = 5
bmperr_no_colortable = 6
bmperr_unsup_compression = 7
bmperr_corrupt_rle_data = 8
bmperr_eof = 9
others = 10.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
raising conversion_failed.
endif.
hope it helps...