Posted: Sun Oct 14, 2007 7:03 pm Post subject: Insert image onto SAP screen
To version 4.6
This is very simple to do, first create a dialog program with one screen (any number i.e. 0100) and create a custom control called 'CUST_CONTROL'. Now use the below sections of code to create a top include and a PBO module/process. And then finally create a transaction code for it.
Code:
CONSTANTS: CNTL_TRUE TYPE I VALUE 1,
CNTL_FALSE type i value 0.
data:
h_picture type ref to cl_gui_picture,
h_pic_container type ref to cl_gui_custom_container.
* h_tree type ref to cl_gui_list_tree,
* h_docking type ref to cl_gui_docking_container,
* h_application type ref to lcl_application.
data: graphic_url(255),
graphic_refresh(1),
g_result like cntl_true.
data: begin of graphic_table occurs 0,
line(255) type x,
end of graphic_table.
data: graphic_size type i.
data: g_stxbitmaps type STXBITMAPS,
l_bytecount type i,
l_content TYPE standard table of bapiconten initial size 0.
To version 4.7
This is very simple to do, first create a dialog program with one screen (any number i.e. 0100) and create a custom control called 'CUST_CONTROL'. Now use the below sections of code to create a top include and a PBO module/process. And then finally create a transaction code for it.
Code:
CONSTANTS: CNTL_TRUE TYPE I VALUE 1,
CNTL_FALSE type i value 0.
data:
h_picture type ref to cl_gui_picture,
h_pic_container type ref to cl_gui_custom_container.
* h_tree type ref to cl_gui_list_tree,
* h_docking type ref to cl_gui_docking_container,
* h_application type ref to lcl_application.
data: graphic_url(255),
graphic_refresh(1),
g_result like cntl_true.
data: begin of graphic_table occurs 0,
line(255) type x,
end of graphic_table.
data: graphic_size type i.
*--------------------------------------------------------------------*
***INCLUDE ZDISPLAYIMAGEPBO .
*--------------------------------------------------------------------*
*&-------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&-------------------------------------------------------------------*
* text
*--------------------------------------------------------------------*
module STATUS_0100 output.
data: l_graphic_xstr type xstring,
l_graphic_conv type i,
l_graphic_offs type i.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.