Uploading File for ESS

Dear All
I have to upload few file to be accessed from my portal as I made configuration on R/3 using SPRO. In SPRO I have to mention a url for the document to be accessed. Will you suggest me the locations for storing documents or suggest me to store the file on the location as http://hostname:port/resource/xxxxx.
Also suggest me the way to move these changes done in development to quality, so that no changes would been required on importing system (quality), keeping in mind that URL mentioned as it is given for development server might require changes on quality.
With regards
Virender Sharma

Depends on the kind of files and usage. If it's just some pages to access via ESS as links, I'd suggest using the portal's own KM system. There are many posts here and blogs on how to do this from config to everything. If it is files that employees will be uploading and accessing, then I would look at really implementing KM more fully. As for your issue with differing hostname/path from DEV>QA>PRD, there are other posts about how to do this without the need for making a change in each system. Search for Homepage Framework posts about it. Good luck.

Similar Messages

  • Unable to check in .sda file for ess in the track for NWDI

    Hi Gurus;
    We have created the track and added the three dependencies along with PCUI_GP.We have imported these into the track.
    However after placing the .sda file for ess under Jtrans/CMS/Inbox folder  and adding it as software component to the track through Landscape Configurator we are  unable  to get the ess component under the checkin tab   of the track in CMS. Please suggest why this is happening?
    Regards;
    Anzar Naik

    Dear Anzar,
    What is the error message you are getting. check the CMS logs for the more information.
    Please check n verify location of the inbox folder when you click on checkin tab.
    refer to SAP Notes 872892.
    Best Regards
    Arun Jaiswal

  • Scanning an uploaded file for viruses

    Hi All,
    I want scan an uploaded file for viruses.i there is any JAVA API where i can connect to Scan engine.
    i have gone through the Symantic scan engine. where it provides the ICAP protocol to communicate with ScanEngine but i dont know how to communicate with that using java.
    Please help me out with this.....
    Thanks In Advance

    Raghavendra_LR wrote:
    Hi All,
    I want scan an uploaded file for viruses.i there is any JAVA API where i can connect to Scan engine.
    i have gone through the Symantic scan engine. where it provides the ICAP protocol to communicate with ScanEngine but i dont know how to communicate with that using java.
    Well buddy i'm afraid there are no good open source solutions available for this however,we have commercial solutions provided by respective vendors.
    [http://www.ciao.co.uk/McAfee_E_Business_Server_Java_API_Complete_package__5529793]
    or the below provided a Java client / Local SDK libraries for which supports number of anti-virus softwares
    [http://www.opswat.com/oesislocal.shtml ]
    Hope that helps :)
    REGARDS,
    RaHuL

  • How to SCAN uploaded files for VIRUS in APEX

    part 1:
    Goal:
    Do a virus scan of the uploaded file from APEX application prior to storing the file in custom tables.
    The process:
    Followed the document from www.developer.com:
    Implementing an Anti-Virus File Scan in JEE Applications
    By Vlad Kofman
    Go to page: 1 2 3 Next
    This article will discuss one of the ways to implement antivirus file scanning in Java, particular in the JEE applications. Viruses, Trojan Horses, and different malware and spyware are a real problem for current computer environments, and especially for the Windows operating system. If you are designing any application in Java that has a requirement to be able to upload external files, you have a potential security risk. By uploading, I mean any way to get the external file inside of the corporate firewall be it via HTTP protocol or any other means. It is quite common to have this type of requirement in an enterprise application and with Java being one of the most popular web development platforms, it is unfortunate that this type of gaping security risk is quite often overlooked.
    Java's Development Kit (JDK) does not have any means to do the antivirus scan right out of the box. This is primarily because Java is a programming language, and does not have any virus scanning packages. Furthermore, anti-virus software is not Sun's area of expertise or business model. Developing this type of software (or Java package), and more importantly maintaining it, would be a huge task for Sun. Mainly because viruses are constantly evolving and keeping virus definitions up-to-date is a daunting task. Large companies such as McAffee, Symantec, or Zone Labs develop virus detecting and combating products and spend a lot of resources to maintain them.
    Application Environment
    To implement a virus file scan in Java, a third-party package needs to be used. For the purposes of this article, I will use Symantec Scan Engine (SSE) package, which comes with Java APIs. This package is an application that serves as a TCP/IP server and has a programming interface and enables Java applications to incorporate support for content scanning technologies. For this article, I used Symantec Scan Engine 5.1, which is available as a Unix or Windows install.
    If you are using an anti-virus package from the different vendor, you will need to investigate what kind of APIs are available; however, the general approach should be similar. Also, note that my implementation can be used with JEE technology and any modern MVC framework such as Struts or Spring.
    The architecture is as follows: A server machine needs to have SSE running at all times. This can be the same machine that hosts your Application Server, but in an enterprise environment this should be a different machine. The Default Port needs to be open through the firewall to allow communication with the scan engine. All JEE applications that need to do file scanning can talk to the SSE server machine through a default port. Also, multiple applications running on different application servers can re-use the same scanning server. For more information, you should refer to the Symantec Scan Engine (SSE) Installation Guide, available on the Symantec web site.
    When an external file that needs to be scanned is sent to the SSE via its programming interface (Java APIs using the default port), before any other operation on the file is performed, the SSE returns a result code. For instance, a file is uploaded by an external user into the web email type application as an attachment; then, the SSE API is invoked by the application and the return code of pass or fail determines the outcome of the upload and whether that email can actually be sent. If you have an account on Yahoo mail, you probably have seen that Yahoo is using Norton Antivirus to scan all attachments, although no Java.
    Click here for a larger image.
    Figure 1: Screen shot from Yahoo
    For details on the Scan Engine Server Installationm please see the Symantec Scan Engine (SSE) Implementation Guide from Symantec.
    Here are some key things to remember about SSE:
    •     Java 2 SE Runtime (JRE) 5.0 Update 6.0 or later must be installed on the server before the SSE installation is done.
    •     After installation, verify that the Symantec Scan Engine daemon is running. At the Unix command prompt (if it's a Unix install), type the following command:
    ps –ea | grep sym.
    A list of processes similar to the following should appear:
    o     5358 ? 0:00 symscan
    o     5359 ? 0:00 symscan
    If nothing is displayed the SSE process did not start.
    If the SSE process did not start, type the following command to restart SSE:
    /etc/init.d/symscan restart
    •     Keeping the virus definition up to date is the most important task and if new updates are not installed, the whole scan becomes ineffective. Symantec automatically downloads the most current file definitions through LiveUpdate. Please make sure that firewall rules are in place to allow the host server to connect to the Symantec update service.
    Project Setup
    For the purposes of this article, I included a wrapper for the Symantec SSE APIs, av.jar, which has Symantec Java APIs and serves as a client to the SSE server and takes care of all communications with the server. Please refer to the download source section. The av.jar should be included in the Java CLASSPATH to work with the SSE. This jar contains a class called AVClient that takes care of actually sending the files to SSE as byte arrays and returning the result.
    In my project setting, I added three variables to be accessed via the System.getProperty mechanism. For example:
    AV_SERVER_HOST=192.168.1.150
    AV_SERVER_PORT=1344
    AV_SERVER_MODE=SCAN
    The AV_SERVER_HOST is the host name or IP of the machine where Scan Engine is installed.
    The AV_SERVER_PORT is the port where Scan Engine listens for incoming files.
    The AV_SERVER_MODE is the scan mode which can be:
    •     NOSCAN: No scanning will be done (any keyword that does not start with "SCAN" will result in ignoring the call to the Scan Engine and no files will be transferred for scanning).
    •     SCAN: Files or the byte stream will be scanned, but the scan engine will not try to repair infections.
    •     SCANREPAIR: Files will be scanned, the scan engine will try to repair infections, but nothing else will be done.
    •     SCANREPAIRDELETE: Files will be scanned, the scan engine will try to repair infections, and irreparable files will be deleted.
    Note: For the file stream (byte array) scanning, the only meaning full values are "SCAN" and "NOSCAN".
    Using the SSE Scanning Java APIs
    In any class where scan is required, call the scanning API provided in the AVClient object located in the av.jar. The AVClient object will establish connection to the Scan Engine server and has the following APIs:
    Figure 2: The significant APIs for the communication with to the Scan Engine Server.
    If scanning a file on the file system, in SCAN only mode, use the call that accepts filename only.
    If scanning a file on the file system, with SCANREPAIR or SCANREPAIRDELETE, use the call that accepts input and output file names.
    If scanning an in-memory file (byte array), use the call accepting byte array.
    For example:
    import com.av.*;
    Initialize setup parameters:
    static String avMode =
    (System.getProperty("AV_SERVER_MODE") != null)
    ? (String) System.getProperty("AV_SERVER_MODE") : "NOSCAN";
    static boolean scan = avMode.startsWith("SCAN");
    static String avServer =
    (String) System.getProperty("AV_SERVER_HOST");
    static int avPort =
    Integer.parseInt( (String) System.getProperty("AV_SERVER_PORT"));
    Scan check example for an in-memory file byte array:
    public void scanFile(byte[] fileBytes, String fileName)
    throws IOException, Exception {
    if (scan) {
    AVClient avc = new AVClient(avServer, avPort, avMode);
    if (avc.scanfile(fileName, fileBytes) == -1) {
    throw new VirusException("WARNING: A virus was detected in
    your attachment: " + fileName + "<br>Please scan
    your system with the latest antivirus software with
    updated virus definitions and try again.");
    Note that if you are using this code inside of the MVC handler, you can throw a custom VirusException and check for it in the calling method and perform any necessary cleanup. I have included the class in the AV Jar as well.
    For example:
    catch (Exception ex) {
    logger.error(ex);
    if (ex instanceof VirusException) {
    // do something here
    else {
    // there was some other error – handle it
    For more details on the Scan Engine Client API, please see Symantec Scan Engine Software Developers Guide.
    Continuation in part2

    part 4:
    c)     Clienttester.java – This is the gui app set to test if the configuration is working or not. This gui uses the method scanfile(inputfile, outputfile) as you can see the result in the outputpane of the jframe.
    * clienttester.java
    * Created on April 12, 2005, 2:37 PM
    * @author george_maculley
    package com.av;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class clienttester
    implements ActionListener {
    // private String ipaddress = "127.0.0.1";
    private String ipaddress = "199.209.150.58";
    //private String ipaddress = "192.168.0.55";
    static JFrame frame;
    JFileChooser chooser = new JFileChooser();
    TextField pathtofile = new TextField(System.getProperty("user.home"), 30);
    // TextField pathtooutfile= new TextField(System.getProperty("user.home"),30);
    private int port = 1344;
    JButton filechooser = new JButton("Browse to file"); ;
    private String originalfilename;
    private String outputfilename;
    JButton scanbutton = new JButton("Scan");
    TextArea outputarea = new TextArea(20, 40);
    TextField iptext = new TextField("127.0.0.1", 16);
    TextField porttext = new TextField("1344", 5);
    AVClient mine;
    JRadioButton choosescan = new JRadioButton("SCAN");
    // JRadioButton choosedelete= new JRadioButton("SCANREPAIRDELETE");
    /** Creates a new instance of gui */
    public clienttester() {
    public clienttester(java.lang.String ip, java.lang.String infile, java.lang.String outfile, int port) {
    this.ipaddress = ip;
    this.port = port;
    this.originalfilename = infile;
    this.outputfilename = outfile;
    boolean setValues(java.lang.String ip, java.lang.String infile, java.lang.String outfile, int port) {
    this.ipaddress = ip;
    this.port = port;
    this.originalfilename = infile;
    this.outputfilename = outfile;
    return (true);
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {
    JComponent c = (JComponent) actionEvent.getSource();
    if (c == filechooser) {
    int retval = chooser.showDialog(frame, null);
    if (retval == JFileChooser.APPROVE_OPTION) {
    File theFile = chooser.getSelectedFile();
    if (theFile != null) {
    pathtofile.setText(theFile.getPath());
    // pathtooutfile.setText(theFile.getPath());
    JOptionPane.showMessageDialog(frame, "You chose this file: " + theFile.getPath());
    if (c == scanbutton) {
    //return object that can be passed to AVClient
    String policy;
    int thisport;
    int scanresult;
    String thisip;
    String inputfile;
    String outputfile;
    outputarea.append("Server: " + iptext.getText() + "\r\n");
    if (choosescan.isSelected()) {
    policy = "SCAN";
    else {
    policy = "SCANREPAIRDELETE";
    thisport = new Integer(porttext.getText()).intValue();
    thisip = iptext.getText();
    //mine= new AVClient(iptext.getText(),porttext.getText(),policy);
    mine = new AVClient(iptext.getText(), thisport, policy);
    if (mine.test() == 1) {
    outputarea.append("Sorry. Incorrect parameters specified.\r\n");
    System.exit(1);
    else {
    outputarea.append("Connection to SAVSE initialized.\r\n");
    inputfile = pathtofile.getText();
    // outputfile=pathtooutfile.getText();
    outputfile = "/tmp";
    outputarea.append("Scanning file " + inputfile + " \r\n");
    if (policy == "SCAN") {
    scanresult = mine.scanfile(inputfile);
    else {
    scanresult = mine.scanfile(inputfile, outputfile);
    if (scanresult == 0) {
    outputarea.append("File is clean.\r\n");
    else if (scanresult == -1) {
    outputarea.append("File is infected. \r\n");
    else {
    outputarea.append("Scan error.\r\n");
    void display() {
    Frame f = new Frame("SAVSE JAVA ICAP Client");
    f.setLayout(new GridLayout(1, 2));
    JPanel lpanel = new JPanel(new GridLayout(7, 1));
    JPanel ippanel = new JPanel();
    JPanel portpanel = new JPanel();
    JPanel rpanel = new JPanel();
    JPanel outputpanel = new JPanel();
    JPanel buttonpanel = new JPanel();
    JPanel pathpanel = new JPanel();
    // JPanel outpathpanel= new JPanel();
    JPanel policypanel = new JPanel();
    ButtonGroup policygroup = new ButtonGroup();
    filechooser.addActionListener(this);
    scanbutton.addActionListener(this);
    choosescan.setSelected(true);
    policygroup.add(choosescan);
    // policygroup.add(choosedelete);
    buttonpanel.setBorder(BorderFactory.createTitledBorder("Scan Policy"));
    buttonpanel.add(choosescan);
    // buttonpanel.add(choosedelete);
    pathpanel.setBorder(BorderFactory.createTitledBorder("Path to File"));
    pathpanel.add(pathtofile);
    f.setSize(new Dimension(650, 400));
    f.setBackground(Color.white);
    f.setResizable(true);
    ippanel.setBorder(BorderFactory.createTitledBorder("SAVSE IP Address"));
    ippanel.add(iptext);
    outputpanel.setBorder(BorderFactory.createTitledBorder("OUTPUT"));
    outputpanel.add(outputarea);
    portpanel.setBorder(BorderFactory.createTitledBorder("ICAP Port"));
    portpanel.add(porttext);
    // outpathpanel.setBorder(BorderFactory.createTitledBorder("Path to Repair File"));
    // outpathpanel.add(pathtooutfile);
    lpanel.add(ippanel);
    rpanel.add(outputpanel);
    lpanel.add(portpanel);
    lpanel.add(buttonpanel);
    lpanel.add(pathpanel);
    // lpanel.add(outpathpanel);
    lpanel.add(filechooser);
    lpanel.add(scanbutton);
    f.add(lpanel);
    f.add(rpanel);
    f.setVisible(true);
    public static void main(String[] args) {
    clienttester g = new clienttester();
    g.display();
    d)     my2.java – This is the class file I wrote to test that I am able to send a file and scan it and see the output in the JDEVELOPER. In this case the file is stored on the filesystem of the client machine. JDEVELOPER should be able to see the file.
    NOTE:
    “EICAR.com” is the test file downloaded from Symantec site to test a non malicious virus file. I n order to be able to test it like this, the Antivirus program running on your machine should be disabled, or else Antivirus will kick in and delete the file. In the first place you will not be able to download the test virus file either with anti virus running on the machine you are downloading to.
    package com.av;
    import java.io.*;
    public class my2 {
    static int my_return = 0;
    * @param fileBytes
    * @param fileName
    * @return
    public static int scanfile(String fileName){
    String avMode = "SCAN";
    boolean scan = avMode.startsWith("SCAN");
    String avServer = "xx";--avserver ip address
    int avPort = 1344;
    int the_return = 0;
    if (scan) {
    AVClient avc = new AVClient(avServer,avPort,avMode);
    the_return = avc.scanfile(fileName);
    if (the_return == -1) {
    return (the_return);
    } else
    return (the_return);
    //my_return = the_return;
    return (the_return);
    public static void main(String[] args) throws Exception {
    System.out.println("Hi there in Main");
    byte[] b1 = new byte[4];
    b1[1] = 68;
    my_return = scanfile("c:\\eicar.com");
    System.out.println(my_return);
    e)     Then finally we have my1.JAVA, which takes the filename, and it’s contents in the bytes form and scans the file. The reason for this method is we are not storing the file on the filesystem, it is read into the memory and only if it is clean, it is put into the database or else notify the user.
    package com.av;
    import java.io.*;
    public class my1 {
    static int my_return = 0;
    static int a_length = 0;
    * @param fileBytes
    * @param fileName
    * @return
    public static int scanfile(String fileName,byte[] fileBytes) throws IOException {
    String avMode = "SCAN";
    boolean scan = avMode.startsWith("SCAN");
    String avServer = "xxx";--avserver’s ip address
    int avPort = 1344;
    int the_return = 0;
    if (scan) {
    AVClient avc = new AVClient(avServer,avPort,avMode);
    // File file = new File(fileName) ;
    //byte[] fBytes = getBytesFromFile(file);
    the_return = avc.scanfile(fileName, fileBytes);
    if (the_return == -1) {
    return (the_return);
    } else
    {return (the_return);}
    my_return = the_return;
    return (the_return);
    // Returns the contents of the file in a byte array.
    * @param file
    * @return
    * @throws IOException
    public static byte[] getBytesFromFile(File file) throws IOException {
    InputStream is = new FileInputStream(file);
    // Get the size of the file
    long length = file.length();
    // You cannot create an array using a long type.
    // It needs to be an int type.
    // Before converting to an int type, check
    // to ensure that file is not larger than Integer.MAX_VALUE.
    if (length > Integer.MAX_VALUE) {
    // File is too large
    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];
    // Read in the bytes
    int offset = 0;
    int numRead = 0;
    while (offset < bytes.length
    && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
    offset += numRead;
    // Ensure all the bytes have been read in
    if (offset < bytes.length) {
    throw new IOException("Could not completely read file "+file.getName());
    // Close the input stream and return bytes
    is.close();
    return bytes;
    // public static void main(String[] args) throws Exception {
    //System.out.println("Hi there in Main");
    // File file = new File() ;
    // byte[] b1 = getBytesFromFile(file);
    //System.out.println(b1);
    // my_return = scanfile(,b1);
    //System.out.println(my_return); }
    Finally , you have the exceptions file,
    e) package com.av;
    public class VirusException
    extends Exception {
    public VirusException() {
    super();
    public VirusException(String text) {
    super(text);
    Once you have all these classes, you can use JDEVELOPER , to load these classes into the database: This is as follows:
    Right click on the project, which has all these classes.
    NEW -> deployment profiles -> load java and stored procedures.
    When you are created deployment profile, you have to specify,
    Loadjava options.
    -f, -v (check the check boxes)
    Under privileges:
    -s – specify database schema these classes are loaded into
    -s – create sysnonym check box
    -g – grant to public or any specific users per your policy.
    Under Resolver,
    -r and –o (check the check boxes)
    I accepted the default name storedproc1. Then you right click on the storedproc1.deploy, deploy to whichever database connection you created.
    And then, In order to access this java class we need a pl/sql wrapper as follows:
    create or replace package my1 is
    function mycheck (pfilename in varchar2, psize in number)
    return number;
    end my1;
    create or replace package body my1 is
         function mycheck (pfilename in varchar2, psize in number)
    return number is
    language java
         name 'com.av.my1.scanfile(java.lang.String, byte[]) return int';
         end my1;
    And the code is invoked from sql plus as follows:
    Select my1.mycheck(“filename”, “filebytes”) from dual;
    One important catch in the above method is to send the filename and filecontents in bytes form. In order to send the file contents as filebytes, you will need another java class and load into the data base as described above.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    * This program demonstrates how to read a file into a byte array. This method
    * reads the entire contents of the file into a byte array.
    * @version 1.0
    * @author Jeffrey M. Hunter ([email protected])
    * @author http://www.idevelopment.info
    public class ReadFileIntoByteArray {
    * method to convert a byte to a hex string.
    * @param data the byte to convert
    * @return String the converted byte
    public static String byteToHex(byte data) {
    StringBuffer buf = new StringBuffer();
    buf.append(toHexChar((data >>> 4) & 0x0F));
    buf.append(toHexChar(data & 0x0F));
    return buf.toString();
    * Convenience method to convert an int to a hex char.
    * @param i the int to convert
    * @return char the converted char
    public static char toHexChar(int i) {
    if ((0 <= i) && (i <= 9)) {
    return (char) ('0' + i);
    } else {
    return (char) ('a' + (i - 10));
    * Returns the contents of the file in a byte array
    * @param file File this method should read
    * @return byte[] Returns a byte[] array of the contents of the file
    private static byte[] getBytesFromFile(File file) throws IOException {
    InputStream is = new FileInputStream(file);
    System.out.println("\nDEBUG: FileInputStream is " + file);
    // Get the size of the file
    long length = file.length();
    System.out.println("DEBUG: Length of " + file + " is " + length + "\n");
    * You cannot create an array using a long type. It needs to be an int
    * type. Before converting to an int type, check to ensure that file is
    * not loarger than Integer.MAX_VALUE;
    if (length > Integer.MAX_VALUE) {
    System.out.println("File is too large to process");
    return null;
    // Create the byte array to hold the data
    byte[] bytes = new byte[(int)length];
    // Read in the bytes
    int offset = 0;
    int numRead = 0;
    while ( (offset < bytes.length)
    ( (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) ) {
    offset += numRead;
    // Ensure all the bytes have been read in
    if (offset < bytes.length) {
    throw new IOException("Could not completely read file " + file.getName());
    is.close();
    return bytes;
    * @param filename
    public static byte[] chk_file(String filename) {
    byte[] fileArray = null;
    try {
    fileArray = getBytesFromFile(new File( filename));
    } catch (IOException e) {
    e.printStackTrace();
    if (fileArray != null) {
    for (int i=0; i<fileArray.length; i++) {
    System.out.println(
    "fileArray[" + i + "] = " +
    ((int)fileArray[i] < 9 ? " " : "") +
    ( ((int)fileArray[i] > 9 && (int)fileArray[i] <= 99) ? " " : "") +
    fileArray[i] + " : " +
    " HEX=(0x" + byteToHex(fileArray) + ") : " +
    " charValue=(" + (char)fileArray[i] + ")");
    return fileArray;
    * Sole entry point to the class and application.
    * @param args Array of String arguments.
    public static void main(String[] args) {
    byte[] fileArray = null;
    try {
    fileArray = getBytesFromFile(new File("c:\\eicar.com"));
    } catch (IOException e) {
    e.printStackTrace();
    if (fileArray != null) {
    for (int i=0; i<fileArray.length; i++) {
    System.out.println(
    "fileArray[" + i + "] = " +
    ((int)fileArray[i] < 9 ? " " : "") +
    ( ((int)fileArray[i] > 9 && (int)fileArray[i] <= 99) ? " " : "") +
    fileArray[i] + " : " +
    " HEX=(0x" + byteToHex(fileArray[i]) + ") : " +
    " charValue=(" + (char)fileArray[i] + ")");
    Having main method helps you to run the file in JDEVELOPER or using JAVA.
    DO not forget to load this class into the database.
    And you create the pl/sql wrapper again as follows:
    create or replace FUNCTION TOBY (pfilename in varchar2) RETURN VARCHAR2 iS
    language java name
    'ReadFileIntoByteArray.chk_file(java.lang.String) return byte[]';
    And you call the function from sqlplus as follows:
    Sql>Set serveroutput on size 20000;
    Sql> call dbms_java.set_output(20000);
    Sql> Select toby(“filename”) from dual; --
    this file should be accessible, I mean you will not be able to send a file on your pc, from sql plus as sql/plus is running on your db server.
    You will be able to see the output in sql plus:
    If you are running it from the APEX:
    When we use file browser widget from APEX, the file is stored in APEX_APPLICATION_FILES table. And we retrieve that into a variable and pass this variable to the function as follows:
    DECLARE
    scan_failed EXCEPTION;
    x varchar2(400);
    z number;
    BEGIN
    select filename into x from wwv_flow_files where name = :P1_FILE_NAME;
    select my1.mycheck(x,toby(x)) into z from dual;
    if z = 0 then
    :P1_SUBJECT:= 'PASSED';
    else
    :P1_SUBJECT:= 'FAILED';
    end if;
    :P1_SCAN_RESULT := '** Scanning File **';
    IF UPPER(:P1_SUBJECT) = 'PASSED' THEN
    BEGIN
    :P1_SCAN_FLAG := 'PASSED';
    :P1_SCAN_RESULT := :P1_SCAN_RESULT || ' ** File passed scan **';
    END;
    ELSIF UPPER(:P1_SUBJECT) = 'FAILED' THEN
    BEGIN
    :P1_SCAN_FLAG := 'FAILED';
    :P1_SCAN_RESULT := :P1_SCAN_RESULT || ' ** File failed scan **';
    END;
    ELSE
    BEGIN
    :P1_SCAN_FLAG := 'UNKNOWN';
    :P1_SCAN_RESULT := :P1_SCAN_RESULT || ' ** Scan Is Not Conclussive **';
    END;
    END IF;
    --IF :P1_SCAN_FLAG = 'FAILED'
    -- THEN RAISE scan_failed;
    --END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DELETE from APEX_APPLICATION_FILES WHERE name = :P1_FILE_NAME;
    RAISE_APPLICATION_ERROR (-20000, 'seb OTHERS error encountered - file upload not allowed. Possible virus detected !');
    raise;
    END;
    ACKNOWLEDMENTS:
    1) JOHN SCOTT – who suggested this ICAP API in one of the threads which is my initial starting point in this direction.
    2) VLAD KOFMAN who wrote the article on WWW.DEVELOPER.com
    3) Mr. KIRAN –One of the engineers from Metalink, who helped me at every step of getting this java programs and pl/sql wrappers working. But for him, I would have not completed my project.

  • SAP - Upload file for Unicode characters

    Hi,
    I have an issue according to the Unicode conversion. I tried to upload PC file which has Thai font on there, using <b>METHOD cl_gui_frontend_services=>gui_upload</b>, but seems that it returns the wrong characters. I used version 4.7. and have the unicode conversion already. Is there other way.. or I need something missing here, that needs to be add..
    Please help... really need this !!
    Regards,
    Martha
    Message was edited by: Martha

    Hello community,
    Thanks for the help
    I tried with a file created as UTF-8 and setting the sender file adapter as text - UTF-8 and it throws the empty file error.
    Besides I tried by setting up the encoding as you adviced, but I got an error like:
    Conversion of file content to XML failed at position 0: java.io.UnsupportedEncodingException: ISO-2022-CN
    Edited by: JosFrancisco Villegas on Mar 27, 2009 12:19 AM

  • Question of uploading files for batch

    I want to upload a batch of files to CMSDK for a certain contenttype,for example, many MP3 files to "MUSIC" contenttype. I want to write a program to allow users to use to upload these MP3s, i hope it is easy to use just like use ftp client.and i need have chance to fill the attributes for the MP3s through some method. Could any one give me any advice for the designing? thanks a lot.

    CM SDK supports two different techniques for supporting custom metadata that describes an item. For example, with an mp3 file, you may want to track the artist, album etc.
    The first technique is to subclass our out of the box document class and introduce additional custom attributes that you want to track such as artist. Then, when you upload a document programatically, you specify that this is a custom document of type mp3document and explicitly specify the various custom metadata information.
    The second and preferred technique is to NOT subclass, but rather make use of custom category objects. Category objects are simply objects that can be applied to any publicobject (document, folder etc) to associate custom metadata. You could create a category object of type mp3, which allows artist, album etc to be captured. When uploading a document programatically, you create a standard document, but then execute a call to add an instance of the specified category to the document. (PublicObject addCategory method!). This is the preferred approach. In fact, CM SDK ships with an out of the box background agent (InterMedia annotator agent) that automatically detects certain content types such as mp3 files when they get uploaded, and automatically in turns extracts the metadata out of these content types, and applies to the documents using category items, so that the files can easily be searched!

  • Photoshop elements 11 and uploading files for pictures

    I have an external hard drive that I downloaded all my pictures of then I edit them.  Now since they are in a different format and the end of the file extension says psd it isn't in jpeg so shutterfly or mpix wont take them for download so I can get copies made?  What do i do??

    There are two options. One is exporting them as JPEGs in Elements Organizer. That can be done using File > Export as new file.
    The other option is opening the files in PSE Editor and saving as JPEG using File > Save As option.
    Thanks
    Andaleeb

  • Error uploading file for OSS note 1644528

    I am on release 6.04, service pack 40, of SAP HRCUS.  I am trying to implement recently released note 1644528.  I extract the zip file, save it, go to SFP, pull up form HR_F_W2_MULT_11  to be edited, and run transaction code FB_XDP_UP.  I choose my file.  It spins for a little while.  Then I get the message "Error occurred while processing request".  Don't know what the error is or why, or if it updated the form.  (I suspect it did not as I did not get prompted for a transport request.)  If I click on the error message, it just repeats itself.  Has anyone experienced this and knows how to fix it?
    Janice Ishee

    That is interesting.  Our Basis person says that note was applied this week.  But note 1644528 in its prerequisites says "You have applied SAP Note 1630701 - Year End 2011 Phase I for U.S. Tax Reporter".  It makes no mention of this second OSS note 1637361.  I wonder if there is some sort of conflict there.  I'll double-check with our Basis person to see if something might have gone wrong with its installation.  Thanks

  • Creation of Download file for TCode AS94

    Hi All,
    Scenario:
    We are creating a new company from our old company and for the data migration we planned to download the data from the old company create a batch upload  file for the Transaction AS94 - Create LegacyAsset Subnumber and upload it.For this purpose we wanted to download the data from the current company which is related to this TCode.
    What i did is created a SAP Query using SQ02 created a infoset using the LDB ADA but we need to add 2 more structures to this.
    1.RALT_DYNP_STRUC
    2.RA02S
    I am not clear whether these strucutres can download the required data for creating the Upload file and how can i add these structures to the Infoset.
    PS: I guess this is more into ABAP but still as it is related to Asset and this scenario will be faced more often i posted it here.
    If someone can kindly help me out.
    ~Andrew
    Edited by: Andrew J on Dec 17, 2009 3:10 PM

    For this you have to create your own ABAP use the following tables in the program:
    tables: anla,                          "Asset master record-segment
            anlb,                          "Depreciation terms
            anlc,                          "Asset-value fields
            anlh,                          "Asset main number
            anlv,                          "Insurance data
            anlz,                          "Asset allocations
            t100,                          "Messages
            d020s.
    tables: v_anlaz.                       "View of ANLZ & ANLA
    For the table ANLC have a look to values you are using and make in some cases totals!  The most easy way is to this with the records on the begin of a new fiscal year (less vallues in ANLC)
    The values in ANLC are stored by depreciation area!

  • Can't upload files--"Acrobat has encountered a problem"

    I'm experimenting with Acrobat. com as a way to collaborate with peers across the country. Seems like an ideal answer. I'm testing the "free," 2-person version at the moment, and can't seem to upload files to My Workspace. I'm trying to upload two files individually--the first a small MS Word file, the second a 1mb PowerPoint. Each attempt produces an "Acrobat has encountered a problem" error message. I can't even upload a photo of myself for my profile. At first, I thought it might be a firewall/proxy problem, but I ran all the Adobe diagnostics. Everything tested fine. I'm even able to establish video connection in the ConnectNow workspace. I'm working off a T3 pipeline, so I don't think its a volume problem. Help.

    Hi, can you tell exactly what requirements exist?
    I am having the same problem when I try to upload a file. My Admin has opened the site Acrobat.com for me and I can access Acrobat.com via browser, but not upload PDFs. I also cannot upload files for review from other Adobe products (RoboHelp or Acrobat).
    This whole issue seems rather strange to me - an online reviewing process should be designed for professional users and these user are typically behind a firewall. Therefore it would be most important to pinpoint exactly which access rights are required, rather then let the user try and stumble around themselves.

  • Upload file fialed in KP06

    Hello ,
      While uploading the cost center plan in KP06 , i am gettig the upload error failed mesage. The detailed error mgs is as follows
    Errors occurred during testing for field "Cost Center".
    Message no. K8011
    Diagnosis
    The SAP System could not determine any valid characteristic values in the planning period for characteristic Cost Center.
    System Response
    The system does not accept the entries.
    Procedure
    Choose Extras -> Error log -> Master data to see the cause.
    There is an explanatory long text for each error listed in the log.
    Kindly help me to solve this issue
    Thanks

    Hi,
    Please check the upload file for the cost center values.. Please confirm their existence/ completeness / validity for the period plan data is being entered. As suggested please go through Extras -> Error Log to identify the errors
    Trust this helps.
    Cheers!!

  • I want to allow only mp3 files in uploading, File dialog have to show only

    In my project , user have to upload Mp3 files.
    we want to show only mp3 files in file dialog .
    in file dialog ,filetype field contain only mp3 .
    let me help inthis.
    Regards ,
    Vyam.

    Thanking you for giving reply to my query.
    I have seen in VB and someother language is it
    possible.No you haven't.. You saw something else entirely.
    >
    Actually am trying with this is in html file element
    only , But am unable to control the file dialog
    window with selected Extension files.
    Right. You can't do what you are trying to do it's impossible. You can stick an accept attribute on your form tag and It MIGHT work. But this is browser dependent and will not neccessarily be enforced.
    Best to do what I told you before. Validate the uploaded file for type on the server.
    It is showing All files. I tried with accept ,
    enctype also , but failed.
    Then you are hosed.
    can we do with FileFilter class in java.Is it
    possible.
    How do you see this working? If you want you could build an applet that you could sign that would upload the file for you I suppose. Seems a lot of unneccessary work.
    Thanking you,
    Vyam.Welcome.

  • I use FireFTP to upload files. This past week the profilesuddenly stopped connecting. Ideas?

    I manage two Websites and use FireFTP to upload files for both of them due to FireFTP's ease of use. I've never had a problem connecting before last week. The files on the host (my computer) show, but there is no response when I click on the "Connect" button. These were already established profiles and have worked before, and I have made no changes. I've tried to make the connection fairly frequently over the past week (this has been going on for a full week now), and tried a few minutes ago to confirm there was still a problem. There is. Did I have only a limited time to use FireFTP? If so, I don't recall being advised of that when I downloaded and installed it. I'd gladly pay a nominal fee just to not have to learn another FTP app, although there are many free FTP apps available on the Internet. Further, Firefox itself is not working -- I can not see any Webpages using Firefox, although in using IE or Chrome, the Webpages I seek come up. In fact, I had to find your Website and fill out this support ticket via IE. What is going on with Firefox and FireFTP? Thx.

    If Firefox won't connect, as well as FireFTP not connecting, the most common reason would be a firewall block after the update. That and other reasons are discussed in the following support articles:
    * [[Fix problems connecting to websites after updating Firefox]]
    * [[Firefox can't load websites but other browsers can]]
    Anything there help?

  • Scaning uploaded file using java

    hi All,
    I want scan an uploaded file for viruses.i there is any JAVA API where i can connect to Scan engine.
    i have gone through the Symantic scan engine. where it provides the ICAP protocol to communicate with ScanEngine but i dont know how to communicate with that using java
    Thanks
    Prashanth k p

    Hi Prashant,
    I also have the similar requirement. ie., I want scan an uploaded file for viruses. I am also using Symantec Norton Anti-Virus. I am not successful in implementing it.
    can i know how you have satisfied this requirement.
    Thanks in Advance.
    Raghavendra L

  • TS5179 No upload file in place

    I get a notification that my upload file for iCloud is not in place. How do I remedy this issue?
    Desmo

    The problem here is usually one of setting up the classpath correctly on the server.
    If you run the Demo Form that comes with the utility and press KEY-LISTVAL then it will pop up an alert with the current classpath in it.
    If this fails and you get an error it's because Forms can't start Java on the server at all which indicates that you need to check the o/s path that is configured for the CGI to use.
    In general I'd recommend using the Forms listener Servlet with this kind of code because it means that you can do all you're configuration in a simple .env file.
    Have a look at the HTML document that comes with the upload utility - there are some hints at then end of it to help with the setup.

Maybe you are looking for

  • Video output from ATV is "blurry"

    Here's a strange one. I have an ATV connected to a Sony Bravia W series 1080p TV via component video . The output from my ATV is "blurry" on the screen, but otherwise functions fine. When I power off the ATV and back on (remove the power cord), the p

  • Updating A Structure using ABAP Program

    Hi, V r using a structure...IOOPCOMP, in COOIS Transaction. its fetching data from MARA, and other tables too. V want a new Field included in IOOPCOMP, from MARA, and get it Updated. There's no user exit available for COOIS. Its urgent. Pls Do let us

  • BB z10 won't start up after updating to bb link

    I accidentally dropped my phone on the floor, and it won't start up. here are the following steps that i already did: 1. I already tried to update it on the bb link, after successfully updating i remove the usb cable, however  it didn't start up. eve

  • Header in EXCEL Sheet

    Hi all, I'm trying to download the file into excel sheet getting data into excel but header is missing in SAP4.7 version , when i check my code in ECC6.0 then the header is coming. Below is my code. TYPES: BEGIN OF it_int,         sales(3) TYPE n,   

  • Urgent : HRMD_07A Idoc

    Hi Experts,                   I want to tranfer field which in comination of 2 fields via idoc. I want to send fmname field which is combination of midnam + vorna. Field fmname is in segment but not in the infotype. So where i have to concatenate thi