File Upload Help Needed - Very Urgent

Dear All
I am making a application in Webdynpro for uploading an excel file to the server. Can someone give me a demo application so that I can run it and see whether my server is configured or not. Also I have made the application right now and have coded the need full. But when I select a file and say submit it shows me a page not found error. Currently I am working round the clock on my project and am stuck up here. Its very urgent can any body help please with an example or a demo application.
Regards Gaurav

Hi,
  Check whether in server, MultipartBodyParameterName property is set to "com.sap.servlet.multipart.body" . You can check this by going to Visual Admin -> Cluster tab -> Services -> web container -> Properties sheet.
Do assign points if i answered your question.
Regards
Vasu

Similar Messages

  • Help needed very urgent

    I have problem in downloading a file through a servlet. Let me put my points clearly.
    When a client requests my servlet using setcontenttype, setheader methods I prompt for the 'save' option.
    The client can choose the file and save in his local directory.
    The problem now is, if he cancels in between or at the initial stage itself an exception saying 'connection reset by peer' should be thrown at the server side.
    When I execute the servlet in javawebserver2.0/weblogic 5.0, the exception is thrown.
    Whereas when I use the same servlet in weblogic6.0sp1win no exception is thrown.
    I want the exception to be thrown even in weblogic6.0sp1win.
    How to overcome this problem. Please help me out at the earliest.
    Please see the code below.
    I am eagerly awaiting for your feedback. I have posted this query several times in java and jguru forum but did not get any reply till now.
    Since the problem is very serious please help me out as soon as possible. thanks
    luv,
    venkat.
    //code
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.security.*;
    public class TestServ extends HttpServlet //implements javax.jms.Connection
    Exception exception;
    public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException, UnavailableException
         int bytesRead=0;
         int count=0;
         byte[] buff=new byte[1];
    OutputStream out=res.getOutputStream ();
    // Set the output data's mime type
    res.setContentType( "application/pdf");//application/pdf" ); // MIME type for pdf doc
    // create an input stream from fileURL
    String fileURL ="http://localhost:7001/soap.pdf";
    // Content-disposition header - don't open in browser and
    // set the "Save As..." filename.
    // *There is reportedly a bug in IE4.0 which ignores this...
    // PROXY_HOST and PROXY_PORT should be your proxy host and port
    // that will let you go through the firewall without authentication.
    // Otherwise set the system properties and use URLConnection.getInputStream().
    BufferedInputStream bis = null;
    BufferedOutputStream bos = null;
    boolean download=false;
         res.setHeader("Content-disposition", "attachment; filename="+"xml.pdf" );
    try
              URL url=new URL(fileURL);
         bis = new BufferedInputStream(url.openStream());
         bos = new BufferedOutputStream(out);
    while(-1 != (bytesRead = bis.read(buff, 0, buff.length)))
              try
                   bos.write(bytesRead);
                   bos.flush();
                   }//end of try for while loop
                   catch(SocketException e)
                        setError(e);
                        break;
                   catch(Exception e)
                        System.out.println("Exception in while of TestServlet is " +e.getMessage());
                        if(e != null)
                             System.out.println("File not downloaded properly");
                             setError(e);
                             break;
                        }//if ends
                   }//end of catch for while loop
    }//while ends
              Exception eError=getError();
              if(eError!=null)
                   System.out.println("\n\n\n\nFile Not DownLoaded properly\n\n\n\n");
              else if(bytesRead == -1)
              System.out.println("\n\n\n\ndownload successful\n\n\n\n");
              else
              System.out.println("\n\n\n\ndownload not successful\n\n\n\n");
    catch(MalformedURLException e)
    System.out.println ( "Exception inside TestServlet is " +e.getMessage());
    catch(IOException e)
    System.out.println ( "IOException inside TestServlet is " +e.getMessage());
         finally {
              try
    if (bis != null)
    bis.close();
    if (bos != null)
    bos.close();
              catch(Exception e)
                   System.out.println("here ="+e);
    }//doPost ends
         public void setError(Exception e)
              exception=e;
              System.out.println("\n\n\nException occurred is "+e+"\n\n\n");
         public Exception getError()
                   return exception;
    }//class ends

    My idea is:
    When user cancel the operation, browser send a message back but webserver/weblogic just ingnores it.
    You check BufferOutputStream class or any other class that it extends to see if flush() method does really flushed, if not then it means that the operation has been cancelled.

  • J2me multipart file upload-  Help Needed

    package com.mpbx;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    public class PostFile extends MIDlet implements Runnable, CommandListener{
        private final String FILE = "/image.jpg";
        private final String URL = "http://localhost/post.php"; // change this to a valit page.
        private final String CrLf = "\r\n";
        private Form form = null;
        private Gauge gauge = null;
        private Command exitCommand;
        private Command uploadCommand;
        public PostFile(){
            form = new Form("Upload File");
            gauge = new Gauge("Progress:", true, 100, 0);
            form.append(gauge);
            exitCommand = new Command("Exit", Command.EXIT, 0);
            uploadCommand = new Command("Upload", Command.SCREEN, 0);
            form.addCommand(exitCommand);
            form.addCommand(uploadCommand);
            form.setCommandListener(this);
        public void startApp() {
            Display.getDisplay(this).setCurrent(form);
        public void pauseApp() {
        public void destroyApp(boolean unconditional) {
        private void progress(int total, int current){
            int percent = (int) (100 * ((float)current/(float)total));
            gauge.setValue(percent);
        public void run() {
            httpConn();
        private void httpConn(){
            HttpConnection conn = null;
            OutputStream os = null;
            InputStream is = null;
            try{
                System.out.println("url:" + URL);
                conn = (HttpConnection)Connector.open(URL);
                conn.setRequestMethod(HttpConnection.POST);
                String postData = "";
                InputStream imgIs = getClass().getResourceAsStream(FILE);
            byte []imgData = new byte[imgIs.available()];
               imgIs.read(imgData);
                String message1 = "";
                message1 += "-----------------------------4664151417711" + CrLf;
                message1 += "Content-Disposition: form-data; name=\"uploadedfile\"; filename=\"" + FILE + "\"" + CrLf;
                message1 += "Content-Type: image/jpeg" + CrLf;
                message1 += CrLf;
                // the image is sent between the messages ni the multipart message.
                String message2 = "";
                message2 += CrLf + "-----------------------------4664151417711--" + CrLf;              
                conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=---------------------------4664151417711");
                // might not need to specify the content-length when sending chunked data.
                // conn.setRequestProperty("Content-Length", String.valueOf((message1.length() + message2.length() + imgData.length)));
                System.out.println("open os");
                os = conn.openOutputStream();
                System.out.println(message1);
                os.write(message1.getBytes());
                // SEND THE IMAGE
                int index = 0;
                int size = 1024;
                do{
                    System.out.println("write:" + index);
                    if((index+size)>imgData.length){
                        size = imgData.length - index;
                    os.write(imgData, index, size);
                    index+=size;
                    progress(imgData.length, index); // update the progress bar.
                }while(index<imgData.length);
                System.out.println("written:" + index);           
                System.out.println(message2);
                os.write(message2.getBytes());
                os.flush();
                System.out.println("open is");
                is = conn.openInputStream();
                char buff = 512;
                int len;
                byte []data = new byte[buff];
                do{
                    System.out.println("READ");
                    len = is.read(data);
                    if(len > 0){
                        System.out.println(new String(data, 0, len));
                }while(len>0);
                System.out.println("DONE");
            }catch(Exception e){
                e.printStackTrace();
            }finally{
                System.out.println("Close connection");
                try{
                    os.close();
                }catch(Exception e){}
                try{
                    is.close();
                }catch(Exception e){}
                try{
                    conn.close();           
                }catch(Exception e){}
        public void commandAction(javax.microedition.lcdui.Command command, javax.microedition.lcdui.Displayable displayable) {
            if(command == exitCommand){
                this.notifyDestroyed();
            }else if(command == uploadCommand){
                new Thread(this).start();
    }Running this yields the error below...Can someone suggest me. whats the problem.
    url:http://localhost/post.php
    java.lang.NullPointerException
            at com.mpbx.PostFile.httpConn(PostFile.java:85)
            at com.mpbx.PostFile.run(PostFile.java:68)
    Close connection

    I also faced the same problem. To make this code work you will have to include the image.jpg in the jar. To do that, copy the image file in the src directory inside your project folder (if you are using netbeans) and then build the project.
    Remember, the web server should be running in background.

  • Guyz!!! Help Needed Very Urgent.

    I am not able to upload my cap file into jcop31 card using omni key reader,wat should i do?
    What can be the problem.Please analyse.
    /term "winscard:4|OMNIKEY CardMan 5x21 0"--Opening terminal
    /card -a a000000003000000 -c com.ibm.jc.CardManagerresetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B 66 00 FF 4A 43 4F 50 33 30 ;f..JCOP30
    ATR: T=0, N=-1, Hist="JCOP30"
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00 ..............
    (96000 usec)
    <= 6F 19 84 08 A0 00 00 00 03 00 00 00 A5 0D 9F 6E o..............n
    06 40 51 30 85 30 1A 9F 65 01 FF 90 00 [email protected]....
    Status: No Error
    cm> set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm> init-update 255
    => 80 50 00 00 08 F0 54 16 78 0C 04 84 90 00 .P....T.x.....
    (127698 usec)
    <= 00 00 61 12 00 70 38 90 95 59 FF 01 E8 34 68 A8 ..a..p8..Y...4h.
    43 E9 74 6A 69 FC AA BF EA 0A 2C AC 90 00 C.tji.....,...
    Status: No Error
    cm> ext-auth plain
    => 84 82 00 00 10 C9 DE 7E 5D 82 10 1F 49 43 4D A5 .......~]...ICM.
    E8 AD 76 46 A1 ..vF.
    (71397 usec)
    <= 90 00 ..
    Status: No Error
    cm> delete 010203040502
    => 80 E4 00 00 08 4F 06 01 02 03 04 05 02 00 .....O........
    (70050 usec)
    <= 6A 80 j.
    Status: Wrong data
    jcshell: Error code: 6a80 (Wrong data)
    jcshell: Wrong response APDU: 6A80
    Ignoring expected error
    cm> delete 0102030405
    => 80 E4 00 00 07 4F 05 01 02 03 04 05 00 .....O.......
    (67988 usec)
    <= 6A 80 j.
    Status: Wrong data
    jcshell: Error code: 6a80 (Wrong data)
    jcshell: Wrong response APDU: 6A80
    Ignoring expected error
    cm> upload -b 250 "D:\JAVA\ECLIPSEWTP322\workspace\handson_simple\bin\handson_simple\javacard\handson_simple.cap"
    => 80 E6 02 00 12 05 01 02 03 04 05 08 A0 00 00 00 ................
    03 00 00 00 00 00 00 00 ........
    (103546 usec)
    <= 00 90 00 ...
    Status: No Error
    => 80 E8 80 00 F0 C4 81 ED 01 00 1E DE CA FF ED 02 ................
    02 04 00 01 05 01 02 03 04 05 0E 68 61 6E 64 73 ...........hands
    6F 6E 5F 73 69 6D 70 6C 65 02 00 21 00 1E 00 21 on_simple..!...!
    00 0A 00 0B 00 1E 00 0E 00 3D 00 0A 00 0B 00 00 .........=......
    00 4D 01 CA 00 00 00 00 00 00 01 01 00 04 00 0B .M..............
    01 02 01 07 A0 00 00 00 62 01 01 03 00 0A 01 06 ........b.......
    01 02 03 04 05 02 00 08 06 00 0E 00 00 00 80 03 ................
    00 FF 00 07 01 00 00 00 1C 07 00 3D 00 01 10 18 ...........=....
    8C 00 05 7A 05 30 8F 00 06 3D 8C 00 02 18 1D 04 ...z.0...=......
    41 18 1D 25 8B 00 04 7A 02 21 18 8B 00 03 60 03 A..%...z.!....`.
    7A 19 8B 00 00 2D 1A 04 25 73 00 09 00 00 00 00 z....-..%s......
    00 0F 11 6D 00 8D 00 01 7A 08 00 0A 00 00 00 00 ...m....z.......
    00 00 00 00 00 00 05 00 1E 00 07 03 80 0A 01 06 ................
    80 07 01 06 00 00 01 03 80 03 03 03 80 03 02 06 ................
    80 03 00 01 00 02 00 09 00 0B 00 00 00 07 05 06 ................
    04 0A 07 07 13 00 ......
    (278665 usec)
    <= 6A 80 j.
    Status: Wrong data
    jcshell: Error code: 6a80 (Wrong data)
    jcshell: Wrong response APDU: 6A80
    Unexpected error; aborting execution

    cm>  /term "winscard:4|SCM Microsystems Inc. SCR33x USB Smart Card Reader 0"
    --Opening terminal
    /card -a a000000003000000 -c com.ibm.jc.CardManagerresetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B E6 00 FF 81 31 FE 45 4A 43 4F 50 33 30 07       ;....1.EJCOP30.
    ATR: T=1, N=-1, IFSC=254, BWI=4/CWI=5, Hist="JCOP30"
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00          ..............
    (81900 usec)
    <= 6F 19 84 08 A0 00 00 00 03 00 00 00 A5 0D 9F 6E    o..............n
        06 40 51 22 83 30 13 9F 65 01 FF 90 00             .@Q".0..e....
    Status: No Error
    cm>  set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm>  init-update 255
    => 80 50 00 00 08 0F F5 A8 43 45 FB 5F 81 00          .P......CE._..
    (86324 usec)
    <= 00 00 52 15 01 07 15 90 77 50 FF 01 82 F7 42 24    ..R.....wP....B$
        95 18 B7 31 C6 47 6E 9D 94 5F D9 B1 90 00          ...1.Gn.._....
    Status: No Error
    cm>  ext-auth plain
    => 84 82 00 00 10 EF 3C A2 00 C3 8A E0 AB 29 7C EA    ......<......)|.
        7B 28 95 D6 0A                                     {(...
    (56216 usec)
    <= 90 00                                              ..
    Status: No Error
    cm>  delete 010203040502
    => 80 E4 00 00 08 4F 06 01 02 03 04 05 02 00          .....O........
    (325622 usec)
    <= 00 90 00                                           ...
    Status: No Error
    cm>  delete 0102030405
    => 80 E4 00 00 07 4F 05 01 02 03 04 05 00             .....O.......
    (264622 usec)
    <= 00 90 00                                           ...
    Status: No Error
    cm>  upload -b 250 "C:\Documents and Settings\Administrator\workspace\training\bin\training\javacard\training.cap"
    => 80 E6 02 00 12 05 01 02 03 04 05 08 A0 00 00 00    ................
        03 00 00 00 00 00 00 00                            ........
    (60562 usec)
    <= 00 90 00                                           ...
    Status: No Error
    => 80 E8 80 00 DD C4 81 DA 01 00 0F DE CA FF ED 01    ................
        02 04 00 01 05 01 02 03 04 05 02 00 1F 00 0F 00    ................
        1F 00 0A 00 0B 00 1E 00 0C 00 3D 00 0A 00 0B 00    ..........=.....
        00 00 4D 00 00 00 00 00 00 01 01 00 04 00 0B 01    ..M.............
        00 01 07 A0 00 00 00 62 01 01 03 00 0A 01 06 01    .......b........
        02 03 04 05 02 00 08 06 00 0C 00 80 03 00 FF 00    ................
        07 01 00 00 00 1C 07 00 3D 00 01 10 18 8C 00 02    ........=.......
        7A 05 30 8F 00 06 3D 8C 00 04 18 1D 04 41 18 1D    z.0...=......A..
        25 8B 00 03 7A 02 21 18 8B 00 01 60 03 7A 19 8B    %...z.!....`.z..
        00 00 2D 1A 04 25 73 00 09 00 00 00 00 00 0F 11    ..-..%s.........
        6D 00 8D 00 05 7A 08 00 0A 00 00 00 00 00 00 00    m....z..........
        00 00 00 05 00 1E 00 07 03 80 0A 01 03 80 03 03    ................
        06 80 03 00 03 80 03 02 06 00 00 01 06 80 07 01    ................
        01 00 00 00 09 00 0B 00 00 00 07 05 06 04 0A 07    ................
        07 13 00                                           ...
    (547331 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Load report:
      221 bytes loaded in 0.5 seconds
      effective code size on card:
          + package AID       5
          + applet AIDs       13
          + classes           15
          + methods           64
          + statics           0
          + exports           0
            overall           97  bytes
    cm>  install -i 010203040502  -q C9#() 0102030405 010203040502
    => 80 E6 0C 00 1A 05 01 02 03 04 05 06 01 02 03 04    ................
        05 02 06 01 02 03 04 05 02 01 00 02 C9 00 00 00    ................
    (127417 usec)
    <= 00 90 00                                           ...
    Status: No Error
    cm>  card-info
    => 80 F2 80 00 02 4F 00 00                            .....O..
    (41639 usec)
    <= 08 A0 00 00 00 03 00 00 00 07 9E 90 00             .............
    Status: No Error
    => 80 F2 40 00 02 4F 00 00                            [email protected]..
    (51116 usec)
    <= 06 A0 00 00 00 00 02 07 00 06 01 02 03 04 05 02    ................
        07 00 90 00                                        ....
    Status: No Error
    => 80 F2 10 00 02 4F 00 00                            .....O..
    (27798 usec)
    <= 6A 86                                              j.
    Status: Incorrect parameters (P1,P2)
    => 80 F2 20 00 02 4F 00 00                            .. ..O..
    (116801 usec)
    <= 07 A0 00 00 00 62 00 01 01 00 07 A0 00 00 00 62    .....b.........b
        01 01 01 00 07 A0 00 00 00 62 01 02 01 00 07 A0    .........b......
        00 00 00 62 02 01 01 00 07 A0 00 00 00 03 00 00    ...b............
        01 00 06 A0 00 00 00 00 01 01 00 05 01 02 03 04    ................
        05 01 00 90 00                                     .....
    Status: No Error
    Card Manager AID   :  A000000003000000
    Card Manager state :  INITIALIZED
        Application:  SELECTABLE (--------) A00000000002   
        Application:  SELECTABLE (--------) 010203040502   
        Load File  :      LOADED (--------) A0000000620001   (java.lang)
        Load File  :      LOADED (--------) A0000000620101   (javacard.framework)
        Load File  :      LOADED (--------) A0000000620102   (javacard.security)
        Load File  :      LOADED (--------) A0000000620201   (javacardx.crypto)
        Load File  :      LOADED (--------) A0000000030000   (visa.openplatform)
        Load File  :      LOADED (--------) A00000000001   
        Load File  :      LOADED (--------) 0102030405     
    {code}
    I use your code, and upload OK.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • PARSING HTML ELEMNETS IN XML FILE?,Help please very urgent

    I am getting the input in this form
    <ul>
    <li>Strategies</li>
    <li>Planning</li>
    <li>Value</li>
    <li>Total Investment</li>
    </ul>
    I want to convert it into below format so that ContentHandler parse the HTML tages.The HTML elements are dynamic,
    contentHandler.startElement("", "ul", "ul", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.characters(value.toCharArray(), 0, value.length());
    contentHandler.startElement("", "li", "li", attrs);
    contentHandler.endElement("", "ul", "ul");
    Is their any library through which we can convert HTML tags into ContentHandler elements.
    Thanks in Advance
    Thanks
    Lakhi

    Actually i am parsing XML file,but i have HTML elements inside XML elements:
    <section id='2'><header><line>Agenda( Slide2 )</line></header>
    <line>
    <h3>Agenda</h3>
    <ol>
    <li>Overview of ABC Company inc.</li>
    <li>Defining and Measuring Employee Engagement</li>
    <li>Foresight's Survey Methodology</li>
    <li>Online Tools</li>
    <li>Standard and Custom Reporting Capabilities</li>
    <li>Action Planning and Best Practices</li>
    </ol></line></section>
    And i am using Contenthandler interface to parse,
              attrs.addCDATAAttribute("id",""+i);
                   contentHandler.startElement("", "section", "section", attrs);
                   attrs.clear();
                   contentHandler.startElement("", "header", "header", attrs);
                   contentHandler.startElement("", "line", "line", attrs);
                   contentHandler.characters(key.toCharArray(), 0, key.length());
                   contentHandler.endElement("", "line", "line");
                   contentHandler.endElement("", "header", "header");
                   contentHandler.startElement("", "line", "line", attrs);
    /*HERE I need to Generate java instruction for HTML elements as i mailed before.for elements like <li>Overview of ABC Company inc.</li>
    <li>Defining and Measuring Employee Engagement</li>...................</ol>
                   contentHandler.characters(value.toCharArray(), 0, value.length());
                   contentHandler.endElement("", "line", "line");
                   contentHandler.endElement("", "section", "section");

  • Dashboards help needed very urgently

    hi experts
    i have a page which displays like dril down table which has information of customers, beside the under that table i hve round diagrams which has business orinet things around that lot of object are there.
    for example it looks
    sun in the center and all the planets around it. if we click the particular planet it goes to the information page.
    i need how to keep the driill down box for the customers and how to do for the remaining like sun and planets...
    or the better way how we can keep
    Thank you

    My idea is:
    When user cancel the operation, browser send a message back but webserver/weblogic just ingnores it.
    You check BufferOutputStream class or any other class that it extends to see if flush() method does really flushed, if not then it means that the operation has been cancelled.

  • Realignment table cannot be activated - help needed - Very urgent

    Hi All,
         Iam new to SCM and in the process of learning it. Iam trying to work with the realignment transaction /sapapo/rlgcopy. When i try to create a table , after characteristics selection it gives error "Realignment table cannot be activated". How do i proceed from there. Please help.
    It would be helpful if somebody could send a link that explains realignment steps in detail. I tried help.sap.com , but could not understand clearly. Kindly help

    Hi...
    As mentioned earliar reply...
    Hope you are having Authorization of realianment transaction...
    Transaction
    /SAPAPO/RLGCOPY - Data Realignment
    Check that you have selected Realianment button
    entered the planning object structure name
    You have created table/change table
    selected char to be ralianed
    and then maintained entries

  • Lenovo s510p touch top cover broken, top cover needed very urgently

    i bought my lenovo ideapad s510p touch from usa in dec 2013, i only hav upgraded warranty.,  
    recently my laptop's TOP COVER  has broken i need the part very urgently please any one can help meee please  
    LENOVO IDEAPAD S510P TOUCH TOP COVER ('a' COVER)
    Link to picture/image
    Link to picture/image
    Link to picture/image
    Link to picture/image
    NEEDED VERY URGENTLY CAN ANYONE HELP ME PARTS ALSO NOT AVALIABLE SAID BY SERVICE CENTERS
    Mod comment: Over sized pictures converted to links. Please see About-Posting-Pictures-In-The-Forums

    Some posts have been removed.
    Please do not post private information in these forums.
    Andy  
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество

  • File Upload problem: JSF, IBM WPS and Portlet - Please HELP Vey Very Urgent

    I want to upload a file from the front end using JSF and Portlets deployed on IBM WebSphere Portal.
    I have used Apache's commons file upload functionality as the file upload provided in JSF doesnot work with portlets and the action event is not invoked If I keep enctype="multipart/form-data". So I included 3 forms in my Faces JSP file.
    1) h:form = For displyign error message on screen
    2) html:form = Include the enctype="multipart/form-data" and the input type file for uploading. And a submit button
    3) h:form: Here I have a command link which is remotely excuted on click of sumit button in my html form. This is to invoke the action event in the pagecode to get the bean value from the context.
    Now in the my doView method in the portlet, isMultipartContent(httpservletrequest) always returns null as the content type is text/html and not multipart. Onclick of the submit button in the the html form I am calling a javascript function which sets the __LINK_TARGET__ to the command link in the 3rd h:form which will call the page code.
    The problem here is action is invoked only when I return false from the above javascript else it will trigger for the first time and from second time onwards it will not invoke the action event in the pagecode method. Whent the javascript function returns false, the content type is always text/html. However if I return "true" from the javascript the content type is multipart/form-data, but the action is not triggered for the second time. So basically when the javascript functions returns true, for the first click everything works perfectly. When it returns false, the content type is text/html, but the action is invoked in the page code every time.
    Returning always true would solve my problem with the content type, but the action with the command link will not get invoked always as its some type of problem with h:commanLink :(.
    I guess I gave too much info. Heres my code stepby step.
    Can somebody please tell me , how I should also invoke the action in the page code and get the content type as "multipart/form-data" at the same time.
    1:
    ======================= Faces JSP File: BPSMacro.jsp ====================
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <meta name="GENERATOR" content="IBM Software Development Platform">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <%@taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@taglib uri="/WEB-INF/tld/j4j.tld" prefix="j4j"%>
    <%@taglib uri="/WEB-INF/tld/core.tld" prefix="core"%>
    <%@page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1" session="false"%>
    <portlet:defineObjects />
    <link rel="stylesheet" type="text/css"
         href='<%= renderResponse.encodeURL(renderRequest.getContextPath() + "/theme/stylesheet.css") %>'
         title="Style">
    <script type="text/javascript">
    function formSubmit() {
         var formName2 = document.getElementById("proxy_form_main_").title;
         var formName1 = document.getElementById("BPSMacroFormId").title;
         document.getElementById("__LINK_TARGET__").value = document.getElementById("proxy_HD_COMMAND_").title;
         document.getElementById(formName2).submit();
         return false;
    </script>
    <f:view>
         <hx:scriptCollector id="bpsMacroScriptCollector">
              <f:loadBundle var="bps" basename="bordereauprocessingsystem" />
              <table bgcolor="#FFF9C3">
                   <tr>
                        <td><h:form id="BPSMacroFormMain" styleClass="form">
                             <table class="tablemiddle" cellspacing="0" cellpadding="0">
                                  <tr>
                                       <td><h:messages layout="table" styleClass="errormessage"
                                                 id="ValidationErrorMsg" /> </td>
                                  </tr>
                             </table>
                             <j4j:idProxy id="proxy_form_main_0_" />
                        </h:form></td>
                   </tr>
                   <tr>
                        <td>
                        <form id="BPSMacroFormId" enctype="multipart/form-data">
                        <table bgcolor="#FFF9C3">
                             <tr>
                                  <td height="36" width="324">Worksheet <input type="file"
                                       name="upfile" /></td>
                             </tr>
                                  <tr>
                                       <td align="center" width="324"><input TYPE="submit"
                                       onclick="return formSubmit();" value="Upload">
                                  </td>
                             </tr>
                        </table>
                        </form>
                        </td>
                   </tr>
                   <tr>
                        <td>
                        <h:form id="BPSMacroFormMain2" styleClass="form">
                             <table cellspacing="2" cellpadding="2" class="tablemiddle">
                                  <tbody>
                                       <tr>
                                            <td colspan="2" align="center"><h:commandLink
                                                 styleClass="commandLink" id="lnkuserdelete"
                                                 action="#{pc_BPSMacro.doIdUpload1Action}">
                                                 <hx:graphicImageEx
                                                      styleClass="graphicImageEx" id="imgBtnCreateUser"
                                                      value="/theme/images/btnUpload.gif" style="border:0;cursor:pointer"></hx:graphicImageEx>
                                                 <j4j:idProxy id="proxy_HD_COMMAND_" />
                                            </h:commandLink></td>
                                            <h:inputHidden id="dtSize"
                                                 value="#{pc_BPSMacro.fileDetailsList.clicked}">
                                                 <j4j:idProxy id="proxy_clicked_" />
                                            </h:inputHidden>
                                       </tr>
                                  </tbody>
                             </table>
                             <j4j:idProxy id="proxy_form_main_" />
                        </h:form>
                   </td>
                   </tr>
              </table>
         </hx:scriptCollector>
    </f:view>
    ================== END: FACES JSP FILE: BPSMacro.jsp ========================
    2:
    =================== Action event in the Page Code: BPSMacro.java ============
    public String doIdUpload1Action() {
              System.out.println("PageCode");
              FacesContext context = FacesContext.getCurrentInstance();
              BPSMacroDetailsDataBean fileDetails = (BPSMacroDetailsDataBean)context.getApplication().createValueBinding("#{fileDetails}").getValue(context);
              BPSMacroListDataBean fileDetailsList = (BPSMacroListDataBean)context.getApplication().createValueBinding("#{fileDetailsList}").getValue(context);
              PortletSession sess = (PortletSession)context.getExternalContext().getSession(false);
              sess.setAttribute("BPS_MACRO_CONTEXT", context, PortletSession.APPLICATION_SCOPE);
              sess.setAttribute("BPS_MACRO_FILE_DETAILS", fileDetails, PortletSession.APPLICATION_SCOPE);
              sess.setAttribute("BPS_MACRO_FILE_LIST", fileDetailsList, PortletSession.APPLICATION_SCOPE);
              HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
              boolean isMultipart = ServletFileUpload.isMultipartContent(request);
              request.getContentType();
              return "gotoBPSMacro";
    ============== END Of Page Code Action event ==============================
    3:
    ============== doView() Portlet method ================================
    public void doView(RenderRequest arg0, RenderResponse arg1)
         throws PortletException, IOException {
              String METHOD_NAME = "doView(RenderRequest arg0, RenderResponse arg1)";
              Logger.debug(this.getClass(), METHOD_NAME, "Entering BPSMacroPortlet");
              FacesContext context = FacesContext.getCurrentInstance();      
              PortletSession sess1 = arg0.getPortletSession(true);
              BPSMacroDetailsDataBean fileDetails = new BPSMacroDetailsDataBean();
              BPSMacroListDataBean fileDetailsList = new BPSMacroListDataBean();
              context = (FacesContext)sess1.getAttribute("BPS_MACRO_CONTEXT", PortletSession.APPLICATION_SCOPE);
              if(context != null){
                   fileDetails = (BPSMacroDetailsDataBean)sess1.getAttribute("BPS_MACRO_FILE_DETAILS", PortletSession.APPLICATION_SCOPE);
                   fileDetailsList = (BPSMacroListDataBean)sess1.getAttribute("BPS_MACRO_FILE_LIST", PortletSession.APPLICATION_SCOPE);
              sess1.removeAttribute("BPS_MACRO_CONTEXT", PortletSession.APPLICATION_SCOPE);
              sess1.removeAttribute("BPS_MACRO_FILE_DETAILS", PortletSession.APPLICATION_SCOPE);
              sess1.removeAttribute("BPS_MACRO_FILE_LIST", PortletSession.APPLICATION_SCOPE);
              HttpServletRequest servletRequest = (HttpServletRequest)arg0;
              PortletRequest pReq = (PortletRequest)arg0;
              HttpServletResponse servletResponse= (HttpServletResponse)arg1;
              System.out.println("\n\n Content Type" + servletRequest.getContentType());
              try{
                   if(context != null){
              boolean isFileMultipart = ServletFileUpload.isMultipartContent(servletRequest);
              System.out.println("\nFILE TO BE UPLOADED IS MULTIPART ? " + isFileMultipart);
              if(isFileMultipart){
                   FileItemFactory factory = new DiskFileItemFactory();
                   ServletFileUpload upload = new ServletFileUpload(factory);
                   List items = upload.parseRequest(servletRequest);
                   Iterator iterator = items.iterator();
                   while (iterator.hasNext()) {
                        FileItem item = (FileItem) iterator.next();
                        InputStream iStream = item.getInputStream();
                        ByteArrayOutputStream ByteArrayOS = new ByteArrayOutputStream();
                        int sizeofFile =(int) item.getSize();
                        byte buffer[] = new byte[sizeofFile];
                        int bytesRead = 0;
                        while( (bytesRead = iStream.read(buffer, 0, sizeofFile)) != -1 )
                             ByteArrayOS.write( buffer, 0, bytesRead );
                        String data = new String( ByteArrayOS.toByteArray() );
                        int k = 0;
                        //Check if the file is Refund or Premium
                        int dynamicArraySize = 0;// = st2.countTokens() * 9;
                        dynamicArraySize = st2.countTokens() * 9;
                        if (!item.isFormField() ){
                             File cfile=new File(item.getName());
                             String fileName = "";
                             String separator = "\\";
                             int pos = item.getName().lastIndexOf(separator);
                             int pos2 = item.getName().lastIndexOf(".");
                             if(pos2>-1){
                                  fileName =item.getName().substring(pos+1, pos2);
                             }else{
                                  fileName =item.getName().substring(pos+1);
                             File fileToBeUploaded=new File("C:\\Sal\\BPS MACRO\\FileTransfer\\Desti", fileName);
                             item.write(fileToBeUploaded);
                             validate.displaySuccessMessage(context);
              }catch(Exception e){System.out.println(e);
              Logger.debug(this.getClass(), METHOD_NAME, "Leaving BPSMacroPortlet");
              super.doView(arg0, arg1);
    ==== END: doView method in the portle class. ================================
    Thanks.

    one more question. Is there a way where I can submit two forms ?
    Thats is submit 2nd form only when the first form is submitted.
    I tried this it works.
    function formSubmit(){
    document.form1.submit();
    alert();
    document.form2.submit();
    But If I dont put an alert(basically it disables the parent page) in between, only the second form is submitted.
    If I put a delay of say 3 seconds in between then it will throw a SOCKET CLOSED error in the code triggered due to first form submit.
    Thus disabling the paresnt page for a few seconds is reolving my problem.
    Any ideas ?
    Well Basically when the Alert pop's up the parent page "STALLS" and thus the form2 does not submit till I click on OK, Is there a way I can stall the browser/Parent JSP page using JAVA SCRIPT ??
    Edited by: hector on Oct 9, 2007 11:09 AM
    Edited by: hector on Oct 9, 2007 2:12 PM

  • URGENT! File Upload Utility or a Custom UI for File Upload is needed!

    Hi all,
    I'm trying to find or develop a file upload utility or custom user interface rather than editing and adding file type item to a page. There is a free portlet for file upload in Knowledge Exchange resources, but it is for 3.0.9 release. I'm using portal 9.0.2.
    I could not any sample about the new release. Also API such as wwsbr_api that is used to add item to content areas is out dated.
    I create a page with a region for "items". When "edit" page and try to add an "file" type item the generated url is sth like this;
    "http://host:7779/pls/portal/PORTAL.wwv_additem.selectitemtype****"
    After selecting item type as a simple file autogenerated url is sth. like ;
    "http://host:7779/pls/portal/PORTAL.wwv_add_wizard.edititem"
    I made search about these API but could not find anything (in PDK PL/SQL API help, too).
    I need this very urgent for a proof of consept study for a customer.
    Thanks in advance,
    Kind Regards,
    Yeliz Ucer
    Oracle Sales Consultant

    Answered your post on the General forum.
    Regards,
    Jerry
    PortalPM

  • Upload file in clustered environment- Very Urgent

    Hi,
    My requirement is to upload a file onto the WebServer and also list out the file names on the front end and provide a funcionality to delete them from the server.
    Environment Details:
    -Product: WebSphere Portal
    -Type - Clustered Enviroment with 2 nodes
    -Framework: JSF
    The problem I am facing here is:
    1) I login to the application using a common URL: Say abc.com/wps/portal
    2) I dont know which node I am logged into, it can be either Primary(X1) or Secondary(X2).
    3) I click on the browse button and select a file and click on the Upload button. The file is uploaded successfully on say primary node X1.
    4) I can at that time read the name of the file and display it on screen and also select and delete it. But if I log off and login again and say I am now redirected to secondary node, I am not able to read the name of the file I uploaded as it is stored on the primary node.
    Can some body provide me a solutions to this.
    What I can think of is , While uploading the file, I will check if I am on the primary node or secondary node and Upload the file only on one node rather than uploading them on both. Say uploading only on primary node X1, Now if I am logged into primary I can just mention the directory name and upload it.
    But I f am on the secondary node I need to upload the file on the primary node using URL connection.
    Can some body tell me the feasibility of this approach ?? Also how do I upload a file on a remote machine(Logged into the secondary but putting the file onto the primary node.) ???
    Please help me this very very urgent.
    Thanks.

    Hi!
    I would simply use a network share which is accessible from both nodes as storage. This way you don't have to care to which server the file is uploaded too, because both share the same filesystem.
    If you are on windows, simply share a folder and access it from both nodes. In Linux I'd suggest using samba & mount, on solaris use share & mount.
    Another approach would be to use a database as storage.
    hth Chris

  • Need very urgent help

    Hi every1,
    i am in a very bad situation as i am very new to AS3, so i
    need some help from any one who can help me out of this.
    I have created a FLV Player using FLVPlayback Component
    everything is working fine but the only problem is the rewind and
    forward button behaves very strange when i test it on web page
    residing in a webserver.
    In brief i want to say that the rewind and forward control in
    the application works alright when i play it in my local machine
    but when i take the file to a web sever and play it the controls
    behave very strange (when i click on the forward and rewind button
    it just takes me to the end of the movie and to the start of the
    movie at one shot which should not be the purpose of the rewind and
    forward button).
    So, somebody please look at my code below and i will be very
    thank full to the person who can send me the correct code.
    The code for the rewind and forward control is higlighted in
    the below code. please help... .very urgent..........
    import fl.video.*;
    var flvSou:String;
    var dynText:String;
    myflv.autoPlay = true;
    onscreen_play_btn.visible = false;
    onscreen_replay_btn.visible = false;
    if (myflv.playing) {
    onscreen_play_btn.visible = false;
    onscreen_replay_btn.visible = false;
    //myflv.source = "Call_to_action.flv";
    myflv.source = root.loaderInfo.parameters.flvSou;
    dynTxt.text = String(root.loaderInfo.parameters.dynText);
    slash_txt.text = "/";
    myflv.playPauseButton = playPause_btn;
    myflv.stopButton = stop_btn;
    myflv.muteButton = mute_btn;
    myflv.volumeBar = volume_bar;
    myflv.volume = .6;
    myflv.forwardButton = forward_btn;
    myflv.backButton = back_btn;
    myflv.seekBar = seek_bar;
    myflv.bufferingBar = buffering_bar;
    myflv.fullScreenButton = fullscreen_btn;
    //========================= Actions for Button Controls
    =========================//
    //========================= Actions for Play and Pause Button
    =========================//
    playPause_btn.pause_mc.addEventListener(MouseEvent.CLICK,
    clickHandlerPause);
    function clickHandlerPause(event:MouseEvent):void {
    //trace("clickHandler detected an event of type: " +
    event.type);
    //trace("the event occurred on: " + event.target.name);
    trace("u clicked pause button");
    onscreen_play_btn.visible = true;
    //myflv.alpha = .5; // uncomment later
    playPause_btn.play_mc.addEventListener(MouseEvent.CLICK,
    clickHandlerPlay);
    function clickHandlerPlay(event:MouseEvent):void {
    //trace("clickHandler detected an event of type: " +
    event.type);
    //trace("the event occurred on: " + event.target.name);
    trace("u clicked play button");
    onscreen_play_btn.visible = false;
    //myflv.alpha = 100; // uncomment later
    if (onscreen_replay_btn.visible==true) {
    onscreen_replay_btn.visible=false;
    //========================= Actions for Play and Pause Button
    =========================//
    //========================= Actions for FLVPlayback
    =========================//
    myflv.addEventListener(MouseEvent.CLICK,
    clickHandlerPauseFlv);
    function clickHandlerPauseFlv(event:MouseEvent):void {
    //trace("clickHandler detected an event of type: " +
    event.type);
    //trace("the event occurred on: " + event.target.name);
    trace("u clicked video component button");
    trace(myflv.totalTime);
    if (myflv.playing==true) {
    myflv.pause();
    onscreen_play_btn.visible = true;
    //myflv.alpha = .5; // uncomment later
    } else {
    myflv.play();
    onscreen_play_btn.visible = false;
    onscreen_replay_btn.visible = false;
    //myflv.alpha = 100; // uncomment later
    //========================= Actions for FLVPlayback
    =========================//
    //========================= Actions for Fullscreen Button
    =========================//
    fullscreen_btn.addEventListener(MouseEvent.CLICK,onFullScreenButtonClick);
    function onFullScreenButtonClick(event:MouseEvent):void {
    stage.displayState = StageDisplayState.FULL_SCREEN;
    //or set it to normal like: stage.displayState =
    StageDisplayState.NORMAL;
    //========================= Actions for Fullscreen Button
    =========================//
    //========================= Actions for onScreenPlay Button
    =========================//
    onscreen_play_btn.addEventListener(MouseEvent.CLICK,onScreenPlayButtonClick);
    function onScreenPlayButtonClick(event:MouseEvent):void {
    trace("working");
    if (myflv.playing==true) {
    myflv.pause();
    } else {
    myflv.play();
    //myflv.alpha = 100; // uncomment later
    onscreen_play_btn.visible = false;
    //========================= Actions for onScreenPlay Button
    =========================//
    //========================= Actions for onScreenReplay Button
    =========================//
    onscreen_replay_btn.addEventListener(MouseEvent.CLICK,onScreenReplayButtonClick);
    function onScreenReplayButtonClick(event:MouseEvent):void {
    trace("working");
    myflv.play();
    //myflv.seek(0);
    onscreen_replay_btn.visible = false;
    if (onscreen_play_btn.visible==true) {
    onscreen_play_btn.visible=false;
    //========================= Actions for onScreenReplay Button
    =========================//
    //========================= Actions for Stop Button
    =========================//
    stop_btn.addEventListener(MouseEvent.CLICK, StopButtonClick);
    function StopButtonClick(event:MouseEvent):void {
    myflv.seek(0);
    //myflv.autoRewind = true;
    //myflv.stop();
    onscreen_replay_btn.visible = true;
    //========================= Actions for Stop Button
    =========================//
    //========================= Actions for Button Controls
    =========================//
    //========================= Actions for Displaying Elapsed
    and Total Time =========================//
    myflv.addEventListener(MetadataEvent.METADATA_RECEIVED,
    cp_listener);
    function cp_listener(eventObject:MetadataEvent):void {
    //trace("Elapsed time in seconds: " + myflv.playheadTime);
    //trace("Total time is: " + eventObject.info.duration);
    var rounded:int = Math.round(eventObject.info.duration);
    var minutes:int = Math.floor(rounded/60);
    var seconds:int = rounded%60;
    flvTotalTime_txt.text = eventObject.info.duration;
    flvTotalTime_txt.text = (minutes<10 ? "0" :
    "")+minutes+":"+(seconds<10 ? "0" : "")+seconds;
    //flvElapsedTime_txt.text = String(myflv.playheadTime);
    stage.addEventListener(Event.ENTER_FRAME, updateTime);
    function updateTime(ev:Event):void {
    var rounded:int = Math.round(myflv.playheadTime);
    var minutes:int = Math.floor(rounded/60);
    var seconds:int = rounded%60;
    flvElapsedTime_txt.text = String(myflv.playheadTime);
    flvElapsedTime_txt.text = (minutes<10 ? "0" :
    "")+minutes+":"+(seconds<10 ? "0" : "")+seconds;
    //========================= Actions for Displaying Elapsed
    and Total Time =========================//
    myflv.addEventListener(Event.COMPLETE, com_listener);
    function com_listener(eventObject:Event):void {
    trace("movie complete");
    myflv.stop();
    onscreen_replay_btn.visible = true;
    back_btn.addEventListener(MouseEvent.CLICK, BackButtonClick);
    function BackButtonClick(event:MouseEvent):void {
    myflv.play();
    //myflv.autoRewind = true;
    //myflv.stop();
    onscreen_replay_btn.visible = false;
    /************************************ THE CODE FOR FORWARD
    AND REWIND CONTROL STARTS HERE *****************************/
    var id1:Number;
    forward_btn.addEventListener(MouseEvent.MOUSE_DOWN,
    ForwardButtonDown);
    function ForwardButtonDown(event:MouseEvent):void {
    //forward_btn.onPress = function() {
    //mklik_flv.pause();
    var dest1:Number = myflv.playheadTime;
    id1 = setInterval(function ():void {
    myflv.seek(dest1 += 2);
    }, 100);
    forward_btn.addEventListener(MouseEvent.MOUSE_UP,
    ForwardButtonUp);
    function ForwardButtonUp(event:MouseEvent):void {
    //forward_btn.onRelease = function() {
    //myflv.play();
    clearInterval(id1);
    // ************************ Forward Button Function
    // ************************ Rewind Button Function
    var id2:Number;
    back_btn.addEventListener(MouseEvent.MOUSE_DOWN,
    BackButtonDown);
    function BackButtonDown(event:MouseEvent):void {
    //back_btn.onPress = function() {
    //mklik_flv.pause();
    var dest2:Number = myflv.playheadTime;
    id2 = setInterval(function ():void {
    myflv.seek(dest2 -= 2);
    }, 100);
    back_btn.addEventListener(MouseEvent.MOUSE_UP, BackButtonUp);
    function BackButtonUp(event:MouseEvent) {
    //back_btn.onRelease = function() {
    //mklik_flv.play();
    clearInterval(id2);
    }

    how long is your flv (in seconds), if allowed to play without
    ff/rewind/pause?

  • How to convert PO sapscript layout to pdf - need VERY URGENT Help

    Dear All,
    Requirement: PO sapscript layout after some modifications (say, ZMEDRUCK) has to be converted to pdf. Through me9f user will be able to give ranges of PO numbers and can view the print preview for the po. After that on clicking the print button we get the printout of the pos one after another based on the user input of PO numbers.
    Our requirement is that when the user will click on the "Print Preview" of po (rather than pressing the print button) it i.e. PO sapscript layout has to get converted to pdf.
    If you have already encountered this scenario, could you please send me the source code regarding this at the earliest. If you want to email it to my personal id, please let me know so that I can give it to you. Thank you.
    It will be very beneficial for mine if you can send me some source code in this regard. (FYI. We want only “Print output” of PO sapscript. So, Print Program /SMB40/FM06P [after copying it to our ZSMB40/FM06P program] need to be modified for downloading the PO into PDF where there is no FMs like OPEN_FORM, WRITE_FORM, CLOSE_FORM. So already available source code in SAP forums can not help me.)). Kindly help me at the earliest. It’s VERY URGENT…
    Thank you.
    Thanks & Regards
    Sudipta

    Hi Chaith,
    Could you please provide me the source code regarding this at the earliest.
    We want only “Print output” of PO sapscript. So we need to modify only the Print Program SAPFM06P after copying it to ZSAPFM06P for downloading of modified PO (ZMEDRUCK) sapscript layout into PDF.
    I am already having some source code from sdn portral. I am attaching it herewith. But it's not working as some constants and variable values need to be given. We want to take download of PO into PDF from ME9F transaction itself.
    Could you please provide necessary values in the missing constants and variables and kindly resend the corrected modified Source code to me so that I can run the same code to  download the modified PO ZMEDRUCK into PDF . Need YOUR URGENT HELP...
    DATA: l_druvo LIKE t166k-druvo,
            l_nast  LIKE nast,
            aux_nast LIKE nast,
            l_from_memory,
            l_doc   TYPE meein_purchase_doc_print,
            ent_screen TYPE c,
            ent_retco TYPE i,
            toa_dara TYPE toa_dara,
            arc_params LIKE arc_params,
            aux_form LIKE tnapr-fonam.
      DATA: otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
            lt_docs      TYPE TABLE OF docs,
            pdf_bytecount TYPE i,
            nom_archivo TYPE string.
      aux_form = 'ZMEDRUCK'.
      l_from_memory = c_true.
      SELECT *
        FROM nast
        INTO aux_nast
        UP TO 1 ROWS
        WHERE kappl = c_po     " Purchase Order
        AND   objky = t_datos-ebeln
        AND   aktiv = space
        ORDER BY erdat DESCENDING eruhr DESCENDING.
      ENDSELECT.
      aux_nast-sort1 = c_swp.
      CLEAR ent_screen.
      CLEAR ent_retco.
      IF aux_nast-aende EQ space.
        l_druvo = c_1.
      ELSE.
        l_druvo = c_2.
      ENDIF.
    l_druvo = '2'.
      CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = aux_nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      CHECK ent_retco EQ 0.
      CALL FUNCTION 'ECP_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = aux_form                            
        IMPORTING
          ex_retco       = ent_retco.
      CLEAR otf.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        EXPORTING
          memory_key   = l_nast-objky  " PO Number
        TABLES
          otf          = otf
        EXCEPTIONS
          memory_empty = 1
          OTHERS       = 2.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = pdf_bytecount
        TABLES
          otf                    = otf
          doctab_archive         = lt_docs
          lines                  = pdfout
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
      CONCATENATE c_dest t_datos-ebeln c_ext INTO nom_archivo.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = pdf_bytecount
          filename     = nom_archivo
          filetype     = c_bin
        IMPORTING
          filelength   = pdf_bytecount
        TABLES
          data_tab     = pdfout.

  • How to write code for this logic, plz help me very urgent

    Hi All,
    i am new to sap-abap, i got this work and i m working on this can any body help me in writing code, plz help me, this is very very urgent.
    here  i m giving my logic, can anybody send me the code related to this logic.
    this is very urgent .
    this program o/p should be in ALV format and need to create one commond 'SAVE" on this o/t list  if  user clicks save processedon and processedby fields in ZFIBUE should be updated automatically.
    i am creating one custom table zfibue having fields: (serialno, bukrs, matnr,prdha,hkont,gsber,wrbtr,budat, credate, cretime,processed, processedon, processedby,mapped)
    fields of zfibue:
    serailno = numc
    bukrs = char
    matnr = char
    prdha = char
    hkont = char
    gsber = char
    wrbtr = char
    budat = date
    credate = date
    cretime = time
    processed= char
    processedon = date
    processedby = char
    mapped = char      are   belongs to above type data types
    and seelct-optionfields:  s_bukrs for bseg-bukrs
                                        s_hkont for bseg-hkont,
                                         s_budat for bkpf-budat,
                                         s_processed for zfibue-processed,
                                          s_processedon for zfibue-processedon,
                                          s_mapped. for zfibue-mapped
    parameters: p_chk1 as checkbox,
                      p_chk2 as checkbox.
                      p_filepath type rlgrap-filename.
    1.1 Validate the user inputs (S_BUKRS and S_HKONT) against respective check tables (T001 and SKB1). If the validation fails, provide respective error message. Eg: “Invalid input for Company Code”.
    1.2 Fetch SERIALNO, BUKRS, MATNR, PRDHA, HKONT, GSBER, WRBTR, BUDAT, CREDATE, CRETIME, PROCESSED, PROCESSEDON, PROCESSEDBY, MAPPED from table ZFIBUE into internal table GT_ZFIBUE where BUKRS IN S_BUKRS, HKONT IN S_HKONT, BUDAT IN S_BUDAT, PROCESSED IN S_PROCESSED, PROCESSEDON IN S_PROCESSEDON, and MAPPED IN S_MAPPED.
    1.3 If P_CHK2 = ‘X’, go to step 1.11. Else continue.
    1.4 If P_CHK1 = ‘X’, continue. Else go to step 1.9
    1.5 Fetch MATNR, PRDHA from MARA into GT_MARA for all entries in GT_ZFIBUE where MATNR = GT_ZFIBUE-MATNR.
    1.6 Sort and delete adjacent duplicates from GT_MARA based on MATNR.
    1.7 Loop through GT_ZFIBUE where PRDHA = blank.
              Read Table GT_MARA based on MATNR = GT_ZFIBUE-MATNR.
              IF sy-subrc = 0.
                     Move GT_MARA-PRDHA to GT_ZFIBUE-PRDHA.
                  Modify Table GT_ZFIBUE. “Update Product Hierarchy
                 Endif.
        Fetch PRDHA, GSBER from ZFIBU into GT_ZFIBU for all entries in GT_ZFIBUE where PRDHA = GT_ZFIBUE-PRDHA.
        Read Table GT_ZFIBU based on PRDHA = GT_ZFIBUE-PRDHA.
              IF sy-subrc = 0.
                     Move GT_ZFIBU-GSBER to GT_ZFIBUE-GSBER.
                  Move “X” to GT_ZFIBUE-MAPPED.      
                  Modify Table GT_ZFIBUE.
                 Endif.   
    Endloop.
    1.8 Modify database table ZFIBUE from GT_ZFIBUE.
    1.9 Fill the field catalog table GT_FIELDCAT using the details of output fields listed in section “Inputs/Outputs” (above).
       Eg:                 LWA_ FIELDCAT -SELTEXT_L = 'Serial Number’.
                              LWA_ FIELDCAT -DATATYPE = ‘NUMC’.
                              LWA_ FIELDCAT -OUTPUTLEN = 9.
                              LWA_ FIELDCAT -TABNAME = 'GT_ZFIBUE'.
                              LWA_ FIELDCAT-FIELDNAME = 'SERIALNO'.
              Append LWA_FIELDCAT to GT_FIELDCAT
    Note: a) The output field GT_ZFIBUE-PROCESSED will be editable marking INPUT = “X” in field catalog (GT_FIELDCAT).
             b) The standard ALV functionality will be used to give the user option for selecting all or blocks of entries at a time.
             c) The PF-STATUS STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN will be copied to the program and modified to include a “SAVE” button.
    1.10 Call the function module REUSE_ALV_GRID_DISPLAY passing output table GT_ZFIBUE and field catalog GT_FIELDCAT. Additional parameters like I_CALLBACK_PF_STATUS_SET (= ‘ZFIBUESTAT’) and I_CALLBACK_USER_COMMAND (=’HANDLE_USER_ACTION’) will also be passed to handle user events. Go to 2.14.
    1.11 Download the file to P_FILEPATH using function module GUI_DOWNLOAD passing GT_ZFIBUE.
    1.12 Exit Program.
    Logic to be implemented in  routine “Handle_User_Action”
    This routine will have the following interface:
    FORM Handle_User_Action  USING r_ucomm LIKE sy-ucomm
                                                               rs_selfield TYPE slis_selfield.
    ENDFORM.
    Following logic will be implemented in this routine:
    1.     If r_ucomm = ‘SAVE’, continue. Else exit.
    2.     Loop through GT_ZFIBUE where SEL_ROW = ‘X’. “Row is selected
    a.     IF GT_ZFIBUE-PROCESSED = ‘X’.
    i.     GT_ZFIBUE-PROCESSEDON = SY-DATUM.
    ii.     GT_ZFIBUE-PROCESSEDBY = SY-UNAME.
    iii.     MODIFY ZFIBUE FROM work area GT_ZFIBUE.
    Endif.
    Endloop.

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • Experts plz help its very urgent

    hi expert
    plz help- me
    previously i was getting dump in this statement
    TRANSFER v_tab TO p_file.
    FYI:
    here v_tab is a table which hav som records
    and p_file contains the path of a file like c:\new\ggg.txt
    DATA: v_tab TYPE STANDARD TABLE OF t_line WITH HEADER LINE,
    TYPES: BEGIN OF t_line,
           pspid(9) TYPE c,
           tab1 TYPE x,
           post1 TYPE proj-post1,
           tab2 TYPE x,
           vernr TYPE prps-vernr,
           tab3 TYPE x,
    END OF t_line.
    DUMP I WAS GETTIN :
    For the statement
       "TRANSFER f TO ..."
    only character-type data objects are supported at the argument position
    "f".
    In this case. the operand "f" has the non-character-type "T_LINE". The
    current program is a Unicode program. In the Unicode context, the type
    'X' or structures containing not only character-type components are
    regarded as non-character-type.
    to avoid this dump i used feild symbol
    assign V_TAB to <IN> casting.
          p_file = <in>.
          unassign <IN>.
    nw there is no dump
    but problem is p_file contains the contents of v_tab not the file path .
    plz help me its very urgent
    thanx in advance

    Hey, no probs,
    after your initial declaration, do this.
    TYPES: BEGIN OF n_line,
    pspid(9) TYPE c,
    tab1(15) TYPE c,        "check the length you want
    post1 TYPE proj-post1,
    tab2(15) TYPE c,         "check the length you want
    vernr TYPE prps-vernr,
    tab3(15) TYPE c,         "check the length you want
    END OF t_line.
    DATA: n_tab TYPE STANDARD TABLE OF n_line WITH HEADER LINE.
    now after you fetch data into v_tab,
    move it to n_tab.
    using a loop at v_tab and move corresponding fields to n_tab's work area
    append to n_tab.
    once you have populated n_tab and are ready to TRANSFER.
    OPEN your file using
    open dataset <file> for output in text mode encoding default.
    now
    loop at n_tab.
    TRANSFER n_tab to p_file.
    endloop.
    CLOSE DATASET.

Maybe you are looking for

  • Adobe PS CS on new computer

    Old PC crashed with Adobe PS CS installed.  I don't have original disc any longer but have serial #.  Where do I download Adobe PS CS on my new PC with valid serial number?

  • JSF 1.2 required message problem

    Hi, I got the following code in my jsf 1.2 application: <h:inputText id="username" value="#{changepasswordbean.username}" required="true" requiredMessage="#{messages.username}" /> But although #{messages.username}" is defined and is displayed correct

  • Anyone else having trouble exporting the grid effect to QuickTime?

    Other transition effects convert to QuickTime correctly but grid is a mess! The black grid background does not show up and the different slides appear oversize and overlap. Any ideas? I'm using a theme from Keynote Theme Park with photo cutouts. Powe

  • What are services in Identity Server ?

    A service is a group of attributes defined under a common name. The attributes define the parameters that the service provides to an organization. For instance, in developing a payroll service, a developer might decide to include attributes that defi

  • My Classes folder

    Hi, This is my first day working on Jdeveloper. I have configured the database and create anoe dummy page. The page was succesfully created and run succesfully, but when i tried to build the project (OAWorkspace1), myclasses folder not created. Pleas