How to display image in selection-screen of a report
Dear all ,
i want to show my image from url or from desktop to the report selection-screen . i have searched sdn and found some code . after applying it i am not able to display image in the selection-screen although it is displaying the box in which the image should appear . here i am sending my code plz verify where is the mistake .
REPORT ZPIC2.
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
PARAMETERS: A(4) DEFAULT '4' .
PARAMETERS: B(4) DEFAULT '5' .
AT SELECTION-SCREEN OUTPUT.
PERFORM show_pic.
**& Form show_pic
FORM show_pic.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 100
left = 150
top = 58
width = 350.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'C:\abc.jpg' .
endif .
IF sy-subrc NE 0.
ENDIF.
ENDFORM.
CORECT ANSWERS WILL BE HIGHLY APPRECIATED AND SURELY REWARED .
THANKS ,
AMIT RANJAN
Hi,
Try this code. hope it will work.
DATA: DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
PICTURE_CONTROL_1 TYPE REF TO CL_GUI_PICTURE,
URL(256) TYPE C,
PIC_DATA TYPE TABLE OF W3MIME WITH HEADER LINE,
PIC_SIZE TYPE I.
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: A(4) DEFAULT '4' .
PARAMETERS: B(4) DEFAULT '5' .
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT.
PERFORM SHOW_PIC.
*& Form SHOW_PIC
FORM SHOW_PIC .
CREATE OBJECT PICTURE_CONTROL_1
EXPORTING PARENT = DOCKING.
CHECK SY-SUBRC = 0.
CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
EXPORTING
BORDER = 5.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
CALL METHOD PICTURE_CONTROL_1->SET_POSITION
EXPORTING
HEIGHT = 200
LEFT = 100
TOP = 20
WIDTH = 400.
CHANGE POSITION AND SIZE ABOVE**************************
IF URL IS INITIAL.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
TYPE = 'image'
SUBTYPE = CNDP_SAP_TAB_UNKNOWN
SIZE = PIC_SIZE
LIFETIME = CNDP_LIFETIME_TRANSACTION
TABLES
DATA = PIC_DATA
CHANGING
URL = URL
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
EXPORTING
URL = 'file://D:\img.jpg'.
ENDFORM. " SHOW_PIC
Similar Messages
-
How to Display Varient on selection screen?
Hi All,
the requirement is i need to display the varient on selection screen as Paramente.
Display Varient /STANDARD as a paramente on selection screen.
Please let me know how to do it.
Regards,
Kumar
Moderator message: very basic, please search for available information before asking.
locked by: Thomas Zloch on Aug 12, 2010 12:27 PMHi All,
the requirement is i need to display the varient on selection screen as Paramente.
Display Varient /STANDARD as a paramente on selection screen.
Please let me know how to do it.
Regards,
Kumar
Moderator message: very basic, please search for available information before asking.
locked by: Thomas Zloch on Aug 12, 2010 12:27 PM -
How to display icons on selection screen ,without using classes.
Hi Experts,
How can we display icons on the selection-screen ..?
one of the methods i heard frm my frnds was to use ->cl_gui_picture_viewer
but as a begginer i am not tht comfortable with classes .So is there a way around to display icons on my selection screen without using classes .
Thanx in Advance,
Regards ,
Rajesh .Hi,
here a short example:
REPORT Z_TEST2.
TABLES: SSCRFIELDS. "Felder auf Selektionsbildern
INCLUDE .
SELECTION-SCREEN: BEGIN OF BLOCK A01 WITH FRAME TITLE MELDUNG1.
SELECTION-SCREEN: SKIP 2.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 10(04) T_ICON.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: SKIP.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(34) T_AUFSD.
PARAMETERS: P_AUFSD AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(34) T_AUFCO.
PARAMETERS: P_AUFCO AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN: PUSHBUTTON 45(04) PB01 USER-COMMAND SALL.
SELECTION-SCREEN: PUSHBUTTON 50(04) PB02 USER-COMMAND DALL.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(34) T_AUFCS.
PARAMETERS: P_AUFCS AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(34) T_AUFPP.
PARAMETERS: P_AUFPP AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: PUSHBUTTON 45(15) PB03 USER-COMMAND INIT.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: SKIP 2.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: PUSHBUTTON 45(15) PB04 USER-COMMAND ONLI.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: SKIP 2.
SELECTION-SCREEN: END OF BLOCK A01.
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = 'SALL'. "alle selektieren
P_AUFSD = 'X'.
P_AUFCO = 'X'.
P_AUFCS = 'X'.
P_AUFPP = 'X'.
ENDIF.
IF SSCRFIELDS-UCOMM = 'DALL'. "alle deselektieren
P_AUFSD = ' '.
P_AUFCO = ' '.
P_AUFCS = ' '.
P_AUFPP = ' '.
ENDIF.
IF SSCRFIELDS-UCOMM = 'INIT'. "initialisiern
P_AUFSD = 'X'.
P_AUFCO = ' '.
P_AUFCS = ' '.
P_AUFPP = 'X'.
ENDIF.
INITIALIZATION.
MELDUNG1 = 'Datenbankselektion'.
T_ICON = ICON_PRINT.
T_AUFSD = 'Kundenauftrag'.
T_AUFCO = 'Innenauftrag'.
T_AUFCS = 'Serviceauftrag'.
T_AUFPP = 'Fertingungsauftrag'.
PB01 = ICON_SELECT_ALL.
PB02 = ICON_DESELECT_ALL.
CONCATENATE ICON_REFRESH 'Initial' INTO PB03.
CONCATENATE ICON_EXECUTE_OBJECT 'Ausführen' INTO PB04.
START-OF-SELECTION.
write: / 'Test'.
END-OF-SELECTION.
Regards, Dieter -
How to display images in a simple or alv report
Dear gurus ,
i want to create a classical or ALV Report showing material codes(mara-matnr) and their respective images .
how can i achieve it means where i will store the images and how i will fetch it in the report .Plz send any sample code for this . Full points will be awarded .
Thanks ,
Amit Ranjan .hi
please use the following procedures
Upload Logo for REUSE_ALV_COMMENTARY_WRITE
For those who wish to upload and use a picture in your ALV abap reports.
Steps for uploading Logo :-:
1. Goto the transaction OAER
2. Enter the class name as 'PICTURES'
3. Enter the class type as 'OT'
4. Enter the object key as the name of the logo you wish to give
5. Execute
6. Then in the new screen select Standard doc. types in bottom window
Click on the Screen icon
Now, it will ask for the file path where you have to upload the logo
7. Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
or
Import Logo and Background Picture for Reporting
In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
From the SPRO:
HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
Activities
1. Enter the Name of your logo/background picture as an object key in the initial screen.
2. Make sure that the class name is PICTURES, and the class type is OT.
3. Choose Execute.
4. Double-click the document type Picture on the Create tab page. A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
5. Enter the path and choose Open. The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable.
reward points if useful,
Thanks,
Usha -
How to display images by using URLs in Interactive Reporting
Hello everybody,
My client has the Hyperion System 9.3 suite.
We have a report in Interactive Reporting showing product data.
The source for the report is a relational database (SQL Server).
The data is grouped by product.
My client needs the product's picture (jpg) in the report.
The problem is that product images are not available in the relational database but via URL like this:
http://client_domanin//Hyperion/id_product.jpg
(the name of the image equals the id of the product).
I was thinking to solve this problem using Java Script.
I don't know Java Script and don't know how to 'integrate' the JavaScript code with Interactive Reporting.
How should the Java Script look like?
Any help will be extremely appreciated.
Thank you all!
DanielaYou might be able to do it if you are using the iHTML view of the Report not the Interactive Reporting Web Client (Plug-in)
I do not have a 9.x server available to test this so it is guess on how i did it once in a Proof of Concept.
In Results section Create a Computed Item that will be the HTML tag for the Graphic
the syntax would look something like below
'<IMG SRC = "http://client_domanin//Hyperion/" + id_product + ".jpg">'
WHERE id_product is a column in your Data.
Again this will not show a graphic when viewed with Interactive Reporting Web Client or Desktop Client.
Good Luck, hope this is helpful
Wayne -
How to display image stored in DB in XML report.
Hi,
I am trying to display an Image uploaded by custom Form's attachment in XML report.
Can someone please share the steps or suggest a link...
Thanks in advance.
MadhavCheck this out:
http://blogs.oracle.com/xmlpublisher/2006/05/inserting_blobs_into_your_repo.html -
How to display images on my internal isight?
Hi,
I just bought the new iMac 2 gig dual. Running on 10.5.2.
I wanted to know how to display images on my screen during a video conference chat without resorting to holding up a print out to the camera? I need something where I can switch from video mode to image mode and show a single image at a time if I need to. All that while still talking of coarse. If it isn't possible with my iSight software, can you point me to other software I can download and still use my built in cam?
I hope I was clear enough in asking this.
Thanks
LibanWelcome to Apple Discussions, Liban
iChat can do what you want, but I do not know of any web-based video chat site that can.
Look for Help or Support information on the site you are using or ask the Webmaster if his site has the capability to do what you want.
EZ Jim
PowerBook 1.67 GHz w/Mac OS X (10.4.11) G5 DP 1.8 w/Mac OS X (10.5.2) External iSight -
How to display the sort value in the selection screen in the report title
Dear All,
How to display the sort value in the selection screen in the report title? I have selected a value in the selection screen for sorting , but i need that values by which i have sorted with in the report title. Can you please throw some light on this!!
Good day,
Thanks and regards
Arun SHi Arun,
Try this.
1, Set one dynamic parameter,
2, Drag and drop that parameter into your report title.
3, Pass the value(sort value) dynamically from your application,
4, Cheers..
Other wise Try with Dataset, create a dataset and fill thev alue into that.. Then set the data source from CR designer. and darg and drop that data column into the report.
Hope this will work,
Regards,
Salah
Edited by: salahudheen muhammed on Mar 25, 2009 11:13 AM -
How to reduce size of image in Selection Screen
Hi all
I am trying to add an image in Selection screen and i want to reduce size of image .
Please help me asap.
Thanks & Regards
ShavetaHi Prashat
I tried by reducing the size of container , But scroll bars appears automatically .
The size of Picture remains same .
Please tell me if there is any option to fix the size of container ... so that picture reduces its size automatically .
Thanks & Regards
Shaveta -
How to display contact person full screen photo in making a call or receive call
How to display contact person full screen photo in making a call or receive call
Apple have removed the full screen contact image calling in 7.1, they come with default icon. Hope they bring back that option in next, you can also leave feedback @http://www.apple.com/feedback/
-
How to call dynamic selection screen from another report
hi,
i have transaction ZFAGLL03.
it has got standard selection screen.. and dynamic selection screen...
i am calling this transaction from another report, now how do i display this dynamic selection screen.....Try following code and see if it helps:
TYPE-POOLS : rsds.
TABLES:tgsb.
DATA: trange TYPE rsds_trange,
trange_line
LIKE LINE OF trange,
trange_frange_t_line
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line
LIKE LINE OF trange_frange_t_line-selopt_t,
trange_line1
LIKE LINE OF trange,
trange_frange_t_line1
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line1
LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.
DATA: seltab TYPE TABLE OF rsparams WITH HEADER LINE,seltex TYPE rsds_texpr.
SELECT-OPTIONS:so_gsber FOR tgsb-gsber.
LOOP AT so_gsber.
trange_line-tablename = 'FAGLFLEXA_FS'.
trange_frange_t_line-fieldname = 'RBUSA'.
MOVE-CORRESPONDING so_gsber TO trange_frange_t_selopt_t_line.
APPEND trange_frange_t_selopt_t_line
TO trange_frange_t_line-selopt_t.
ENDLOOP.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit FAGL_ACCOUNT_ITEMS_GL with FREE SELECTIONS texpr AND RETURN . -
Hi all,
How to display image from the database table in the adobe form by using web dynpro abap?
I want to display image in the adobe interactive form by using web dynpro abap.
Please help me.
Regards,
sriniHi Srini,
If you go through the article you might have seen the following piece of code
*** Send the values back to the node
lo_el_z_if_test_cv->set_static_attributes(
EXPORTING
static_attributes = ls_z_if_test_cv ).
" here ls_z_if_test_cv has the image in XSTRING format which has beeen retrived using METHOD get_bds_graphic_as_bmp of CLASS cl_ssf_xsf_utilities
" In your case you need to just use the select query n fetch it from your table; ( provided your image is store in XSTRING format )
How is your image stored in your database table ?
Regards,
Radhika. -
How to add image to webdynpro screen . ?
How to add image to webdynpro screen . ?
hi,
right click ur application and then click on create mime object.
with Mime Objects u cn upload doc , jpeg, or giff files from our local system into the webdypnpro system .
You can even try creating the MIME objects in webdynrpo abap .
Right click on ur component->mime object->import
after importing you can see that image into your component as MIME object .Now insert a UI element image into your view layout .
Go to the source property of IMAGE element and select F4 option , u will find a window is opening with some tabs
Select tab COMPONENT IMAGES and component name select your component .
You will find the image which you have imported into this section just select the image and save it.
In the transaction sicf/bc/webdynpro , u cn check your component name there you can view the mime objects created by you .
also refer the SAP online help :
http://help.sap.com/saphelp_crm50/helpdata/en/46/bb182fab4811d4968100a0c94260a5/content.htm
to knw more abt mime repositories.
http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
regards,
Amit -
Hi all...
I had displayed am image at selection-screen.
But the problem is that, the image is been over-lapping on the out-put screen also...
Here is the sample code which I had used
can any one find a solution for this.... Thanks in advance
REPORT z_XXX.
DATA: docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
DATA: query_table LIKE w3query OCCURS 1 WITH HEADER LINE,
html_table LIKE w3html OCCURS 1,
return_code LIKE w3param-ret_code,
content_type LIKE w3param-cont_type,
content_length LIKE w3param-cont_len,
pic_data LIKE w3mime OCCURS 0,
pic_size TYPE i.
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: p_dummy(4) DEFAULT '4' .
PARAMETERS: p_dummy1(4) DEFAULT '5' .
AT SELECTION-SCREEN output.
PERFORM show_pic.
START-OF-SELECTION.
data : var1 type i.
var1 = p_dummy1 + p_dummy.
write : / var1.
*& Form show_pic
FORM show_pic.
DATA: repid LIKE sy-repid.
repid = sy-repid.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 25
left = 10
top = 30
width = 40.
IF url IS INITIAL.
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
query_table-value = 'zflight'.
APPEND query_table.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
object_not_found = 1
parameter_not_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
EXCEPTIONS
OTHERS = 1.
ENDIF.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = url.
ENDFORM. "show_picHi, Kiran
Please test after doing following changes hope will solve out your problem,
CALL METHOD picture_control_1->set_position
EXPORTING
height = 300 " Change Here
left = 50 " Change Here
top = 50 " Change Here
width = 1200. " Change Here
REFRESH query_table.
query_table-name = '_OBJECT_ID'.
query_table-value = 'ENJOYSAP_LOGO'. " Change Here add you Pic name here
APPEND query_table.
Please Reply if any Issue,
Best Regards,
Faisal -
How to show message on selection screen status bar if alv is empty.
Hi,
Can anyone tell me how to show message on selection screen status bar when our final internal table or alv is empty .
i am getting message on alv status bar, where no data is in alv but i want to stop it to selection screen and show message there only.
Regards,
RanuHi,
After populating the final internal table do this check,
if it_final [] is initial.
message 'No data available' TYPE 'S' DISPLAY LIKE 'E'.
exit.
endif.
This will be displayed in the selection screen itself
Regards,
Vikranth
Maybe you are looking for
-
App-V 5.0 SP2 - PackageID & VersionID
I use PowerShell for testing newly sequenced applications. It's very basic with add and publish ... then unpublish and remove for cleanup. In general my PS script is: # First code adds the package clear $pkgPath = "\\svr\path" + "\" $pkgAppV = $pkgP
-
I have bought an ipad 2. My macbook is old mac os x version 10.4.11 and itunes version 9.2 which cant synch my new ipad as i need version 10.5 or later which however is not compatible with my mac os x. what can i do to synch my ipad without having to
-
LR 4 vs LR 3 Edit In PS CS5 changed?
In LR 3, when I would EDIT IN Photoshop CS5, the file would just open in PS. In LR 4.0, it saves "-Edit.psd" files and opens those in Photoshop. It does this for old raw files from old legacy folders, as well as new ones that were shot with a Nikon
-
Blackout on external monitor in dissolve
Hi, I'm running a cross dissolve on FCP 5.0.4. The footage is well in the middle of the take (a good 30 seconds either side for both clips). On the computer screen it's fine. On the external monitor there is a black flash (maybe a frame's worth) in a
-
AP 1200 local authentication PEAP
Can I use AP 1200 with configured local radius server as authenticator for Windows XP clients using PEAP auhentication metod ?