Upload files with international content

I want to upload files with international content(many languages), from
a single JSP. Any ideas?
thanks,
M.

Hi Marco,
I dont know transaction CV02N. But if this application uses standard function modules like GUI_UPLOAD it should work with ITS. A special configuration should not be required as long as the files have a size up to 5 MB. If they are larger it might be required to adjust the size of the request container MaxReqSize. Dont forget that Java has to be activated to let webgui access the filesystem.
Regards,
Klaus

Similar Messages

  • Logic to upload file with dynamic columns

    hi
    in my requirement i hav given to add logic to upload file with dynamic columns so that this upload program can be reused.
    this way the program is flexible, irrespective of the number of columns in the file.
    can any one explain this?
    and let me know what actually i hav to do.

    Check the program and the dynamic column is in the col_pos internal table and in the routines get_structure onwards.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/scm/dynamic%2bstructures%2band%2bcomponents
    cheers
    Aveek

  • To create 3 diff files with same content but with diff names in same target

    Hi SapAll.
    i have got a a requirement where pi need to create 3 different files with same content but with different names under same target from a single Idoc.
    its an IDOC to 3 File Inteface.
    can any body help me in providing the differnt solutions for this without use of any script executions.
    will be waiitng for response.
    regards.
    Varma

    > i want to use only one communication channel to produce 3 different file names with same content ,so here i should use only one message mapping in 3 operation mappings .
    This is not possible to produce 3 different file names with single CC. You have to use 3 different CCs. unless you have going to use some other trick e.g some script to rename the file etc..
    As I suggested in my previous reply use Multi-Mapping Or create 3 different Interface Mappings (by using the same MM).
    Note: You have to create 3 different Inbound Message Interfaces (you can use the same Inbound Message Type) otherwise while creating the 3 Interface Determination it won't allow because of same Outbound & Inbound Message Interface. It will simply say Interface alreday exists..
    So, just use the Multi-Mapping which is best solution in my opinion, because the benefit of using multi-mapping are:
    1. You have to create only single Message Mapping
    2. Single Interface Mapping
    3. Single Receiver Determination
    4. Single Interface Determination
    5. 3 Receiver CCs (3 you have to use in any case)
    6. Performance wise it is good (read the blog's last 2 para)
    7. And last but not the least easy to maintain the scenario.

  • Impossible Upload files with Filezilla FTP Client after upgrade win8 to win8.1

    Hi
    Things were working fine with win 8 but, after Upgrade to win 8.1 is not possible upload files with Filezilla  FTP Client.
    is there anyone facing same problem?
    thanks in advance for any answer to help me solve this issue 
    Regards 
    TC

    Hi,
    Please Change your transfer settings in site manager from either default or passive to active it to see what's going on.
    Also, check IE compatibility mode.
    In addition, I suggest you install all latest updates for Windows since these updates will improve and fix some known issues.
    Kate Li
    TechNet Community Support

  • Upload files with swedish characters NS 4.7

    Hi,
    I can upload files with swedish characters in the file name with IE 5, but not with Netscape 4.7. iFS presents an error message that the file doesn't exist or is empty.
    Is there a solution for this problem?
    /Elin
    null

    check out if you are using javascripts and whether IE supports it
    Roberto Nanamura <[email protected]> wrote:
    >
    Hi,
    I am having a problem uploading files with Internet Explorer, it works with
    Netscape Communicator. Has someone had the same problem?
    I am using WebLogic 5.1 service pack 5 with Netscape iPlanet 4.1 service pack 2
    in a Solaris 7.
    Best regards,
    Roberto N Nanamura
    Technical Consultant
    Summa Technologies

  • How to associate an uploaded file with form data

    I have a "ticketing" app which stores a ticket no. as well as allows users to upload multiple files per ticket. The problem I am having is how to associate an uploaded file with a particular ticket no. As you can guess this becomes complicated when the same user can potentially update multiple tickets using the same file names. I am having difficulty trying to understand how to associate a ticket no with one or more uploaded files. I do have a custom table which I update with the attachments but I am unsure how to, or when to, update the ticket information on this custom table. I only want to retrieve attachments for a given ticket, not all attachments uploaded by a user.Does anyone have any ideas?

    Hi,
    My question is bit related to this topic.
    I am having a requirement to upload the CSV files so that they will store in a database table and later on wards when they search on that table it needs to pull the information and display on the form. I am a new bee to application express. Could some body tell me how to start this process with??. Just give me an overvoew/hints so that I will try to carry on my own.
    Cheers,
    Krishna.

  • Creating Player Problem from file with unknown content

    Hi,
    I need to create Player from video file with unknown content ie. from file "test.dat"
    try{
    MediaLocator ml = new MediaLocator(new URL("file:///D:/test.dat"));
    Player p = Manager.createPlayer(ml);
    catch(NoPlayerException npe){}
    catch(MalformedURLException mUe){}
    catch(IOException ioe){}
    throws NoPlayerException
    Pleeeease Help!!!

    I think it should be : "file:D:/test.dat" But i do believe that it will not work with a .dat file...

  • Cannot print PCL file with graphical content

    If I try to print a PCL file with graphical content using lp then the output is corrupt on a network printer. I've tracked the problem down to the netpr program - which seems to be performing some sort of filtering on the data. Does anyone know how the flags work for netpr - or know of a work around?

    Assuming you are running 10.10.2 and not the ancient 10.0.2, can you tell us what printer and printer driver you are using? How is the printer connected to the computer (network, usb)? See if you can delete the Reader preference files? Years ago I resetting the printer subsystem would sometimes cure a problem like this.

  • Uploading file with an enforced category

    I am trying to upload files to a directory with an enforced category. I took the HandlingEnforcedCategories.java from the DEV Kit, modified to my requirements and still running into issue. It's something to do with library/workspace I think which I am still confused about.
    My sandbox path is /regionUS/BUSINESS%20SECTOR/ (I am escaping the scape or else the api chokes)
    My library/workspace is CUSTOMERS (library/bookshelf icon shows up here)
    My folder where category is applied is COOLEZ which is under CUSTOMERS
    I am trying to upload images and apply category to /regionUS/BUSINESS%20SECTOR/CUSTOMERS/COOLEZ/IMAGES/2009/04
    all the folders exist and the category exist too but I am still getting the error that says
    "Required metadata folder missing. Ensure prerequisite sample has been run."
    The question is why would this complain about the missing metadata folder?
    Here are the couple interested methods
    public static void main(String args[]) {
    try {
    upload ( "coolac",
    "coolpw",
    "http://contentdbserverurl:7779/content/ws",
    "regionUS/BUSINESS%20SECTOR/",
    "CUSTOMERS/COOLEZ/IMAGES/2009/04/",
    "test1.jpg",
    new FileInputStream(new File("c:/test/test1.jpg")),
    "DAMAGED_PRODUCT_IMAGES",
    mapObj
    catch (Exception e) {
    e.printStackTrace();
    } catch (ExelContentDBException e) {
    e.printStackTrace();
    // TODO
    public static void upload(String username,
    String password,
    String contentDBURL,
    String sandboxRootPath,
    String workspaceName,
    String sourceFilename,
    FileInputStream sourceFileInputStream,
    String categoryName,
    Map categoryMap) throws ContentDBException {
    System.out.println("**** : ApplyingCategories: starting");
    FdkCredential credential = new SimpleFdkCredential(username, password);
    ManagersFactory session = null;
    try {
    session = ManagersFactory.login(credential, contentDBURL);
    FileManager fileM = session.getFileManager();
    Item folder = null;
    try {
    Item sandbox = fileM.resolvePath(sandboxRootPath, null);
    // Note: some clients may use the term 'Library' when referring to
    // or displaying a Workspace Item (including the Content DB Web UI).
    //for now I am hardcoding the values
    Item workspace = (sandbox == null) ? null : fileM.resolveRelativePath(sandbox.getId(), "CUSTOMERS", null);
    folder = (workspace == null) ? null : fileM.resolveRelativePath( workspace.getId(), "COOLEZ/IMAGES/2009/04/", null);
    catch (FdkException e) {
    System.out.println("**** : Error locating metadata folder.");
    throw e;
    if (folder == null) {
    throw new ContentDBException("**** : Required metadata folder missing. Ensure prerequisite sample has been run.");
    CommonManager commonM = session.getCommonManager();
    AttributeRequest[] requestedAttributes = AttributeRequests.ITEM_CATEGORY_CONFIGURATION;
    folder = commonM.getItem(folder.getId(),requestedAttributes);
    Item categoryConfiguration = (Item) CommonUtils.getAttribute(folder, Attributes.CATEGORY_CONFIGURATION);
    Map m = CommonUtils.getAttributesMap(categoryConfiguration);
    boolean configEnabled = ((Boolean) m.get(Attributes.CONFIGURATION_ENABLED)).booleanValue();
    Item[] requiredCategories = (Item[]) m.get(Attributes.REQUIRED_CATEGORIES);
    if (configEnabled = false ||
    requiredCategories == null ||
    requiredCategories.length != 1) {
    System.out.println("**** : Category configuration settings unexpected. Has prerequisite samples been run?");
    throw new ContentDBException("Category configuration settings unexpected.");
    requestedAttributes = AttributeRequests.CATEGORY_CLASS_ATTRIBUTES;
    Item catClass = commonM.getItem(requiredCategories[0].getId(), requestedAttributes);
    String displayName = (String) CommonUtils.getAttribute(catClass, Attributes.DISPLAY_NAME);
    if (!displayName.equals(categoryName)) {
    System.out.println("**** : Category configuration settings unexpected. Has prerequisite samples been run?");
    throw new ContentDBException ("Category configuration settings unexpected.");
    // get category metadata attribute internal names from the
    // metadata attribute display names
    // when creating a category instance definition, we specify internal names
    String categoryKeyItems[] = new String[categoryMap.size()];
    Set setObj = categoryMap.keySet();
    Iterator iterObj = setObj.iterator();
    int i = 0;
    while (iterObj.hasNext()) {
    categoryKeyItems[i] = (String) iterObj.next();
    i++;
    Map attributeMap = CategoryUtils.getCategoryAttrInternalNames(session,
    catClass.getId(),
    categoryKeyItems);
    if (attributeMap == null ||
    attributeMap.isEmpty() ) {
    System.out.println("**** : Category class structure invalid.");
    throw new ContentDBException ("Metadata configuration of the required Category class is invalid. Suggested resolution is to drop and recreate category class.");
    requestedAttributes = null;
    Item docDef = fileM.createDocumentDefinition(new NamedValue[] {
    ClientUtils.newNamedValue(Attributes.NAME, sourceFilename),
    ClientUtils.newNamedValue(Options.CONTENTSTREAM,
    sourceFileInputStream)
    }, requestedAttributes);
    // First attempt to createDocument in the enforced metadata folder without
    // supplying a category instance definition.
    // If the enforced metadata folder has been setup correctly, an
    // FdkException with error code ORACLE.FDK.AggregateError will occur
    // containing an FdkExceptionEntry with errorcode ORACLE.FDK.MetaDataError
    // and detailed error code ORACLE.FDK.MetadataRequired. The info
    // NamedValue[] of the FdkExceptionEntry should have a key
    // ECM.EXCEPTIONINFO.MissingMetaData with a long[] value containing the
    // ids of the mandatory category classes for which definition were
    // not supplied.
    Item doc = null;
    NamedValue[] documentDef = new NamedValue[] {
    ClientUtils.newNamedValue(Options.USE_SAVED_DEFINITION,new Long(docDef.getId())),
    ClientUtils.newNamedValue(Options.DESTFOLDER, new Long(folder.getId())),
    try {
    // The following call should FAIL !!! - and exception be caught in
    // catch block
    doc = fileM.createDocument(documentDef, null, null);
    // The following calls should never occur ...
    System.out.println("**** : Document create succeeded.");
    System.out.println("**** : Are there no longer required categories on the folder?");
    catch (FdkException fe) {
    System.out.println("**** : Document create failed (which is what we expected).");
    System.out.println("**** : " + fe);
    // Next, attempt to retry createDocument in the enforced metadata folder
    // this time supplying a category instance definition for the mandatory
    // category class. The advantage of utilizing document definitions is
    // that the content does not need to be reuploaded. The document
    // definition can be reused when retrying the failed operation.
    NamedValue[] categoryInstanceAttributes = new NamedValue[categoryKeyItems.length];
    for (int x=0; x < categoryKeyItems.length; x++) {
    categoryInstanceAttributes[x] = (NamedValue) categoryMap.get(categoryKeyItems[x]);
    NamedValue[] categoryDef = new NamedValue[] {
    ClientUtils.newNamedValue(Options.CATEGORY_CLASS_ID,
    new Long(catClass.getId())),
    ClientUtils.newNamedValue(Options.CATEGORY_DEFINITION_ATTRIBUTES,
    categoryInstanceAttributes)
    documentDef = new NamedValue[] {
    ClientUtils.newNamedValue(Options.USE_SAVED_DEFINITION,new Long(docDef.getId())),
    ClientUtils.newNamedValue(Options.DESTFOLDER, new Long(folder.getId())),
    ClientUtils.newNamedValue(Options.CATEGORY_DEFINITION, categoryDef)
    System.out.println("**** : Create a Document using saved definition item ...");
    requestedAttributes = AttributeRequests.DOCUMENT_CATEGORY_ATTRIBUTES;
    doc = fileM.createDocument(documentDef, null, requestedAttributes);
    catch (Throwable t)
    t.printStackTrace();
    finally
    CommonUtils.bestEffortLogout(session);
    System.out.println("**** : ApplyingCategories: done");
    }

    I finally got the code working that uploads a file with the attached catogory values. The problem was the internalAttributeMap that had to be created with CategoryUtils.getCategoryAttrInternalNames
    I will post the code later with some cleanup. The documentation is not very friendly. The example code is very confusing. I don't have any books on it and I didn't go to any of Oracle's training either.
    Do you guys know of any good books, sites or blogs on development with Cotnent DB?

  • GP: Creation of process for uploading file with approval or a rejection

    Problem: It is necessary to organise process of uploading files in KM repository with approval or a rejection.
    I have created process with two callable objects.
    1. File Input
    2. Interactive Form/File Approval
    Has grouped structure "File"
    In Runtime, during object performance "Interactive Form/File Approval" there is an error:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode
    It is one problem, the second problem consists in that how to organise a folder choice where the file will be loaded.

    Hi Pustovoytov Stanislav ,
    Check whether if the context attribute pdfsource is of binary type or any other type. It sbould be of binary type.
    And about the second one you can organize the folder structure in the KM administration.
    Thanks
    Satya

  • Powershell: How do I upload files with metadata from a manifest file?

    I am using the script from this blog to try to upload files into SharePoint, using a manifest file to specify the metadata associated with each file. Right now, the script works, but is not populating
    the metadata from the manifest (xml) file. When I write the $metadataManifest variable out to the console, I get the contents of my xml file, so the code is reading the file when it should. However when it gets to the line in bold ($metadataManifest.Columns.Column),
    it does not go into that block...it just skips on to checkin the file. Again the $metadataManifest variable shows all the content in my xml manifest file. Here is what the script looks like...
    #Get web and document library objects
    $web = Get-SPWeb "http://companySite"
    $Library = "My Library"
    $docLibrary = $web.Lists[$Library]
    $ManifestFilePath = "C:\PowerShellScripts\Manifest.xml"
    $LocalPath = "C:\Upload\Test Upload\My Upload Directory\"
    if ($ManifestFilePath)
    $metadataManifest = (Get-Content ($ManifestFilePath))
    write-host "Manifest file: " $metadataManifest
    else
    write-host "Manifest file not specified for categorising uploaded documents"
    #Check for the LibraryStartFolder parameter to specify a root folder
    if ($PSBoundParameters.ContainsKey('LibraryStartFolder')) {
    $folder = $web.GetFolder($docLibrary.Title + $LibraryStartFolder)
    else
    $folder = $docLibrary.RootFolder
    #Attach to local folder and enumerate through all files
    if($IncludeSubFolders) {
    $files = Get-ChildItem $LocalPath -Recurse
    else
    $files = Get-ChildItem $LocalPath
    $files | ForEach-Object {
    #Check if the object is a folder - if so, create it in doc library
    if ($_.PSIsContainer) {
    if (($IncludeSubFolders) -and (!$FlattenStructure)) {
    #Generate folder path for creation in SharePoint
    #by looking at the parent folder on the local path
    $spFolderPath = ($_.Parent.FullName.Replace($LocalPath,"")).Replace("\","/")
    #Get the folder into which the new folder will be created
    #by adding the folder path generated above, if one existed
    if ($spFolderPath -eq "") {
    $currentFolder = $web.GetFolder($folder.Url)
    else
    $currentFolder = $web.GetFolder($folder.Url + $spFolderPath)
    #Check to see if subfolder already exists
    #and create it if not
    $testFolder = $currentFolder.SubFolders[$_.Name]
    if ($testFolder -eq $null) {
    write-host "`nAdding folder" $_.Name "to" $docLibrary.Title "in" $web.Title "..." -foregroundcolor Green
    $newFolder = $currentFolder.SubFolders.Add($_.Name)
    else
    write-host "`nFolder" $_.Name "already exists in" $docLibrary.Title "and shall not be created" -foregroundcolor Red
    else
    #Generate file path for upload into SharePoint
    if ($FlattenStructure) {
    $spFilePath = ("/" + $_.Name)
    else
    $spFilePath = ($_.FullName.Replace($LocalPath,"")).Replace("\","/")
    $spFullPath = $folder.Url + "/" + $spFilePath
    #Check if the file exists and the overwrite option is selected before adding the file
    if ((!$web.GetFile($spFullPath).Exists) -or ($Overwrite)) {
    #Add file
    write-host "`nCopying" $_.Name "to" $spFullPath.Replace("/" + $_.Name,"") "in" $web.Title "..." -foregroundcolor Green
    $spFile = $folder.Files.Add($spFullPath, $_.OpenRead(), $true)
    #$spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    #Walk through manifest XML file and configure column values on the file
    $metadataManifest.Columns.Column | ForEach-Object {
    #Single value text columns
    try
    if (($_.Type -eq "Text") -or
    ($_.Type -eq "Choice") -or
    ($_.Type -eq "Boolean") -or
    ($_.Type -eq "Number") -or
    ($_.Type -eq "Currency")) {
    $columnName = $_.Name
    write-host "Setting value on column"$columnName "..." -foregroundcolor Blue
    $_.Values.Value | ForEach-Object {
    $spItem[$columnName] = $_
    write-host "Value set to"$_
    catch {}
    #Multiple line text column
    try
    catch {}
    #Multiple choice columns
    try
    catch {}
    #Hyperlink columns
    try
    catch {}
    #Single User column
    try
    catch {}
    #Multiple User column
    try
    catch {}
    #Single value Managed Metadata column
    try
    catch {}
    #Multi value Managed Metadata column
    try
    catch {}
    #Update document with new column values
    $spItem.SystemUpdate($false)
    #Check in file to document library (if required)
    #MinorCheckIn=0, MajorCheckIn=1, OverwriteCheckIn=2
    if ($CheckIn) {
    if ($spFile.CheckOutStatus -ne "None") {
    $spFile.CheckIn("File copied from " + $filePath, 1)
    write-host $spfile.Name"checked in"
    #Approve file (if required)
    if ($Approve) {
    if ($spItem.ListItems.List.EnableModeration -eq $true) {
    $spFile.Approve("File automatically approved after copying from " + $filePath)
    if ($spItem["Approval Status"] -eq 0) { write-host $spfile.Name"approved" }
    else
    write-host "`nFile"$_.Name "already exists in" $spFullPath.Replace("/" + $_.Name,"") "and shall not be uploaded" -foregroundcolor Red
    $web.Dispose()
    And here is what the manifest file looks like...
    <?xml version="1.0" encoding="utf-8"?>
    <Columns>
    <Column Name="Column1" Type="Text">
    <Values>
    <Value>First File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Column1" Type="Text">
    <Values>
    <Value>Second File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>9876</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data2</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More more Data</Value>
    </Values>
    </Column>
    </Columns>
    I can't figure out what am doing wrong...why my script is not iterating through the manifest file to upload the document along with the metadata. I would really appreciate any help. Thanks

    Hi Spawn,
    Name should not be a problem.. I will probably post you the entire code (I modified it to meet your goals for having multiple column xml nodes as well)
    For the code snippet below:
    a. In powershell all my changes will have ## prefixed comments
    b. in XML I have changed one column name to "Name" to replicate your case and also added a parent node for making the xml well formed.
    and the SharePoint output
    Please see the code below
    $web = Get-SPWeb "http://intranet/sites/test"
    $Library = "My Library"
    $docLibrary = $web.Lists[$Library]
    $ManifestFilePath = "D:\Manifest.xml"
    $LocalPath = "D:\UploadPath\"
    if ($ManifestFilePath)
    ##read the xml file as an xml object
    [xml]$metadataManifest = (Get-Content ($ManifestFilePath))
    write-host "Manifest file: " $metadataManifest
    else
    write-host "Manifest file not specified for categorising uploaded documents"
    #Check for the LibraryStartFolder parameter to specify a root folder
    if ($PSBoundParameters.ContainsKey('LibraryStartFolder')) {
    $folder = $web.GetFolder($docLibrary.Title + $LibraryStartFolder)
    else
    $folder = $docLibrary.RootFolder
    #Attach to local folder and enumerate through all files
    if($IncludeSubFolders) {
    $files = Get-ChildItem $LocalPath -Recurse
    else
    $files = Get-ChildItem $LocalPath
    $counter=0
    $files | ForEach-Object {
    #Check if the object is a folder - if so, create it in doc library
    if ($_.PSIsContainer) {
    if (($IncludeSubFolders) -and (!$FlattenStructure)) {
    #Generate folder path for creation in SharePoint
    #by looking at the parent folder on the local path
    $spFolderPath = ($_.Parent.FullName.Replace($LocalPath,"")).Replace("\","/")
    #Get the folder into which the new folder will be created
    #by adding the folder path generated above, if one existed
    if ($spFolderPath -eq "") {
    $currentFolder = $web.GetFolder($folder.Url)
    else
    $currentFolder = $web.GetFolder($folder.Url + $spFolderPath)
    #Check to see if subfolder already exists
    #and create it if not
    $testFolder = $currentFolder.SubFolders[$_.Name]
    if ($testFolder -eq $null) {
    write-host "`nAdding folder" $_.Name "to" $docLibrary.Title "in" $web.Title "..." -foregroundcolor Green
    $newFolder = $currentFolder.SubFolders.Add($_.Name)
    else
    write-host "`nFolder" $_.Name "already exists in" $docLibrary.Title "and shall not be created" -foregroundcolor Red
    else
    #Generate file path for upload into SharePoint
    if ($FlattenStructure) {
    $spFilePath = ("/" + $_.Name)
    else
    $spFilePath = ($_.FullName.Replace($LocalPath,"")).Replace("\","/")
    $spFullPath = $folder.Url + "/" + $spFilePath
    #Check if the file exists and the overwrite option is selected before adding the file
    if ((!$web.GetFile($spFullPath).Exists) -or ($Overwrite)) {
    #Add file
    write-host "`nCopying" $_.Name "to" $spFullPath.Replace("/" + $_.Name,"") "in" $web.Title "..." -foregroundcolor Green
    $spFile = $folder.Files.Add($spFullPath, $_.OpenRead(), $true)
    #$spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    ## ensure we pick the corresponding node in the columns xml (first file, first xml node, second file - second node likewise)
    #Walk through manifest XML file and configure column values on the file
    $metadataManifest.FileData.Columns[$counter].Column | ForEach-Object {
    #Single value text columns
    try
    if (($_.Type -eq "Text") -or
    ($_.Type -eq "Choice") -or
    ($_.Type -eq "Boolean") -or
    ($_.Type -eq "Number") -or
    ($_.Type -eq "Currency")) {
    $columnName = $_.Name
    write-host "Setting value on column"$columnName "..." -foregroundcolor Blue
    $_.Values.Value | ForEach-Object {
    $spItem[$columnName] = $_
    write-host "Value set to"$_
    catch {}
    #Multiple line text column
    try
    catch {}
    #Multiple choice columns
    try
    catch {}
    #Hyperlink columns
    try
    catch {}
    #Single User column
    try
    catch {}
    #Multiple User column
    try
    catch {}
    #Single value Managed Metadata column
    try
    catch {}
    #Multi value Managed Metadata column
    try
    catch {}
    #Update document with new column values
    $spItem.SystemUpdate($false)
    ##increment the counter to read the next xml node
    $counter++
    #Check in file to document library (if required)
    #MinorCheckIn=0, MajorCheckIn=1, OverwriteCheckIn=2
    if ($CheckIn) {
    if ($spFile.CheckOutStatus -ne "None") {
    $spFile.CheckIn("File copied from " + $filePath, 1)
    write-host $spfile.Name"checked in"
    #Approve file (if required)
    if ($Approve) {
    if ($spItem.ListItems.List.EnableModeration -eq $true) {
    $spFile.Approve("File automatically approved after copying from " + $filePath)
    if ($spItem["Approval Status"] -eq 0) { write-host $spfile.Name"approved" }
    else
    write-host "`nFile"$_.Name "already exists in" $spFullPath.Replace("/" + $_.Name,"") "and shall not be uploaded" -foregroundcolor Red
    $web.Dispose()
    and the xml file
    <?xml version="1.0" encoding="utf-8"?>
    <FileData>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>First File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Second File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Third File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Fourth File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Fifth File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    </FileData>
    Thanks and Regards,
    Partha
    AvePoint

  • Problem in Uploading Files with Categories

    Hi All,
    We are working on uploading files to Content Database(CDB) after creating categories for all files to be uploaded individually. The code is working fine when we are using FdkConstants.ATTRIBUTE_TYPE_STRING for Attributes.ATTRIBUTE_TYPE while creating named-value pair for categoryAttributes. In this case all the files are uploading with category.
    But the problem we are facing is, when we use datatype other than STRING for FdkConstants like FdkConstants.ATTRIBUTE_TYPE_INTEGER, or FdkConstants.ATTRIBUTE_TYPE_BINARY…….. category sub class is not creating, and getting errors like
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
    faultActor:
    faultNode:
    faultDetail:
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="xsd:string">ORACLE.FDK.MetadataOperationFailed</detailedErrorCode><errorCode xsi:type="xsd:string">ORACLE.FDK.MetaDataError</errorCode><exceptionEntries xsi:type="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1:ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:string"/>
         {http://xml.apache.org/axis/}hostname:bluejays.appsassociates.com
    ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
         at oracle.ifs.fdk.FdkException.getDeserializer(FdkException.java:270)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
         at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
         at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
         at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:324)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:291)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:207)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at oracle.ifs.fdk.CategoryManagerSoapBindingStub.createCategorySubClass(CategoryManagerSoapBindingStub.java:611)
         at oracle.ifs.fdk.client.impl.CategoryManagerProxy.createCategorySubClass(CategoryManagerProxy.java:100)
         at scheduleUpload.AarlmsUpload.createCategory(AarlmsUpload.java:851)
    Can anyone please solve our problem why this is happening? Please give solution as early as possible.
    Thanks in advance
    Eswari

    Hi Shashikumar,
    Can i have your mail id.
    I have some documents on bid process.
    Best Regards,
    Anil Rajpal

  • Upload file with dynamic columns

    Hi,
    My requirement is, I have to upload a file with number of columns being dynamic.
    My Input file column number can vary based on the input data. For one entry it can have 10 columns of input and for another entry it can have just 5. First few columns are common for all entries and then from one particular column the next columns can vary based on the input data.
    I have come across FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' , but for this FM we have to pass the scope of the excel, like the column and row details which is not the required thing in my case.
    Please let me know as to how to achieve the requirement of uploading a file with he number of columns varying.
    Thanks in advance.
    Regards,
    Dedeepya Thota

    Hi,
    Your saying in you excel sheet your entering the details.
    As you said, Suppose your data is 5 columns. And each entry various
    there are 3 records in excel sheet
    one entry contains 5 columns of data
    second entry contains only 2 columns of data
    third entry contains 4 columns of data
    As shown below
    Column1   Column2   Column3  Column4  Column5
      100       AA      AA1         AA2        AA3
      200       BB       BB2      
      300       CC       CC2           CC3
    Now your excel sheet contains data as shown above.
    When you upload this file to your internal table 3 entries will be uploaded and every column contains according to that column value in itab.
    In this case record second entry column3 contains value BB2 will store in itab-column3, But as per our requirement it should store in itab-column4. Same will happen for third entry also.
    In above case you report will not work.
    So wat you have to do is, definatly we know there is some maximum colums in entries.
    You fix for that maximum no.columns in excel and declare your itab.
    In excel you maintian the values according to the columns value which has to maintian.
    For example like below.
    Column1   Column2   Column3  Column4  Column5
      100        AA       AA1         AA2        AA3
      200        BB                        BB2
      300        CC                        CC2        CC3
    If some columns are not having data that will be empty. It wont be any problem. Just you have to maintain your template for data
    and according to your template you have declare itab in your report.
    Regards,
    Shankar.

  • S3 backup can't upload files with apostrophe​s in the name

    s3 backup doesn't seem to be able to upload any file with an apostrophe in the name.  I see a load of "Unable to upload 'foo bar's.file' to Amazon S3" warnings in the event log.  The log is littered with file names that contain an apostrope.  This seems to be the thing that stands out in common with all of the failed transfers.  Is there some way to workaround the problem besides renaming all files containing apostropes?
    It seems like an easy fix to properly escape single quotes in the name for upload though, but I suppose that I'll need a firmware fix for a change like that.

     Hello spitzcor
    Have you checked your Amazon S3 account to see if the files have actually uploaded to the bucket or if they did indeed fail to upload?
    I also recommend that you contact support to have an incident created.  There is a hotfix for 4.1.108 that updates the Amazon S3 applications API version and might help with what you are experiencing, although it is intended for a seperate Amazon S3 issue.
    LenovoEMC Contact Information is region specific. Please select the correct link then access the Contact Us at the top right:
    US and Canada: https://lenovo-na-en.custhelp.com/
    Latin America and Mexico: https://lenovo-la-es.custhelp.com/
    EU: https://lenovo-eu-en.custhelp.com/
    India/Asia Pacific: https://lenovo-ap-en.custhelp.com/
    http://support.lenovoemc.com/

  • Problem upload file with ftp

    Hi,
    I'd like to upload a file with an ftp. I declared a method using an url as follow :
    public static void uploadFile(File fileToMove_p, String newFileName_p) {
    try {
    URL url_l = new URL("ftp://[uid]:[pwd]@localhost/" + newFileName_p);
    URLConnection connection_l = url_l.openConnection();
    OutputStream output_l = connection_l.getOutputStream();
    BufferedOutputStream bos = new BufferedOutputStream(output_l);
    BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fileToMove_p));
    int i;
    while ((i = bis.read()) != -1) {
    bos.write(i);
    catch (IOException ex) {}
    But when I oppen my new file, it miss the end of my data. The ftp cut the few last line of my original file.
    Any idear of what is happening here and how I can solve the problem ?
    Thanks

    Are you closing the OutputStream? If not, you probably should, and closing the stream will flush it prior to closing.
    HTH,
    &#167;

Maybe you are looking for

  • Will Not Sleep In Energy Saver Mode

    My iMac G5 20" 1.8Ghz will not sleep when I set it to sleep in the energy saver panel. This just started for no specific reason a few months ago. It will sleep fine when selected from the Apple menu. I have been through the discussions and no one see

  • Using Search Feature

    I have a brand new black Classic and used the Search feature for the first time to find a song/artist and ran into a problem that baffled me. I was looking for "Rock the Boat" by "The Hues Corporation". I first searched for "HUES" and it returned not

  • Hyperlink not working at BO XI R3

    Hello I made a very simple hyperlink but its is not working. I am trying to get it work from last 2-3 days but not sure what is wrong. It would be a gr8 help someone can help me out. I am using ="<a href=\"../../opendoc/openDocument.jsp?iDocID=74150&

  • Is there a BAPI for updating hundreds of HR roles (P_ORGIN)?

    I need for hundreds of HR roles that have P_ORGIN auth. object to copy the P_ORGIN object to P_ORGINCON object. As PFCG is an enjoy SAP tx, I cannot do BDC and I am wondering if there is a BAPI to do this process. Thanks.

  • Transmit BPSK from a text file in LabView; enable 8-bit IQ mode

    Hello, I have a BPSK sequence I'd like to transmit, and it is stored as a spreadsheet of -1's and 1's. Adapting one of the niUSRP example VI's, I made this folllowing code.  Currently it does not work, because the while loop doesn't transmit the arra