Se78 PIC upload and download

Source: Internet
Author: User

Http://www.sapfans.com/forums/viewtopic.php? P = 143772

Se78-downloading an imported graphic.

 

*&---------------------------------------------------------------------*
* & Report z_export_graphic_from_se78 *
*&*
*&---------------------------------------------------------------------*
* & This program exports logos from se78 to a PC file in. BMP format *
*&*
*&---------------------------------------------------------------------*

Report z_export_graphic_from_se78.

*
*-----------------------------------------------------------------------
* Description: This program extracts graphic logos from the BDS and
* Saves it as a. BMP file on the PC. Transaction se78
* Does not provide a way to export logos.
* Author: keerthi hiremath
* Date: 15jan2003
* Request:
* Design DOC:
*
*
*-----------------------------------------------------------------------
* M o d I f I c a t I o n l o G
*-----------------------------------------------------------------------
*-----------------------------------------------------------------------
* @ Dat d a T
*-----------------------------------------------------------------------
Type-pools: sbdst.
Data: git_content type sbdst_content.
Data: git_rawdata type w3mime occurs 0,
G_bitmaptypeout type C.
Data: Begin of git_bitmap occurs 0,
Line (1000 ),
End of git_bitmap.
Data: g_bytecount type I.
*-----------------------------------------------------------------------
* @ Ssl s e l e c t I o n s c r e n
*-----------------------------------------------------------------------
Selection-screen: Begin of block B01 with frame title text-b01.
Parameters: p_obj like stxbitmaps-tdobject default 'zoglgrpobj ',
P_nam like stxbitmaps-tdname,
P_id like stxbitmaps-TDID default 'zc ',
P_ref like stxbitmaps-tdbtype default 'bmon '.
Selection-screen: End of block b01.
Selection-screen: Begin of block B02 text-b02 with frame title.
Parameters: p_file like rlgrap-filename.
Selection-screen: End of block b02.
*-----------------------------------------------------------------------
* @ Ini I n I t I a l I z a t I o n.
*-----------------------------------------------------------------------
Initialization.
*

*-----------------------------------------------------------------------
* @ SOS s t a r t o f s e l e c t I o n
*-----------------------------------------------------------------------
Start-of-selection.
*
Perform sapscript_get_graphic_bds.
Perform sapscript_convert_bitmap.
Perform ws_download.
*
*-----------------------------------------------------------------------
* @ EOS e n d o f s e l e c t I o n
*-----------------------------------------------------------------------
End-of-selection.
*

*-----------------------------------------------------------------------
* @ Top t o p o f p a G E
*-----------------------------------------------------------------------
Top-of-page.
*

*-----------------------------------------------------------------------
* A t s e l e c t I o n s c r e n
*-----------------------------------------------------------------------
At selection-screen on value-request for p_nam.
*
Data: l_return type I.
Ranges: r_obj for stxbitmaps-tdobject.
Data: l_bitmaps type table of stxbitmaps with header line.
Data: lit_scrfields type table of dynpread with header line.
*
R_obj-sign = 'I '.
R_obj-option = 'eq '.
R_obj-low = 'zoglgrpobj '.
Append r_obj.
*
Call function 'sapscript _ search_graphic_bds'
Exporting
Selection_screen = 'X'
Select_entry = 'X'
Selection_show = 'X'
Importing
E_object = p_obj
E_id = p_id
E_name = p_nam
E_btype = p_ref
Tables
T_objects = r_obj
* T_ids = r_ids
* T_btypes = r_refs
T_selections = l_bitmaps
Exceptions
Nothing_found = 1
Selection_canceled = 2
Internal_error = 3
Others = 4
.
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Else ..
Lit_scrfields-fieldname = 'P _ id '.
Lit_scrfields-fieldvalue = p_id.
Append lit_scrfields.
Call function 'dynp _ values_update'
Exporting
Dyname = 'z _ export_graphic_from_se78'
Dynumb = '000000'
Tables
Dynpfields = lit_scrfields
* Exceptions
* Invalid_abapworkarea = 1
* Invalid_dynprofield = 2
* Invalid_dynproname = 3
* Invalid_dynpronummer = 4
* Invalid_request = 5
* No_fielddescription = 6
* Undefind_error = 7
* Others = 8
.
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

Endif.

*
*-----------------------------------------------------------------------
* @ For f o r m s
*-----------------------------------------------------------------------
*
*
*&---------------------------------------------------------------------*
* & Form sapscript_get_graphic_bds
*&---------------------------------------------------------------------*
* Text
*----------------------------------------------------------------------*
* --> P1 text
* <-- P2 text
*----------------------------------------------------------------------*
Form sapscript_get_graphic_bds.
*
Call function 'sapscript _ get_graphic_bds'
Exporting
I _object = p_obj
I _name = p_nam
I _id = p_id
I _btype = p_ref
Importing
E_bytecount = g_bytecount
Tables
Content = git_content
Exceptions
Not_found = 1
Bds_get_failed = 2
Bds_no_content = 3
Others = 4.
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.
*
Endform. "sapscript_get_graphic_bds

*&---------------------------------------------------------------------*
* & Form sapscript_convert_bitmap
*&---------------------------------------------------------------------*
* Text
*----------------------------------------------------------------------*
* --> P1 text
* <-- P2 text
*----------------------------------------------------------------------*
Form sapscript_convert_bitmap.
* Assign
Call function 'sapscript _ convert_bitmap'
Exporting
Old_format = 'bds'
New_format = 'bmp'
Bitmap_file_bytecount_in = g_bytecount
Itf_bitmap_type_in = '*'
Importing
Bitmap_file_bytecount = g_bytecount
Itf_bitmap_type_out = g_bitmaptypeout
Tables
Bitmap_file = git_rawdata
Bds_bitmap_file = git_content
Exceptions
No_bitmap_file = 1
Format_not_supported = 2
Bitmap_file_not_type_x = 3
No_bmp _file = 4
BMP err_invalid_format = 5
BMP err_no_colortable = 6
BMP err_unsup_compression = 7
BMP err_corrupt_rle_data = 8
BMP err_eof = 9
Bdserr_invalid_format = 10
Bdserr_eof = 11
Others = 12.
If sy-subrc <> 0.
* Message ID sy-msgid type sy-msgty number sy-msgno
* With sy-msgv1 sy-msgv2 sy-msgv3.
Endif.
*
Endform. "sapscript_convert_bitmap

*&---------------------------------------------------------------------*
* & Form ws_download
*&---------------------------------------------------------------------*
* Text
*----------------------------------------------------------------------*
* --> P1 text
* <-- P2 text
*----------------------------------------------------------------------*
Form ws_download.
*
Call function 'ws _ download'
Exporting
Bin_filesize = g_bytecount
Filename = p_file
Filetype = 'bin'
Tables
Data_tab = git_rawdata
Exceptions
File_open_error = 1
File_write_error = 2
Invalid_filesize = 3
Invalid_type = 4
No_batch = 5
Unknown_error = 6
Invalid_table_width = 7
Gui_refuse_filetransfer = 8
Customer_error = 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.
Endif.
*
Endform. "ws_download

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.