Professional Documents
Culture Documents
There is another way to upload the image and display on screen in our custom
application. We can also add the Images using the Transaction OAER, then calling the
relevant functions to do rest of the work at PBO.
Steps to follow:
Step 1: Upload the image using T-Code OAER. Follow as per given below to upload the
image.
On Initial screen, enter the Class Name (‘PICTURES’), Class Type (‘OT’) and Object
Key (enter project name / your name; I used my name to group all the images uploaded
by me).
Step 2: Create a Module Pool program with a Screen and place a custom container(name
it PICT190) on the screen(say 0100).
*&———————————————————————*
*& Module STATUS_0100 OUTPUT
*&———————————————————————*
* text
*———————————————————————-*
module status_0100 output.
*– Main Status
set pf-status ’0100′.
set titlebar ’0100′.
v_objkey = ‘NAVEENVISHAL’.
v_class = ‘PICTURES’.
v_type = ‘OT’.
v_client = ’090′.
* Find image
loop at uris.
search uris-uri for ‘winter.jpg’.
if sy-subrc = 0.
url = uris-uri.
exit.
endif.
endloop.
* create container and place picture in it
if pict190 is initial.
create object picture_container
EXPORTING
container_name = ‘PICT190′.
call method:
pict190->load_picture_from_url
exporting url = url,
pict190->set_display_mode
exporting display_mode = pict190->display_mode_normal_center.
endif.