How to insert Image on Screen

Hi Experts,
I have to insert a Image on Screen in Dialog Programmiong.
Can anybody tell me how to do this ?
Thanks,
SB.

Hi,
You can do that using function modules.
you can check the Include program : SAPTABLEPAINTER_DEMO_PBO.Which is used in Main prog : SAPTABLEPAINTER_DEMO.
With the help of Custom control you can achieve that.
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.
For more information on this check stnd programs..
Thanks
Parvathi

Similar Messages

  • How to insert images in a table

    Hi all,
    Iam working On Oracle10g
    can any one explain how to insert images in a table.
    Any help will be much appreciated!!
    Thanks.

    Hi,
    Try like this
    step1: Create a folder & place the image in it.
    for eg: place the image 'Sunset.jpg' in 'IMAGEFILE' folder of D drive
    Step2: Create a Directory in sql*plus as
    CREATE DIRECTORY IMAGEDIR AS 'D:\IMAGEFILE';
    Step3: Grant previlage to user
    GRANT READ ON DIRECTORY IMAGEDIR TO PUBLIC;
    Step4: Create the table in which you want to insert the image
    create table loadalbum
    (name varchar2(100),
    image blob)
    Step5: Create the procedure as
    declare
    l_blob blob;
    l_bfile bfile;
    begin
    insert into loadalbum values ( 'Sunset', EMPTY_BLOB() )
    returning image into l_blob;
    l_bfile := bfilename( 'IMAGEDIR', 'Sunset.jpg');
    dbms_lob.fileopen( l_bfile );
    dbms_lob.loadfromfile( l_blob, l_bfile, dbms_lob.getlength( l_bfile ) );
    dbms_lob.fileclose( l_bfile );
    end;
    Now you can know whether the image is inserted or not by
    SELECT COUNT(*) FROM LOADALBUM;
    COUNT(*)
    1
    which means image is inserted.
    Hope this may help you.

  • How to insert image in Blog Post

    Hi,
         I want to create a blog post. For that i have to insert some images in that post. These image are in my PC desktop. How to upload/insert these images in my blog post body.
        I am able to see a option 'Insert Image' in blog post editor. But it is asking me the URL of the image. I can brouse the image from desktop but how to get the URL of that image.
        The same problem also come while adding snaps in profile.
        Can anyone help me on this regards.
        I am sorry if it is not the right forum for putting such question. Also want to know which will be the right forum for putting such queries.
    Thanks & Regards,
    Abhishek Sarkar

    Hello,
    There is 2 ways to insert an image:
    1. You can select the picture icon on the tool bar
    and then the foolowing screen will allow you to upload your picture from your computer:
    2. You can also drug and drop the image directly from your computer to the text, this is the way I use.
    Hope it is helpful,
    Elidan

  • How to insert image in the title bar?

    Hi experts,
    how to insert the image or icon in the title bar of a screen, similar to the screen below.
    Att.,
    Luiz.

    Hi Luiz,
    You can create them in GUI Status. If you are using a module pool program uncomment SET PF-STATUS '<STATUS-NAME>' statement, double click on  <STATUS-NAME> and you will be directed to the screen for setting your GUI status.There you can create buttons with desired icons. If it is a report program add SET PF-STATUS '<STATUS-NAME>'  statement to your program and follow the same procedure.
    Refer the wiki for more details.
    GUI Status of A Program using Menu Painter - ABAP Development - SCN Wiki
    Regards
    Anoop

  • How to Insert Image in a Column of a table

    Hi
    I have read several documentations but still could not find any relevant one that can help me in inserting a image in a BLOB column of a table.I have read about DBMS_LOB but still not clear how to insert an image in the table.
    I followed following steps :
    create table Emp_Identity(Id Number,Photo BLOB);
    Insert Into Emp_Identity(1,'d:\vishal.bmp');
    Please tell me steps to be followed.
    Regards
    Vishal Chaudhry
    null

    I am using Developer 2000 Forms 6i as Front End (Oracle 8.1.6)
    My table structure is:
    SQL> desc test_lob
    Name Data Type
    ID NUMBER
    NAME VARCHAR2(100)
    PHOTO BLOB
    SOUND BINARY FILE LOB
    IS there any way to display the BFILE contents on the frontend.....?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by vishal chaudhry ([email protected]):
    Hi,
    I could actually insert an image in a BLOB type column from the backend(Sql plus) not directly but by using BFILE and see that image on the frontend (Forms 6i Developer 2000,Item type is Image as there is nothing like BLOB/BFILE in front end) using the following procedure :
    IS there any way I can insert an image directly in a BLOB column from the backend rather than using BFILE?
    CREATE OR REPLACE PROCEDURE loadLOBFromBFILE_proc IS
    Dest_loc BLOB;
    Src_loc BFILE := BFILENAME('SOUND_DIR', '123w.bmp');
    ** SOUND_DIR is a logical directory created by giving path of the server
    ** Create Directory SOUND_DIR as 'd:\u020\o816\ctx\test'
    ** d:\u020\o816\ctx is the physical path of the server \\pslndb\ctx$
    ** test is the dummy testing directory created on the server
    ** 123w.bmp is lying in the test directory
    Amount INTEGER ;
    BEGIN
    Amount := DBMS_LOB.GETLENGTH(Src_loc);
    SELECT photo INTO Dest_loc FROM test_lob
    WHERE ID = 1
    FOR UPDATE;
    /* Opening the source BFILE is mandatory: */
    DBMS_LOB.OPEN(Src_loc, DBMS_LOB.LOB_READONLY);
    /* Opening the LOB is optional: */
    DBMS_LOB.OPEN(Dest_loc, DBMS_LOB.LOB_READWRITE);
    DBMS_LOB.LOADFROMFILE(Dest_loc, Src_loc, Amount);
    /* Closing the LOB is mandatory if you have opened it: */
    DBMS_LOB.CLOSE(Dest_loc);
    DBMS_LOB.CLOSE(Src_loc);
    COMMIT;
    END;
    <HR></BLOCKQUOTE>
    null

  • How to Insert image file from fileChooser to a tabbedPane?

    Hi,
    Currently, i have encounted a problem halfway through my project. That is how do i insert images into a tabbedPane after selecting a image file from the fileChooser?
    Do anyone has any idea of how to solve the above problem?
    Thanks!!

    I would put the image in a JLabel and put the JLabel in the tabbed pane.

  • How the DVD image on screen varies in size .....

    So I have my project on DVD and am pleased, in fact amazed at how good the quality is but there's one little frustrating niggle!
    In order to keep text on some of my graphic images on screen, in the timeline I've had to reduce the size of the overall image. Once converted to DVD, there will be a black border around the image on a Sony TV. Play it on a different TV (LG perhaps) and that gap is filled so it fits very smartly on the 16:9 screen. In fact the text is very close to the edge. And if I stuck strictly to the title safe boundaries, on the Sony TV the black border would be even wider. Gosh I hope this is making sense!
    Video footage is of course fine because no-one is gonna notice what's missing around the perimeters, unless of course some text appears there too but it would never go all the way to the edge.
    Ideally it would be perfect if the graphic designers designed the image so the text wasn't so close to the edge of the graphic but there's nothing I can do about that now.
    So a whole lot of these DVDs are going out to various places here and there and on various screens and in many cases the screen will be filled but in some cases it won't and will look a bit average.
    By the way the screens are on the same settings, 16:9, Full screen.
    Is there a simple solution to this? Thanks for stayin' with me.
    Peter

    Ideally it would be perfect if the graphic designers designed the image so the text wasn't so close to the edge of the graphic but there's nothing I can do about that now.
    Inform your designers that Photoshop includes templates that conform to TV & Video specifications.
    They even have the Action and Title Safe guides switched on by default.
    Look in the File > New menu bar item then click the Preset button to find the templates.
    For stuff like titles and logos that need to be composited, they should deliver .TIFF files with a transparent background.

  • How to insert images into oracle databse......

    hi,
    i have to insert images into oracle database..
    but we have a procedure to insert images into oracle database..
    how to execute procedure.
    my images file is on desktop.
    i am using ubuntu linux 8.04..
    here i am attaching code of my procedure
    create or replace PROCEDURE INSERT_BLOB(filE_namE IN VARCHAR2,dir_name varchar2)
    IS
    tmp number;
    f_lob bfile;
    b_lob blob;
    BEGIN
    dbms_output.put_line('INSERT BLOB Program Starts');
    dbms_output.put_line('--------------------------');
    dbms_output.put_line('File Name :'||filE_namE);
    dbms_output.put_line('--------------------------');
    UPDATE photograph SET image=empty_blob()
    WHERE file_name =filE_namE
    returning image INTO b_lob;
    f_lob := bfilename( 'BIS_IMAGE_WORKSPACE',filE_namE);
    dbms_lob.fileopen(f_lob,dbms_lob.file_readonly);
    --dbms_lob.loadfromfile(b_lob,f_lob,dbms_lob.getlength(f_lob));              
    insert into photograph values (111,user,sysdate,b_lob);
    dbms_lob.fileclose(f_lob);
    dbms_output.put_line('BLOB Successfully Inserted');
    dbms_output.put_line('--------------------------');
    commit;
    dbms_output.put_line('File length is: '||dbms_lob.getlength( f_lob));
    dbms_output.put_line('Loaded length is: '||dbms_lob.getlength(b_lob));
    dbms_output.put_line('BLOB Committed.Program Ends');
    dbms_output.put_line('--------------------------');
    END inserT_bloB;
    warm regerds
    pydiraju
    please solve my problem
    thanks in advance.......

    thank you
    but i am getting the following errors.
    i connected as dba and created directory on /home/pydiraju/Desktop/PHOTO_DIR'
    and i gave all permissions to scott user.
    but it not working . it gives following errors.
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    Permission denied
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SCOTT.LOAD_FILE", line 28
    ORA-06512: at line 1
    Warm regards,
    Pydiraju.P
    Mobile: +91 - 9912380544

  • Insert image, full screen, without backgroud

    Hi everyone,
    i use dreamweaver CC for my website. My website is onepage, so i must insert a image, full screen where i put hyperlink ecc...
    The problem is that when i insert my single image, i've at the top, at the bottom , right and left, small white bars of the background. Is possible delete this bar? i don't want background.
    Thanks so much for the help!!!
    Fede

    Have you set this property in your CSS either in body tag or in the main wrapper DIV?
    For example.
    body {
    margin:0px;
    padding:0px;
    If this does not help , please post a link to your web page...

  • How to insert image in forms?

    Hi Friends,
    I m new to Forms. plz tell me how to display image in canvas (form)?
    I m using Forms 6i.

    do you want to show a static image or an image from the database?
    If its a static image have at look at this Re: Oracle FORMS with image background, is that possible?
    If its a database image you should have a table with a blob-column. If you use the databalock wizard and include that column in the block, it will generate you an image-item which can then be shown in the layout.
    Edited by: Andreas Weiden on 25.11.2008 21:58

  • How to insert image or copy

    Your insert image does not work nor can I paste a copy for discussion purposes.
    Solved!
    Go to Solution.

    Hi Jin. Thanks again. I don't use Yahoo. Is there something else I can use that's available through Google? Is there an issue with these tools and will they "Lenovo" being fixing the problem soon. I appreciate that you don't work for Lenovo.
    Thanks Roy

  • How to insert image into table and to in Oracle 9i intermedia?

    Mr Lawrence,
    I want to ask something:
    I use Oracle 9i intermedia
    If i use this script:
    CREATE TABLE images (
    file_name VARCHAR2(100) NOT NULL,
    image ORDSYS.OrdImage
    then
    CREATE OR REPLACE DIRECTORY imgdir AS 'd:/data';
    then
    INSERT INTO images (file_name, image)
    VALUES ('tree', ORDSYS.ORDImage.init('file','imgdir','tree.jpg' ));
    I put tree.jpg in directory d:/data in my hard drive.
    Is my tree.jpg file had already get in to my images table?
    I'm little confuse, because when i check my table with this script:
    select file_name, i.image.getWidth() from images i;
    it's show that my i.image.getWidth() for file_name tree is empty.. that mean my tree.jpg doesn't get in to my table.. am i correct?
    N also i want to ask how to display to screen all of my image from images table?
    Is it posible Oracle 9i intermedia to support display image from table?
    How?
    thanks Mr Lawrence

    -- First step would be to create a directory in oracle and map it to the folder where your image resides.
    create directory image_dir as *'c:\image_dir';*
    Then you would have to use a procedure to insert the image in your table. SO first create a table to hold the image. Note that you have to use a BLOB to insert the image.
    CREATE TABLE test_image
    ID NUMBER,
    image_filename VARCHAR2(50),
    image BLOB
    Now let's write the procedure to insert the image in the table above.
    CREATE OR REPLACE PROCEDURE insert_image_file (p_id NUMBER, p_image_name IN VARCHAR2)
    IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := BFILENAME ('image_DIR', p_image_name);
    -- insert a NULL record to lock
    INSERT INTO temp_image
    (ID, image_name, image
    VALUES (p_id, p_image_name, EMPTY_BLOB ()
    RETURNING image
    INTO dst_file;
    -- lock record
    SELECT image
    INTO dst_file
    FROM temp_image
    WHERE ID = p_id AND image_name = p_image_name
    FOR UPDATE;
    -- open the file
    DBMS_LOB.fileopen (src_file, DBMS_LOB.file_readonly);
    -- determine length
    lgh_file := DBMS_LOB.getlength (src_file);
    -- read the file
    DBMS_LOB.loadfromfile (dst_file, src_file, lgh_file);
    -- update the blob field
    UPDATE temp_image
    SET image = dst_file
    WHERE ID = p_id AND image_name = p_image_name;
    -- close file
    DBMS_LOB.fileclose (src_file);
    END insert_image_file;
    Now execute the procedure to insert the image.
    EXECUTE insert_image_file(1,'test_image.jpg');
    Thanks,
    Aparna

  • How to insert images in a FXML button?

    Hi all
    I would like to know how images are inserted within a FXML button.
    thanks

    Hi,
    Note that you don't need fx:id for that - using id="helpButton" would be enough. fx:id will work because the FXML Loader will set the value of Node.id to the value of fx:id if Node.id is null - but IMHO it is preferable to reserve the use of fx:id to connection to code & referencing - and use id for everything that has to do with CSS selectors.
    BTW: Another way to set the Button image is to set it directly in FXML. Button has a graphic property that can be used for that. Although CSS is probably more appropriate.
    <Button ... >
      <graphic>
        <ImageView>
          <image>
            <Image url="@../images/help.png"/>
          </image>
        </ImageView>
      </graphic>
    </Button>Hope this helps,
    -- daniel

  • How to insert data from screen to database Table..??

    This is regarding screen painter area..
    I have created a Z-table.
    Also created a screen where i am having input box.
    After entering text in the input box, i will click "SAVE" push button.
    When i click "SAVE" push button, the Text entered in the screen input box should be saved in that z-table.
    How to do it...??
    Can anybody explain me with ABAP code...???
    Thanks
    Pavan

    Hi,
    You can try follwong logic.
    tables : ztable.
    data wa_ztable like line of ztable.
    Case sy-ucomm.
    when 'SAVE'.
      clear wa_ztable.
      wa_ztable-field1 = screenfield1.
      wa_ztable-field2 = screenfield2.
      wa_ztable-field3 = screenfield3.
    modify ztable from wa_ztable.
    endcase.
    If it is simple database insertion,
    you can always use Table Maintainance provided by SAP.
    So that the code will be automatically generated and you dont have to worry.
    Regards,
    Shashank

  • How to Insert Image in XML publisher Report

    Hi Forum,
    I have created rtf file for xml report and in this i inserted one Image. When run the request from apps environment and while checking the output in excel format, Image is not displaying..
    Please advice me.
    Thanks & Regards,
    Nag.CH

    Hi;
    What is your EBS and Os?
    Please check below note:
    Image Does Not Display In XML Publisher Excel Output [ID 736897.1]
    Regard
    Helios

Maybe you are looking for

  • Credit exposure is missing after billing doc

    Hi all i maintain $ 20000 Credit limited in FD32 and i raised few sales order , delivery ,billing accounting document not clear when i check in FBL5N customer line balances it showing due as $ 25000 when i check in FD32 credit exposer is taking in to

  • Changed version of Data Entry Profile imported results in empty worklist

    Hi, We've just moved, among other things, changed versions of all of the data entry profiles to our production server. Everything went well however all users get an empty worklist to start with. Do you maybe know why this is? Is this standard behavio

  • Earpods not working sometimes

    The left earpod isn't working sometimes. It turns off and on every few minutes, but seems to work perfectly otherwise. I tried cleaning out the audio jack, and on different devices, but it has the same problem.

  • Create XMLList containing multiple node-sets?

    Hi All, I have scoured the internet trying to find an answer to this...I must be asking the wrong question?! <a>      <b>           <c/>           <c/>      </b>      <a>           <b>               <c/>           </b>      </a> </a> I want a | b/c n

  • Labview and Microsoft VC++ 6.0 (MFC)

    Hello Gurus, has anyone ever tried to implement a labview panel into a MDI frame of Mirosoft VC++ 6.0 At the moment i am able to do this stuff with a dialog based application. If you have some ideas please tell me."