2007 Mar 08 5:00 AM
Hi,
I have a simple requirement, but It seems complex to me as I dont know how to do that .can some one help me in this?
I am creating a module pool program .where I need to insert my clients logo in the screen of the selection .how can I do this.. and to tell I am working in 4.6 C
Regards,
Antony,
2007 Mar 08 5:08 AM
Hi Antony,
You can check the code behind displaying the picture for the SMARTFORMS initial transaction. This transaction has a picture in the iniital screen. Check the logic behind that. I have used this in many programs and it works fine for me.
Cheers
VJ
2007 Mar 08 5:08 AM
Hi Antony,
You can check the code behind displaying the picture for the SMARTFORMS initial transaction. This transaction has a picture in the iniital screen. Check the logic behind that. I have used this in many programs and it works fine for me.
Cheers
VJ
2007 Mar 08 5:12 AM
May be you do this way.
1. Create Object Pc_Main_Container
Exporting
container_name = 'G_MAIN_JPG_CONTAINER'
Exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
2. Create Object G_Jpg_Viewer
Exporting
Parent = pc_Main_Container
Exceptions
Error = 1
Others = 2.
3. Call Method pc_Jpg_Viewer->Load_Picture_From_Url
Exporting
Url = w_FileName
Importing
Result = w_Error_Code
Exceptions
Error = 1
Others = 2.
4. Call Method pc_Jpg_Viewer->Set_Visible
Exporting
Visible = 'X'
Exceptions
Cntl_Error = 1
Cntl_System_Error = 2
Others = 3.
aRs
2007 Jun 19 12:48 PM
ARS,
pc_main_container is of what data type?
data: pc_main_container like....?
K.Kiran.
2007 May 19 4:03 PM
You can display logo(s) on your screen using the custom control function. A custom control is an area on the screen, created using the screen painter. Custom controls are used to embed controls. Container controls are instances of special global classes from the SAP Control Framework. The global class for custom controls is called CL_GUI_CUSTOM_CONTAINER. To link a custom control to a container control, pass the custom control name to the CONTAINER_NAME parameter of the container control constructor when you instantiate it. The following is a sample program to demonstrate the logo display using the custom control. This program was written in SAP4.6C. Design a screen with the custom control, by name PICTURE_CONTAINER. It has the following flow logic:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
The GUI status SCREEN100 has the functions BACK, EXIT, and CANCEL (all with type E).
Code
REPORT ZKAVITHA_TEST .
**********************************************************
Author : Kavitha Koleti *
Date : 27-Oct-2002 *
Purpose : This program displays the logo on the screen *
**********************************************************
Type declarations.....................
TYPES pict_line(256) TYPE c.
data declarations......................
DATA :init,
container TYPE REF TO cl_gui_custom_container,
editor TYPE REF TO cl_gui_textedit,
picture TYPE REF TO cl_gui_picture,
pict_tab TYPE TABLE OF pict_line,
url(255) TYPE c.
CALL SCREEN 100.
Dialog modules......................................
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN100'.
IF init is initial.
init = 'X'.
CREATE OBJECT:
container EXPORTING container_name = 'PICTURE_CONTAINER',
picture EXPORTING parent = container.
ENDIF.
IMPORT pict_tab = pict_tab FROM DATABASE abtree(pi) ID 'ENJOY'.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'GIF'
TABLES
data = pict_tab
CHANGING
url = url.
CALL METHOD picture->load_picture_from_url EXPORTING url = url.
CALL METHOD picture->set_display_mode
EXPORTING display_mode = picture->display_mode_fit_center.
ENDMODULE.
MODULE cancel INPUT.
LEAVE TO SCREEN 0.
ENDMODULE.
2007 Jun 19 12:24 PM
you can use container & class,through that you can easily put logo into required feild.