How to display logo in module pool screen
Hi,
I need to display a logo in the screen of module pool programming. I have already imported the logo image using transaction OAER.
Please suggest how to display the image in the screen..
Thanks and Regards,
Sayan Ghosh
You can show the image using the calss
CL_DD_DOCUMENT
For reference how to use the class
check the example program
DD_ADD_PICTURE
Similar Messages
-
How to add logo in module pool screen
Hi Expert,
I need to display company logo in the module pool screen
how this can be added ?
Regards
BikasHi,
create a custom control called 'CUSTOM_CONTROL'
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.
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_stxbmaps type STXBITMAPS,
l_bytecnt type i,
l_content TYPE standard table of bapiconten initial size 0.
g_stxbmaps-tdobject = 'GRAPHICS'.
g_stxbmaps-tdname = 'ENJOY'.
g_stxbmaps-tdid = 'BMAP'.
g_stxbmaps-tdbtype = 'BMON'.
call function 'SAPSCRIPT_GET_GRAPHIC_BDS'
exporting
i_object = g_stxbmaps-tdobject
i_name = g_stxbmaps-tdname
i_id = g_stxbmaps-tdid
i_btype = g_stxbmaps-tdbtype
importing
e_bytecount = l_bytecnt
tables
content = l_content
exceptions
not_found = 1
bds_get_failed = 2
bds_no_content = 3
others = 4.
call function 'SAPSCRIPT_CONVERT_BITMAP'
exporting
old_format = 'BDS'
new_format = 'BMP'
bitmap_file_bytecount_in = l_bytecnt
importing
bitmap_file_bytecount = graphic_size
tables
bds_bitmap_file = l_content
bitmap_file = graphic_table
exceptions
others = 1.
call function 'DP_CREATE_URL'
exporting
type = 'image'
subtype = cndp_sap_tab_unknown
size = graphic_size
lifetime = cndp_lifetime_transaction
tables
data = graphic_table
changing
url = graphic_url
exceptions
others = 4 .
create object h_pic_container
exporting container_name = 'CUSTOM_CONTROL'.
create object h_picture exporting parent = h_pic_container.
call method h_picture->set_display_mode
exporting
display_mode = cl_gui_picture=>display_mode_normal.
call method h_picture->load_picture_from_url
exporting url = graphic_url
importing result = g_result.
or you can check the program RSDEMO_CUSTOM_CONTROL
check link :
How to insert Image on Screen
thanks
Parvathi -
How to upload logos in module pool programs?
hi frnds,
My requirement is to upload the logo in the module pool screen.Can any one explain in detail? its urgent.Hi,
First you need to upload using OAER or OAOR.
you need to have containers, and you need to use classes.
data: DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
using this method you can set background picture.
CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
EXPORTING
PICTURE_ID = DL_BACKGROUND_ID.
Here is the sample code
Create a screen
Place a custom container for the picture on the screen.
Name the container GO_PICTURE_CONTAINER.
Type pool for using SAP icons
TYPE-POOLS: icon.
Declarations
DATA:
go_picture TYPE REF TO cl_gui_picture,
go_picture_container TYPE REF TO cl_gui_custom_container.
MODULE status_0100 OUTPUT.
IF go_picture_container IS INITIAL.
Create obejcts for picture and container and
setup picture control
CREATE OBJECT go_picture_container
EXPORTING
container_name = 'PICTURE_CONTAINER'.
CREATE OBJECT go_picture
EXPORTING
parent = go_picture_container.
Set display mode (Stretching, original size etc.)
CALL METHOD go_picture->set_display_mode
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
EXCEPTIONS = 1.
Load picture from SAP Icons. To oad a picture from an URL use method
load_picture_from_url
CALL METHOD go_picture->load_picture_from_sap_icons
EXPORTING
icon = icon_delete
EXCEPTIONS error = 1.
ENDIF.
ENDMODULE. [/code]
check the below link.
http://www.sapgenie.com/abap/controls/picture.htm
Award points if helpful.
Regards,
Shiva KUmar -
How to insert Logo in module pool programming
Plz any one can explain me that how we will inseart Logo on screens by using module pool programming (in GUI programming) .
Hello.
I'll give you an example of inserting a personal photo in UI programming. Hope it helps you.
First of all, in your screen (painter), insert a custom control and give it a name (PHOTO in my example).
Then, in your screen PBO, insert a coding like this:
CLEAR handle.
CALL FUNCTION 'HR_IMAGE_INIT'
EXPORTING
p_pernr = pernr
p_tclas = 'A'
container = 'PHOTO'
IMPORTING
handle = handle
EXCEPTIONS
no_document = 1
internal_error = 2
OTHERS = 3.
CALL FUNCTION 'HR_IMAGE_SHOW'
EXPORTING
p_pernr = pernr
p_tclas = 'A'
handle = handle
EXCEPTIONS
invalid_handle = 1
no_document = 2
internal_error = 3
OTHERS = 4.
Regards.
Valter Oliveira. -
How to retain leading zeros in module pool screen
Hi experts,
I have a ztable field of type NUMC4 being displayed on a module pool screen, the value in the field is '0001', but on the screen it displays value as '1' (without leading zeros), When I save the record, Even in the databse it stores as '1'.
But I have checked in debugging the field always contains '0001' in the program execution and I have also used 'CONVERSION_EXIT_ALPHA_INPUT' in the PBO but no use.
Pls suggest.
Thanks,
DeepakCheck the screen attributes for the field. There is an option to show leading zeroes.
edit.
And how did you see it was stored a 1 and not 0001? Using SE16N? Mind you: with SE16N conversion-exits are executed automatically thus showing 0001 as 1.
To make sure: double click on the record in SE16N and look if it's still 1 and not 0001. -
Display Continuous Fluctuations in Input Data in Module Pool Screen
Dear All,
We are working on a Weighbridge Interface scenario, where the weighbridge is sending data to a digitizer, which is connected to the COM port of a PC. The objective is to read the data from the digitizer, and display in a Module pool screen. However, there is one more requirement: the weight may fluctuate until it stabilizes, and the fluctuations have to be displayed on screen. For example, the tare weight of a vehicle may be 12.4 TON, but when the vehicle is standing on the weighbridge, the weight may vary from 10.4 to 12.4 TON. The idea is to capture the stable weight, so that any discrepancies can be avoided. In the current IT system implementation, the fluctuations in the weight are displayed. But using ABAP, can these fluctuations be captured? For example, we may design a screen containing a field for capturing the weight, and the weight displayed there automatically refreshes as soon as there is a change in the digitizer reading. Is this possible to achieve? If so, how?
Awaiting answers.
Thanks and Regards,
SidHi Sid,
just a suggestion for the refreshing of an ABAP screen: you can use class CL_GUI_TIMER, but it only handles whole seconds, i.e. 1 second, 2 seconds and so on, but not 0.5 seconds...
An example of an ABAP listing could be the following:
*& Report ZZAVV001
REPORT zzavv001 NO STANDARD PAGE HEADING.
CONSTANTS: c_yes(1) TYPE c VALUE 'X'.
DATA: BEGIN OF t_bseg OCCURS 0.
INCLUDE STRUCTURE bseg.
DATA: END OF t_bseg.
data: d_num_bkpf type i,
d_num_bseg type i.
PARAMETERS: interval TYPE i DEFAULT 5. "meaning 5 seconds
* CLASS lcl_receiver DEFINITION
CLASS lcl_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_receiver DEFINITION
* Global data
DATA:
test TYPE i,
receiver TYPE REF TO lcl_receiver,
timer TYPE REF TO cl_gui_timer.
START-OF-SELECTION.
CREATE OBJECT timer.
CREATE OBJECT receiver.
SET HANDLER receiver->handle_finished FOR timer.
timer->interval = interval.
CALL METHOD timer->run.
PERFORM load_data. "or whatever you have to do to read the weight
PERFORM show_list. "or whatever you have to do to print the weight you've read
* CLASS lcl_receiver IMPLEMENTATION
CLASS lcl_receiver IMPLEMENTATION.
METHOD handle_finished.
PERFORM carga_datos.
PERFORM muestra_listado.
CALL METHOD timer->run.
ENDMETHOD. "handle_finished
ENDCLASS. "lcl_receiver IMPLEMENTATION
*& Form load_data
* text
FORM load_data.
clear: d_num_bkpf,
d_num_bseg.
select single count( * )
into d_num_bkpf
from bkpf.
select single count( * )
into d_num_bseg
from bseg.
ENDFORM. "load_data
*& Form show_list
* text
FORM show_list.
get time.
skip to line 1.
position 1.
write: / 'Date / Time:', sy-datum, sy-uzeit.
write: / 'Number of BKPF records:', d_num_bkpf.
write: / 'Number of BSEG records:', d_num_bseg.
ENDFORM. " show_list
Okay, it's just a tiny code snippet, but I hope it may help you by designing auto-refreshing screens.
Kind regards,
Alvaro -
Call module pool screen from ABAP Webdynpro
Hi All
I designed one screen in normal classical dynpro in SE80 for module pool program. I want to call that screen layout design in webdynpro view layout.
So please help me how can i call that module pool screen from my ABAP webdynproHi
Thank you for your great replay. But Mr Ramakrishnappa and Mr Katrice as your reference i go through that but when i insert the program name and screen number program is end with a run time error saying
dynamic type conflict when assigning reference.
Please refer the below snap shot -
How to display image and data in module pool screen?
Hi,
I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
Actually I am able to display image or data any one but not both.
one more thing I want to display multiple images and their data.
Please suggest some one if you have any idea.
Regards,
Dileep.You can try below way, I have used in report.
DATA: gc_docking TYPE REF TO cl_gui_docking_container, "#EC NEEDED "Docking Container
gc_split TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED "Splitter
gc_top_container TYPE REF TO cl_gui_container, "#EC NEEDED "Top Container
gc_bottom_container TYPE REF TO cl_gui_container, "#EC NEEDED "Bottom Container
gc_document TYPE REF TO cl_dd_document, "#EC NEEDED "Document
gc_events TYPE REF TO lcl_event_class, "#EC NEEDED " Local Event Class
gc_grid TYPE REF TO cl_gui_alv_grid, "#EC NEEDED " ALV Class
" Creating Docking
CREATE OBJECT gc_docking
EXPORTING
ratio = c_95.
IF sy-subrc EQ 0.
* Splitting the Docking container
CREATE OBJECT gc_split
EXPORTING
parent = gc_docking
sash_position = c_10 "Position of Splitter Bar (in Percent)
with_border = c_1. "With Border = 1 Without Border = 0
ENDIF.
* Placing the containers in the splitter
gc_top_container = gc_split->top_left_container .
gc_bottom_container = gc_split->bottom_right_container .
* Creating Grid
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_bottom_container.
ELSE.
* Background job handling
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_docking.
ENDIF.
* Creating the document
CREATE OBJECT gc_document
EXPORTING
style = 'ALV_GRID'.
Regards,
Sameer -
Icon display in Module pool screen not visible to some users
Hi,
I have added an icon in one of the module pool screen with dynamic quick info. The page is rendered fine and the info is also displayed well for most users except some. I can't figure out why the icon is not being displayed for some users.
Do someone has any solution for this?
Thanks,
SumithAs I recall, the icons are actually stored in a file on each PC so some users may have a corrupted or out-of-date file with the icons. You can look for posting on "how to add an icon" to see a discussion on this topic.
I found some useful info at:
Create and Add Icons to table ICON?
Message was edited by: Charles Folwell -
How to get the Grand Total in Module pool Screen
Hi Frds.
How to get the Grand Total in Module pool Screen
Example i have 10 different materials
for each matarial has different moving . But in my case matarials is doesnt matter here
10 material Moving Average price to do Frand total and display in one column...
Please Help me out Frds.
Regards,
KabilHi
You need to calculate the total in a module of PAI (or PBO) event:
PROCESS PAI.
LOOP.....
ENDLOOP.
MODULE CALCULATE_TOTAL.
MODULE CALCULATE_TOTAL.
GRAND_TOTAL = 0.
LOOP AT ITAB,
GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
ENDLOOP.
ENDMODULE.
In this way the grand total will be calculated as soon as the user presses enter or another command.
You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop, -
How to print the Module pool screen using a push button in the screen
Hi Every one,
i have developed a module program , which have a selection screen and it display the output in a structured way.
output includes boxes, texts etc...
my problem is :---
How to print the Module pool screen using a push button in the screen.When the "Print" button is pressed:
leave to list-processing and return to screen 100. "(current screen)
Call a transaction that runs your print program.
Rob -
How to handle The Back button on Module Pool screen
Hi Gurus,
I have created a module pool screen. In that screen I have used some input/output fields(text box) which i have marked mandatory by making the input field as "required" under program tab.
now when running the screen if no data is entered into these mandatory input field then BACK button does not work. First I have to enter some data into the input filed only then the BACK button works. How should i code so that the back button works even without entering the data into these mandatory fields.hi,
use AT EXIT-COMMAND with the module.
eg. module user_command at exit command.
then there will be no problem. -
How to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?
hi frnds.
My problem is in module pool screen how to do ICON_EXPAND and ICON_COLLAPSE input fields in module pool screen?And how to do GUI STATUS and GUI TITLE? IN SE80.
ITS URGENT.POINTS WILL BE REWADED.THANKS IN ADVANCE.Hi,
Go through this thread.
[expand and collapse|expand and collapse]
Cheers,
Simha. -
How to insert tabstrip control in module pool screen painter
Hi all!
plz tell e how to use tabstrip control in module pool screen painter.Also plz give me an example program using tabstrip control.To insert tabstrip just open layout of screen and press on the tabstrip button there .
Use this souce code further to activate it .
CONTROLS tabstrip TYPE TABSTRIP.
DATA: okcode TYPE sy-ucomm,
dynnr TYPE sy-dynnr,
flag type flag,
active like tabstrip-activetab .
call SCREEN 100.
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
data: lv_okcode type syucomm.
lv_okcode = okcode.
clear okcode.
case lv_okcode.
WHEN 'TAB1'.
dynnr = '0110'.
WHEN 'TAB2'.
dynnr = '0120'.
WHEN 'TAB3'.
dynnr = '0130'.
WHEN 'TAB4'.
dynnr = '0140'.
WHEN 'TAB5'.
"check authorization, if authorization fails
flag = 'X'. "set the global flag
active = 'TAB1'. "store active tab in global variable
dynnr = '0110'. "set the screen number
WHEN 'BACK' or 'EXIT'.
leave program.
ENDCASE.
IF lv_okcode(3) = 'TAB'.
tabstrip-activetab = lv_okcode.
ENDIF.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
IF tabstrip-activetab IS INITIAL OR
dynnr IS INITIAL.
tabstrip-activetab = 'TAB1'.
dynnr = '0110'.
ENDIF.
"set the activetab explicilty here
if flag eq 'X'. "from authorization failure
tabstrip-activetab = active. "'TAB1'
clear flag.
endif.
ENDMODULE. " STATUS_0100 OUTPUT -
How to give ** bydefault in password in module pool screen .
Hi experts
how to give ******* by default in password in module pool screen .
ThanksHi ,
Double click on the field u will get a pop up window
i.e. attribute window for that field.
in that window you have a tab called Program at the bottom.
in program tab you have many checkboxes.
check the check box with name *Entry.
and activate.
what ever you enter now will be in password formate
Regards
Ajay
Maybe you are looking for
-
NW04 Testdrive Dump when using ABAP Webservice whizard
Hello, I have NW4 running on FC5. When I try to create a webservice in SE80 the whizard dumps: Runtime Errors GEN_NO_GENINFO_FOR_DATID Occurred on 21.02.2008 at 10:08:16 No generation information for DATID "%_#D18404". What happe
-
Powerbook 520c on the web?
I have a powerbook 520c with a floppy drive. When I plug the ethernet into my network, the server doesn't assign it an IP address. Also, there is no browser to use once the connection is up and running. Is there any way to connect to my iMac via ethe
-
This warning appears in Event Viewer every day on T530 w/ Win7-64
Event 37, Kernel-Processor-Power The speed of processor [0,1,2,3] in group 0 is being limited by system firmware. The processor has been in this reduced performance state for 86398 seconds since the last report. Can anything be done to fix this?
-
Hi, I have created a accrual plan and attached the accrual element to my employee element entries. I want to see the plan details on the employee time card as well. I know we have a Preference for showing the same, I want to know what is the values w
-
PSE6 Mac OS - Save For Web won't save JPEG high res setting in Preset
Why is it that, contrary to documentation, Save For Web won't remember that I always select JPEG High for every photo file I save? Each time, it comes up as "Custom" Low quality, and can't even remember that I want JPEG format. My reliable old copy o