How to add Image dynamically in Webdynpro ABAP

Hi Experts,
How to add Image dynamically in Webdynpro ABAP.
My requirement is i maintain all the images in a table.
image source has to pick the table URl dynamically and display.
is that possible in webdynpro?
and also please give the suggesion,
without using MIME objects is that anyway to get images?
Thanks in advance.
Regrads,
Jeyanthi

Hi,
  are those icons wou want to display then. he following code will be useful.
data : lo_IMG type ref to CL_WD_IMAGE.
LO_IMG = cl_wd_IMAGE=>new_IMAGE( id = img_id SOURCE = 'ICON_BW_APD_TARGET' tooltip = sts_tltp ).
lo_cont->add_child( the_child = lo_img ).
here lo_cont is the container where you want to add the image dynamically and source is the attribiute through which you can change the ICON image. this thing you can getit from data base table and change accordingly.
Regards,
Anil kumar G

Similar Messages

  • How to Set Image size in webdynpro abap application

    Hi Experts,
    I am using image ui elemnet in my webdynpro application and i am getting the image on application, but here the problem is i am getting the image too big now i want to set the image size.
    Please Provide me the requried infromation to close the issuse.
    Thanks & Regards.
    Bhushan.

    The Image UI element has a height and width property.  Have you tried using those?
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9e/ef8841e3af1609e10000000a155106/frameset.htm
    Also consider using the property adjustImageSize to maintain the original proportions.

  • Add images dynamically

    Hello eperts,
                        can any one tell me how to add images dynamically in webdynpro. i had loaded the image in mime,and inside the method wdmodifyview i had written the coding ,
    data: lr_image      type ref to cl_wd_image.
    data: lr_container  type ref to cl_wd_transparent_container.
    data: lr_flow_data       type ref to cl_wd_flow_data.
        lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        lr_image = cl_wd_image=>new_image( source = 'new.jpg'l view = view ).
        lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_image ).
        lr_container->add_child( lr_image ).
    where 'new.jpg' is my mime object name.
    what other steps i have to follow to get the image while running.... thanks in advance.

    hi,
    if you want, you can modify the layout, just using your coding:
    lr_container->set_layout_data(lr_flow_data).
    In addition, make sure that your JPG is the MIME object of this WD component, otherwise, you should add "WD name" as the prefix of JPG's name..
    Best wishes.

  • 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

  • How to change images dynamically in jsp?

    Hi All,
    i Want to know how to change images dynamically in jsp, for example in any site if u look at advertise or any images, it will be changed after every few seconds.
    Please guide me
    Thanks
    Sandesh S

    sandeshas wrote:
    Hi BlusC,
    i was searching your mail Id to ask the question directly to u,i checked in your blog also, but i didnt get,I want to keep my email spam safe. Only trusted people and direct friends have it. Just use the forums for discussion.
    my question is suppose if i want to display and change the advertise(adds from different company ) in my web site,how can i do it by using jsp?
    Do i need to create animated gifs which contains all company adds??one might be from movie add,after few seconds next one migth be some other web site add like that, how can i achieve this in my servet,jsp or using struts.You create animated gifs with an [animated gif editor|http://google.com/search?q=animated+gif+editor]. There is nothing what JSP can do for you here.

  • How to add column dynamically based on user input in oracle?

    **how to add column dynamically based on user input in oracle?**
    I am generating monthly report based on from_date to to_date below is my requirement sample table
    EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE | 01-OCT-12 | 02-OCT-12 | 03-OCT-12
    100001.............John...........02-OCT-12...............6
    100002.............chris...........01-OCT-12...............4
    Based on user input, that is, if user need the report from 01-OCT-12 TO 03-OCT-12, i need to add that dates as column in my table, like 01-OCT-12 | 02-OCT-12 | 03-OCT-12....
    below is my code
    create or replace
    procedure MONTHLY_LVE_NEW_REPORT_demo
    L_BUSINESS_UNIT IN SSHRMS_LEAVE_REQUEST_TRN.BUSINESS_UNIT%TYPE,
    --L_LEAVE_TYPE_CODE           IN SSHRMS_LEAVE_REQUEST_TRN.LEAVE_TYPE_CODE%TYPE,
    L_DEPARTMENT_CODE IN VARCHAR2,
    --L_MONTH                    IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
    L_FROM_DATE IN SSHRMS_LEAVE_REQUEST_TRN.LVE_FROM_DATE%TYPE,
    L_TO_DATE in SSHRMS_LEAVE_REQUEST_TRN.LVE_TO_DATE%type,
    MONTHRPT_CURSOR OUT SYS_REFCURSOR
    AS
    O_MONTHRPT_CURSOR_RPT clob;
    v_return_msg clob;
    BEGIN
    IF (L_BUSINESS_UNIT IS NOT NULL
    AND L_FROM_DATE IS NOT NULL
    and L_TO_DATE is not null
    -- AND L_DEPARTMENT_CODE IS NOT NULL
    THEN
    OPEN MONTHRPT_CURSOR FOR
    select EMPLOYEE_CODE, EMPLOYEE_NAME AS NAME, DEPARTMENT_CODE AS DEPARTMENT,DEPARTMENT_DESC, CREATED_DATE,
    NVL(WM_CONCAT(CL_RANGE),'') as CL_TAKEN_DATE,
    case when NVL(SUM(CL2),0)<0 then 0 else (NVL(SUM(CL2),0)) end as CL_BALANCE,
    from
    SELECT DISTINCT a.employee_code,
    a.EMPLOYEE_FIRST_NAME || ' ' || a.EMPLOYEE_LAST_NAME as EMPLOYEE_NAME,
    a.DEPARTMENT_CODE,
    a.DEPARTMENT_DESC,
    B.LEAVE_TYPE_CODE,
    B.LVE_UNITS_APPLIED,
    B.CREATED_DATE as CREATED_DATE,
    DECODE(b.leave_type_code,'CL',SSHRMS_LVE_BUSINESSDAY(L_BUSINESS_UNIT,to_char(b.lve_from_date,'mm/dd/yyyy'), to_char(b.lve_to_date,'mm/dd/yyyy'))) CL_RANGE,
    DECODE(B.LEAVE_TYPE_CODE,'CL',B.LVE_UNITS_APPLIED)CL1,
    b.status
    from SSHRMS_EMPLOYEE_DATA a
    join
    SSHRMS_LEAVE_BALANCE C
    on a.EMPLOYEE_CODE = C.EMPLOYEE_CODE
    and C.STATUS = 'Y'
    left join
    SSHRMS_LEAVE_REQUEST_TRN B
    on
    B.EMPLOYEE_CODE=C.EMPLOYEE_CODE
    and c.EMPLOYEE_CODE = b.EMPLOYEE_CODE
    and B.LEAVE_TYPE_CODE = C.LEAVE_TYPE_CODE
    and B.STATUS in ('A','P','C')
    and (B.LVE_FROM_DATE >= TO_DATE(L_FROM_DATE, 'DD/MON/RRRR')
    and B.LVE_TO_DATE <= TO_DATE(L_TO_DATE, 'DD/MON/RRRR'))
    join
    SSHRMS_LEAVE_REQUEST_TRN D
    on a.EMPLOYEE_CODE = D.EMPLOYEE_CODE
    and D.LEAVE_TYPE_CODE in ('CL')
    AND D.LEAVE_TYPE_CODE IS NOT NULL
    group by EMPLOYEE_CODE, EMPLOYEE_NAME, DEPARTMENT_CODE, DEPARTMENT_DESC, CREATED_DATE
    else
    v_return_msg:='Field should not be empty';
    end if;
    END;
    my code actual output
    EMPLOYEE_CODE| Name | CL_TAKEN_DATE | CL_BALANCE
    100001....................John............02-OCT-12.................6
    100001....................chris...........01-OCT-12.................4
    how to add column dynamically based on from_date to to_date?
    Thanks and Regards,
    Chris Jerome.

    You cannot add columns dynamically. But you can define a maximum number of numbers and then hide unused columns in your form useing SET_ITEM_PROPERTY(..,VISIBLE, PROPERTY_FALSE);

  • How to Integrate HCM Process with Webdynpro ABAP Application

    hi,
    I have issue regarding how to integrate HCM Process with Webdynpro abap application.
    I had created one HCM process for transfer using Hrasr_dt T code and also created form scenario and work flow.
    How to Integrate HCM Process with Webdynpro ABAP Application
    by
    Parthasarathi

    hi suhasini,
    Thanks for your reply,
    Can u explain in detail.. and Give any documents or links...
    by
    Parthasarathi

  • How to add images to my PDF?

    Hi there
    I am wanting to know how to add images/photos to my PDF theta needs to be sent & signed to my supervisor?

    Hi Helen,
    You'll find the Add Image tool in the Content Editing pane of the Tools panel:
    If you don't see it there, make sure that you're using Acrobat, and not Adobe Reader, as these editing tools are unique to Acrobat.
    Best,
    Sara

  • I want to add image in column is it possible then how to add image in data base what data type we need to do

    I want to add image in column is it possible then how to add image in data base  what data type we need to give we required any casting  please show me one example
    jitendra

    Hi again,
    Several points that can help more:
    1. If you are working with Dot.Net, then I highly recommend read the first link that you got! This is nice and simple coding. Another option is this link which is even better in my opinion:
    http://www.dotnetgallery.com/kb/resource21-How-to-store-and-retrieve-images-from-SQL-server-database-using-aspnet.aspx
    2. As i mention above both link use the column's type image. There are several other option of working with Files. In most of my applications architecture I find that it is better to use a column which let us use any type of file and not an image column.
    In choosing the right column's type for your needs basically your fist question should be if if you want to store your data inside relational database environment or outside relational environment. It is a good idea to look for blogs on this issue. Next
    if you chose to store your data inside then you need to chose the right column type according to your server version. I highly recommend to look for blogs on the differences between those column's types: IMAGE, 
    Check those links:
    To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem
    http://research.microsoft.com/apps/pubs/default.aspx?id=64525
    FILESTREAM feature of SQL Server 2008
    http://msdn.microsoft.com/library/hh461480
    FileTables feature of SQL Server 2012
    http://technet.microsoft.com/en-us/library/ff929144.aspx
    Compare Options for Storing Blobs (SQL Server)
    http://technet.microsoft.com/en-us/library/hh403405.aspx
    Binary Large Object (Blob) Data (SQL Server)
    http://technet.microsoft.com/en-us/library/bb895234.aspx
    Managing BLOBs using SQL Server FileStream via EF and WCF streaming
    * Very nice tutorial!
    http://petermeinl.wordpress.com/2012/02/20/managing-blobs-using-sql-server-filestream-via-ef-and-wcf-streaming/
    [Personal Site] [Blog] [Facebook]

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • How to create custom calendar in webdynpro ABAP.....(WDA)

    Hi,
    How to create custom calendar in Webdynpro Abap ?.
    Regards,
    Narasimha

    The best way I see here is to develop your custom calender in any of the UI technologies supported like Flash (flex) or HTML5 (or maybe even SilverLight? not sure) and embed it in your WD view. You can also handle interactions between the embedded component and the WD controller.
    Regards,
    Raghavendra

  • How to upload muliple files in webdynpro abap?

    dear team
    any one could you tell me how to upload multiple files in webdynpro  abap with detailed steps?
    and where & what code i have to write?
    kindly give me the solution for this problem
    regards
    sathya

    Please use the forum search!
    Thomas has made an excellent guide about exactly what you require:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
    Cheers, Lukas

  • How to integrate adobe forms using webdynpro-abap

    Hi All,
    How to integarte adobe forms with webdynpro -abap(se80).
    Thanks & Regards
    Suman

    Hi suman,
       First you have insert a element interactive form in the view.
    In the properties of the interactive form you have properties called datasource and pdfsource.
    You have to give the data which you want to display in the datasource throught binding.
    These data you have to get it from the context. For pdfsource it should be xstring.
    There is one more property called templatesource, when you give a name and double click. It automatically goes to SFP and you can create the form of your purpose. While creating it will ask for context. That context will be the same which you have declared in the view or component controller.
    Regards,
    Arun.

  • Want to add Image Dynamically...

    I want to add image dynamically in my output screen..so is there any code that i can use..Please help with this...

    Can you please be more specific about what you want to do dynamically.  Do you just want to dynamically control which image appears in an image UI element (which can be done by data binding a context attribute to the image Source property) or do you want a dynamic number of images (which can be done with a row repeater or multipane UI element and inner Image UI elements).

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

Maybe you are looking for

  • How can I view the number of items I have in a folder on Mac 10.9.2 (Mavericks)?

    I have only been using Mac OS X 10.9.2 (Mavericks) for a little while so I'm having to deal with many inconveniences that I didn't have to face with Mac OS X 10.6.3 (Snow Leopard). It's frustrating that 10.9.2 (Mavericks) doesn't let me tap twice on

  • Scheduled system image backup windows 8.1

    Hello, in windows 8.1. there is an option to create a system image backup. What can be done to configure this as a scheduled job to backup a machine every night as an image? Thx

  • Common Frustration

    I read this in an article about Linux, but I think the idea certainly applies here as well (and probably in forums everywhere). I posted a message on a forum, but Linux people were mean to me. in most examples of this complaint, the individual concer

  • HT201412 All my Apps. are automatically shutting off when I try to use them, how do I get them to work again?

    All my apps. are automatically shutting off when I try to use them..  They were working just fine yesterday, and today they just kick me back to my home screen!  How do I get them to start working again.  And my sleep/wake button is broken...  so how

  • Macbook not showing storage correctly

    Hey I have macbook pro mid 2012 and recently i updated to Mac OS X Yosemite. In the past i  checked how much memory I had through the about this mac and under the storage tab. Lately I have seen that apps is Showing it has consumed like 135 GB of mem