How to upload images on WebDynpro(ABAP) screens

Hello All,
Could any one please help on how to create/change the image (jpeg/any file) dynamically on WebDynpro screen. I have seen couple of examples for uploading the text files in WDR_TEST_EVENTS, WDR_TEST_WEB_ICONS, but not found any standard program that explains about uploading images.
Requirement: User has to select any image/thumbnail from local PC and it should be displayed on main screen, it's not only from MIME directory.
We have the same logic in BSP Application (CFX_RFC_UI) to upload the thumbnail but am not sure whether we can use the same logic in WDC or not?
I have seen the same logic for WebDynpro (JAVA) here: 
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
I would really appreciate if you could provide me the code/process ASAP.
Thanks & Regards,
Hari.

Hi,
I have written the code as per given logic with no errors, after selecting jpeg file from local PC when I click on 'upload' button it is giving a following short dump.
Could you please let me know how to rectify it.
Error when processing your request
What has happened?
The URL http://rocpld02.wwwint.corp:8000/sap/bc/webdynpro/sap/zms_image_01/ was not called due to an error.
Note
The following error text was processed in the system PLD : Exception condition "CNTL_ERROR" raised.
The error occurred on the application server rocpld02_PLD_00 and in the work process 1 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: CONSTRUCTOR of program CL_GUI_CUSTOM_CONTAINER=======CP
Method: ONACTIONONBUTTONCLICK of program /1BCWDY/1I6RRYQYFWRI2HBZ5MAK==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/1I6RRYQYFWRI2HBZ5MAK==CP
Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Regards,
Hari.

Similar Messages

  • How to upload file in webdynpro abap alv

    Hello Friends,
    how to upload file in webdynpro abap alv
    Regards
    Narendra
    Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
    Edited by: Thomas Zloch on Jun 6, 2011 11:55 AM

    Hi Narendra,
    You ahve to search before posting. This discussed many times.
    You need to use file upload ui element to upload data. and display in alv.
    Please go thorugh this..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
    Re: Upload .xls file in WDABAP
    http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
    Cheers,
    Kris.

  • Upload image using webdynpro abap

    Gudday,
    I have a requirement to provide three functionalities like
    1)browse 2)upload 3)review the image using webdynpro ABAP.
    I tried with functionn module 'ARCHIV_CREATE_DIALOG_META'  which uploads images..but if i try to use the samething using service call in webdynpro ..it is throwing a dump..saying...'ARCHIV ID OF CLASS BASED NOT OCCURRED'
    Please suggest me how to proceed further ....its high priority....
    Awaiting your reply.
    Thanks,
    Deepthi.

    Hello Martina,
    Could you solve this problem?
    I need to upload documents in PA30 from Web Dynpro ABAP but the called funtions are not working. Could you please explain me how you resolved this?
    Thanks you very mutch!
    Regards
    Belé

  • 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 upload images in to custom table and display them in normal ABAP report?

    Hi Experts,
    Can anyone suggest me ,how to upload images into customised table and display thoes images in normal abap report.
    Thanks in Advance,
    Rgds,
    Anusha

    Hi Experts,
    Can anyone suggest me ,how to upload images into customised table and display thoes images in normal abap report.
    Thanks in Advance,
    Rgds,
    Anusha

  • How to use messages in WebDynpro-ABAP

    Hi,
        How to use messages in WebDynpro-ABAP.
    Does it has any class to manage messages like IWDMessageManager or we can just use standard SAP Message types.. like E,W,X,I,S..
    I hope it have a message container to display messages.
    Thank U for Ur time.
    Cheers,
    Sam

    Hi Sam,
    U can hard code the message or u can use the Assistance class's text elements to store the messages.
    1) Code to display hard coded message:
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = "Enter the correct Connection ID"
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    2) Code to display message from text element of assistance class:
    lv_text = wd_assist->if_wd_component_assistance~get_text( key = '002' ).
    report message
    CALL METHOD l_message_manager->report_attribute_error_message
    EXPORTING
    message_text = lv_text
    element = elem_flightinfo
    attribute_name = 'CONNID'.
    Where Message "Enter the Correct Connection ID" is stored in Text Element with key '002'
    Hope this helps,

  • How to upload Images in Forms 6i

    Dear all,
    How to upload images in Forms 6i and save it in database. Please anyone help me with example.
    Thanking you
    Shekhar

    why do you need an active/X for this?
    Can't you just create 2 default blocks on dept and on emp.
    Use the relationship wizard to define the relation. and set the number of records displayed for the emp block to 10?
    This will give you all you need with no hussle.

  • How to upload images on hard drive to iPad?

    how to upload images on hard drive to iPad?

    You can import them into iTunes then use that to get them onto your iPad.
    You can download the iCloud control panel and use photo stream to get the photos onto your iPad
    You can e-mail them to yourself and them save them from that e-mail
    You can upload them to something like dropbox and then download them onto your pad from there.

  • How to exit from a WebDynpro ABAP application and open another url

    Hi Friends,
    How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button?
    Regards,
    Xavier

    Hi,
    First of all you should create outbound plug in the window you are trying to exit with plufg type "Exit"
    Then create method handler in the view with this code
            data lo_view_cntr type ref to if_wd_view_controller.
            data lo_win_cntr type ref to if_wd_window_controller.
            data: l_parameter_list type wdr_event_parameter_list,
                  l_parameter type wdr_event_parameter,
                  l_val type ref to data,
                  l_val_url type REF TO data.
            field-symbols: <fs> type any,
                           <fs_url> type any.
            lo_view_cntr  = wd_this->wd_get_api( ).
            lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).
            CREATE DATA l_val type c.
            CREATE DATA l_val_url type string.
            ASSIGN l_val->* to <fs>.
            ASSIGN l_val_url->* to <fs_url>.
            <fs> = 'X'.
            <fs_url> = 'http://your-link.com'.     
            l_parameter-name = 'URL'.
            l_parameter-value = l_val_url.
            INSERT l_parameter INTO TABLE l_parameter_list.
            lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING plug_name = 'EXIT_PLUG'
                                                                    parameters = l_parameter_list ).
          You can easily change this logic to exit application instead of redirecting to the site
           just changing to
           l_parameter-name = 'CLOSE_WINDOW'.

  • How to upload image files in sqlserver from jsp

    hi friends,
    i want to upload images to sqlserver how will i store url of the image or dorectly store the file in binary format, if we store in related path,plese give some ideas on store that paths in data base and how we store that image files in user directories.
    bye

    hi jay , I know that concept , but i dont know how to upload image files to server Please help me
    here i am giving my problem
    If any user register with site, he has the option to upload his image to the site, so i am using in html file upload option, But i dont know how to store that iamge into the server
    please give me suggestion
    regards
    sudhakar

  • How to upload image using JSP

    hi,
    i am confronting a problem how to upload image from local PC to web server . I am using Tomcat 4.0
    please help me by sending code
    thanks

    Hi,
    Here is the solution for uploading images and displaying images. I am using struts with JSP, so this code has a Action and ActionForm class. You can put the same code in Java Beans or Servlet class to run it. This code has two JSP files - one for Upload (upload.jsp)and other for Image(image.jsp) display. It has a Servlet also to display the image. Here is the code file wise.
    Upload.jsp **********************************************************
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="uploadAction.do" enctype="multipart/form-data" method="POST">
    <p>File to upload   
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit value="Upload" property="upload"/></p>
    <p> </p>
    <p><html:img src="image.jsp"/></p>
    <p> </p>
    </html:form>
    </body>
    </html:html>
    Image.jsp*****************************************************************
    <jsp:useBean id="upload" class="uploadtest.uploadActionForm" scope="session">
    </jsp:useBean>
    <%
         byte[] rgb=(byte[])session.getAttribute("byte");
         request.setAttribute("byArr", rgb);
    %>
    <!--
    The image data is now on the request object.
    Forward the user to the showImage servlet.
    That servlet will process and display the image data contained on the request object.
    -->
    Image is<p>
    <jsp:forward page="/showimage" />
    Struts Action Class - UploadAction.java **************************************************
    import javax.servlet.http.*;
    import java.io.*;
    import org.apache.struts.upload.FormFile;
    import org.apache.struts.action.*;
    public class uploadAction extends Action {
    public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
    uploadActionForm upload = (uploadActionForm) actionForm;
    try {
    int size=upload.getFileUpload().getFileSize();
    //if (image != null) {
    byte[] byteArr = new byte[size];
    //Create an input stream to read the uploaded file.
    ByteArrayInputStream bytein = new ByteArrayInputStream(upload.getFileUpload().getFileData());
    // Load the input stream into the byte Array.
    bytein.read(byteArr);
    // Close the input stream.
    bytein.close();
    // Load the byte[] into the content field.
    upload.setContent(byteArr);
    HttpSession ses=httpServletRequest.getSession();
    ses.setAttribute("byte",byteArr);
    return actionMapping.findForward("success");
    } catch (Exception ex) {
    ex.printStackTrace();
    return actionMapping.findForward("success");
    Struts ActionForm class ---uploadActionForm.java***************************************************
    package uploadtest;
    import org.apache.struts.action.*;
    import org.apache.struts.upload.*;
    import javax.servlet.http.*;
    public class uploadActionForm extends ActionForm {
    private FormFile fileUpload;
    private byte[] content;
    public FormFile getFileUpload() {
    return fileUpload;
    public void setFileUpload(FormFile fileUpload) {
    this.fileUpload = fileUpload;
    public byte[] getContent()
    return content;
    public void setContent(byte[] theFile)
    this.content = theFile;
    public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    /**@todo: finish this method, this is just the skeleton.*/
    return null;
    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest) {
    Servlet to display image --- ShowImage.java ********************************************************
    import java.io.*;
    import java.util.*;
    public class ShowImage extends HttpServlet {
    //Initialize global variables
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    byte[] rgb = (byte[]) request.getAttribute("byArr");
    if (rgb != null)
    response.setContentType("image/gif");
    OutputStream stream = response.getOutputStream();
    stream.write(rgb);
    else
    response.setContentType("text");
    response.getWriter().write("attribute byArr not found");
    This code will enable to to upload and display the image. If you know Struts, then you can write the Struts-Config.xml file by yourself. Other wise write to me, I will send you that. If you want to save the image in database, then you have to keep it as BLOB datatype is database. For database you need to send the byte array in the uploadAction.java file to database. Database will keep the image as binary.
    Thanks
    Amit

  • IOS how to upLoad image

    IOS how to upload image, how the
    receiving server,can you help me?

    Hi. The iOS library for Azure Storage is currently in planning. In the meantime, please check out the following blog
    http://chrisrisner.com/Mobile-Services-and-Windows-Azure-Storage which may help with your scenario. Thanks.

  • How to Download a PDF file from Webdynpro ABAP Screen

    Hi,
    I have developed a input form in webdynpro - ABAP(Not Adobe),
    As I am not using above services here, but would like to download the information I am capturing into a PDF file.
    can I do it without using adobe interactive forms ?
    thanks
    Siddharth

    Hi siddharth,
    My suggestion would be to create your output as a Smartform and call your Smartform in your View.
    For more Click this link.
    [HOW TO DISPLAY A SMARTFORM AS PDF DOCUMENT IN WEB DYNPRO FOR ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]
    Regards
    Bulent

  • Uploading Image in webdynpro View.

    hi,
    I am new in Webdynpro Java. I want to upload image ( for ex. A company Logo).
    Any inputs how to proceed for that ?
    Thanks in advance.

    -> Store the images in the MIME Directory.
    -> Declare a simple type data type in the Java Dictionary.
    ->Give values and description in the enumeration type.
    -> Declare a value attribute of Simple type in View Controller.
    -> Add a image UI Element and bind it  with two attributes(Ctx1 and Ctx2).
    Use the code below to get the name of image and further set it :
    String vehicleType = wdThis.wdGetContext().currentContextElement().getCtx1();
    wdThis.wdGetContext().currentContextElement().setCtx2(vehicleType+ ".jpg");
    Thanx.

  • How to create Radiobutton in webdynpro abap

    Hi experts,
    I am new to webdynpro abap.I have been given 1 scnario in webdynpro abap to develope:the scnario is as follows:
      In first screen there are n no of user are present, i hv to select any user using radiobutton then that user will  able to write some text or message in second screen or view( i hv to decide where user can write text or message).similarly other user which has been selected by radiobutton will able to write text in screen or view belongs to them respectbly. Then if user click on save or delete button the text should be saved or deleted from ztable.
                                                      I think i hv to create TEXTVIEW or TEXTEDIT so that respective user can write text or message in their view or screen. Please suggest me how to prossed.How to create TEXTVIEW & TEXTEDIT & what is its use.
    Secondly please give me steps to create Radiobutton in webdynpro abap.
    Thanks In advance,
    Sanjay

    Hi,
    Refer the Standard comp : wdr_test_events . View - Radiobutton.
    SAP Online help : http://help.sap.com/saphelp_erp2005/helpdata/EN/c0/e8884118aa1709e10000000a155106/frameset.htm
    For TextView and TextEdit :
    Refer this  : http://help.sap.com/saphelp_erp2005/helpdata/EN/6a/a6884121a41c09e10000000a155106/frameset.htm.
    This will give a clear idea with diagram about both these UI element.
    Edited by: Saurav Mago on Aug 21, 2009 8:35 AM

Maybe you are looking for

  • How to select more than one slide on Keynote?

    Please, someone knows how to select more than one slide on keynote for IPad?

  • How do I get data to the from in a form based on a stored procedure

    I would like to create a form based on a stored procedure. I have bound LOV's that lookup the ID of the data that is to be displayed on the form. Then I have a button that reads the database and populates the fields on the form. This is our current U

  • Need help On this Report

    I'm asked to develop a report that should display output based on either dept wise or supplier wise Select Im.Item ItemID,Gp.Division Division, Deps.Group_No Group_No,Is1.Supplier Supplier ,soh.stock_on_hand stock_on_hand,im.dept,soh.loc From Item_Ma

  • I need a Solution Manager Key, please

    Hello, I'm running an HSC and need a solution manager key. Can anyone generate a key for me, please? Hostname = FUJISAPD System number = 01 Instance = R3Q Thanks in advance. Best Regards, André Koji Honma Support Analyst

  • Oracle databse 10g express edition 64 bits for oracle linux 64bits

    Can I find somewere where i do downlod of oracle database 10g XE 64bits for oracle linux 64bits Please help me. I realy need this database ! thank's Dênio Edited by: 968495 on 30/10/2012 10:17