Problems checking in files to DMS

Hi DMS gurus,
I have some questions regarding the checking in files to SAP DMS. Any help would be very much appreciated.  
1. Ideally, I need to check in a binary table with the file content directly to DMS.  Is it possible? I am trying to use CVAPI_DOC_CHECKIN with PF_CONTENT_PROVIDE = 'TBL', but it doesn't work because there is no path for the file name in PT_FILES_X since I do not have a file, just a binary table.
2. How to automatically delete the file from the source after it's been checked in? The checkbox "Delete file after check-in" is marked in configuration for WS application, but the source file is not getting deleted.
3. How to check in the file from Application server using BAPI_DOCUMENT_CHECKIN2? The HOSTNAME requires the network address, but how to configure it. In SPRO I found network addresses for Data carriers. Not sure if it's the place.
Thank you

Hi DMS gurus,
I have some questions regarding the checking in files to SAP DMS. Any help would be very much appreciated.  
1. Ideally, I need to check in a binary table with the file content directly to DMS.  Is it possible? I am trying to use CVAPI_DOC_CHECKIN with PF_CONTENT_PROVIDE = 'TBL', but it doesn't work because there is no path for the file name in PT_FILES_X since I do not have a file, just a binary table.
2. How to automatically delete the file from the source after it's been checked in? The checkbox "Delete file after check-in" is marked in configuration for WS application, but the source file is not getting deleted.
3. How to check in the file from Application server using BAPI_DOCUMENT_CHECKIN2? The HOSTNAME requires the network address, but how to configure it. In SPRO I found network addresses for Data carriers. Not sure if it's the place.
Thank you

Similar Messages

  • Problem Checking if File Exists When App is Launched

    I'm developing an app which checks a file "lastuser.txt" to determine which database to open, as sometimes people share phones. Anyway, I'm trying to call  TryGetItemAsync() in the OnLaunched() section in App.xaml.cs but I get the message
    "The name 'TryGetItemAsync' does not exist in the current context".  I am new to C# and phone app development. Any help would be greatly appreciated. Below is my code:
    tia
    CS
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using SQLite;
    using System.Runtime.InteropServices.WindowsRuntime;
    using Windows.Storage;
    using System.Threading.Tasks;
    using System.Diagnostics;
    using Windows.ApplicationModel;
    using Windows.ApplicationModel.Activation;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Media.Animation;
    using Windows.UI.Xaml.Navigation;
    // The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=391641
    namespace BP_Alert
    /// <summary>
    /// Provides application-specific behavior to supplement the default Application class.
    /// </summary>
    public sealed partial class App : Application
    public static string DBPath = string.Empty;
    public static string LastUser = string.Empty;
    public static DateTime Time_Taken { get; set; }
    private TransitionCollection transitions;
    /// <summary>
    /// Initializes the singleton application object. This is the first line of authored code
    /// executed, and as such is the logical equivalent of main() or WinMain().
    /// </summary>
    public App()
    this.InitializeComponent();
    this.Suspending += this.OnSuspending;
    /// <summary>
    /// Invoked when the application is launched normally by the end user. Other entry points
    /// will be used when the application is launched to open a specific file, to display
    /// search results, and so forth.
    /// </summary>
    /// <param name="e">Details about the launch request and process.</param>
    protected async override void OnLaunched(LaunchActivatedEventArgs e)
    #if DEBUG
    if (System.Diagnostics.Debugger.IsAttached)
    this.DebugSettings.EnableFrameRateCounter = true;
    #endif
    Frame rootFrame = Window.Current.Content as Frame;
    // Do not repeat app initialization when the Window already has content,
    // just ensure that the window is active
    if (rootFrame == null)
    // Create a Frame to act as the navigation context and navigate to the first page
    rootFrame = new Frame();
    // TODO: change this value to a cache size that is appropriate for your application
    rootFrame.CacheSize = 1;
    if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
    // TODO: Load state from previously suspended application
    DBPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
    LastUser = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path,"LastUser.txt");
    bool result = await TryGetItemAsync(LastUser); <--Error!!!!!!!!!!!!!!!
    // Place the frame in the current Window
    Window.Current.Content = rootFrame;

    It seems that TryGetItemAsync is a method on a StorageFolder, so you will need to do something like:
    myStorageFolder.TryGetItemAsync(LastUser);
    See here:
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.storagefolder.trygetitemasync.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1
    If you go to that link and scroll down to the bottom of the page, it says:
    Minimum supported phone
    None supported

  • Problem with Local File Identification in RFC

    Dear all,
    We are working on a scenario where we have to integrate an external application with SAP system. The external application would use SAP DMS as document repository; It will send us a local file path and we have to upload the document located in that path as an attachment to a DMS Document Info Record. We have designed a wrapper RFC for this purpose, which encapsulates the standard Fm BAPI_DOCUMENT_CREATE2. This BAPI takes a file path input under table parameter DOCUMENTFILES. Problem is, when we are running the RFC from SAP GUI, the document info record is created correctly with the document as attachment, but when we invoke the RFC from the external application, the process fails and we get an error message stating:"Error while checking in Original Files". We debugged the scenario and found out that, while running under SAP GUI, the BAPI is able to identify a GUI Link, and hence succeeds; but while calling from the external application, the BAPI fails to find a GUI Link, tries to start a FTP Server using RFC Destination SAPFTP, and fails. So, obviously, the BAPI is not able to parse the local file path because of non-existence of GUI Link. So,in this regard, my question is: is there no way that we can pass a local file path from an external application to SAP, and get the same identified and get the document uploaded? Is there any alternative to our approach?
    Awaiting answers.
    Regards,
    Sid

    Solved the problem by:
    Converting file content to binary->transferring binary content to a wrapper RFC->writing the content into a temporary file in application server->then calling BAPI_DOCUMENT_CREATE2 to create the document without attachment->then calling CVAPI_DOC_CHECKIN to checkin the temporay file from application server.
    Related references:
    http://wiki.sdn.sap.com/wiki/display/PLM/DMSandbackground+processing
    https://websmp130.sap-ag.de/sap/support/notes/504692
    How to upload file from Web Dynpro into R/3 (BAPI_DOCUMENT_CREATE2)
    Thanks to All who have contributed to the Solution.
    Sincere Regards,
    Sid

  • Internal error has occurred. Check log files for details.

    While configuring software library on OEM 11g grid control, i get the error as Internal error has occurred. Check log files for details.
    On checking emoms.trc i see the following error
    2011-08-08 22:15:13,298 [EMUI_22_15_13_/console/provision/admin/admin] ERROR em.provis
    ion checkAllSoftwareLibLocs.216 - AdminUtil:checkAllSoftwareLibLocs: No software libra
    ry locations configured.
    2011-08-08 22:15:13,320 [EMUI_22_15_13_/console/provision/admin/admin] ERROR em.provis
    ion handleValidateLocsSoftwareLib.1754 - AdminController:handleValidateLocsSoftwareLib
    : ComponentException while fetching all software library locations from repostiory.
    oracle.sysman.emgc.provision.component.ComponentException: Software Library location i
    s not configured.
    at oracle.sysman.emgc.provision.ui.model.admin.AdminUtil.checkAllSoftwareLibLo
    cs(AdminUtil.java:218)
    at oracle.sysman.emgc.provision.ui.model.admin.AdminUtil.checkAllSoftwareLibLo
    cs(AdminUtil.java:146)
    at oracle.sysman.emgc.provision.ui.controller.admin.AdminController.handleVali
    dateLocsSoftwareLib(AdminController.java:1746)
    at oracle.sysman.emgc.provision.ui.controller.admin.AdminController.handleEven
    t(AdminController.java:397)
    at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:578)
    at oracle.sysman.emgc.provision.ui.controller.AbstractProvisioningPageHandler.
    handleRequest(AbstractProvisioningPageHandler.java:235)
    at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:738)
    at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:329)
    at oracle.sysman.eml.app.Console.doGet(Console.java:352)
    at oracle.cabo.servlet.UIXServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubS
    ecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelp
    er.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:311)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.core.app.exception.EMRuntimeExceptionFilter.doFilter(EMRuntim
    eExceptionFilter.java:58)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.jav
    a:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.ja
    va:122)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emSDK.svlt.EMRedirectFilter.doFilter(EMRedirectFilter.java:10
    2)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:502
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.
    java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(
    WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubje
    ct.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServlet
    Context.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext
    .java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:14
    32)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    2011-08-08 22:24:58,397 [EMUI_22_24_58_/console/provision/admin/edit_sw_lib_dir_config
    uration] ERROR svlt.PageHandler handleRequest.640 - java.lang.NoClassDefFoundError: Co
    uld not initialize class oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps
    java.lang.NoClassDefFoundError: Could not initialize class oracle.sysman.oii.oiip.osd.
    unix.OiipuUnixOps
    at oracle.sysman.oii.oiip.oiipg.OiipgFileSystem.getVolumeName(OiipgFileSystem.
    java:615)
    at oracle.sysman.eml.swlib.bitstore.FileBitStore.getFreeSpaceInKB(FileBitStore
    .java:1044)
    at oracle.sysman.eml.swlib.LibraryServiceImpl.getFreeSpaceInKB(LibraryServiceI
    mpl.java:1572)
    at oracle.sysman.emgc.provision.impl.component.SoftwareLibraryImpl.getFreeSpac
    eInKB(SoftwareLibraryImpl.java:2582)
    at oracle.sysman.emgc.provision.impl.component.ComponentManagerImpl.getFreeSpa
    ceInKB(ComponentManagerImpl.java:664)
    at oracle.sysman.emgc.provision.ui.model.admin.SoftwareLibContext$OkButton.han
    dleClickEvent(SoftwareLibContext.java:860)
    at oracle.sysman.emgc.provision.ui.controller.AbstractProvisioningPageHandler.
    handleEvent(AbstractProvisioningPageHandler.java:427)
    at oracle.sysman.emgc.provision.ui.controller.admin.SoftwareLibController.hand
    leEvent(SoftwareLibController.java:53)
    at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:578)
    at oracle.sysman.emgc.provision.ui.controller.AbstractProvisioningPageHandler.
    handleRequest(AbstractProvisioningPageHandler.java:235)
    at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:738)
    at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:329)
    at oracle.sysman.eml.app.Console.doGet(Console.java:352)
    at oracle.cabo.servlet.UIXServlet.doPost(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubS
    ecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelp
    er.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:311)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.core.app.exception.EMRuntimeExceptionFilter.doFilter(EMRuntim
    eExceptionFilter.java:58)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.jav
    a:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.ja
    va:122)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emSDK.svlt.EMRedirectFilter.doFilter(EMRedirectFilter.java:10
    2)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:502
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.
    java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(
    WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubje
    ct.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServlet
    Context.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext
    .java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:14
    32)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Hi, I followed all the steps correctly and also the owner of the directory is correct.
    But i have not installed the patches which is listed at the bottom of the link page.
    I had done this on RHEl and i had no problem but now i am getting problem on solaris.

  • Using a URL as the original application file in DMS/KPRO

    DMS and KPRO
    Has anyone had any experience with creating a DIR that points to a document stored on another server via a URL.  Such that the original document is not physically checked into the DMS vault.  When I enter the URL as the orginal application file the DMS checks the file into the vault and the URL is lost.  Is there possibly a better way to try and reference the URL so that I can get to the document and utilize the functions/features I need from SAP?
    Thank you for replying in advance.

    Hello,
    I've followed the thread because we have the same problem. We made all the suggested changes but unfortunately we were not able to add URLs as original applications. We received an error message - which does not say much: "E:26:504 com URL". After some debugging we found out, that the URL http://www.sap.com was treated as a file with the extension .com -> this resulted in the error message. We've made a number of screenshots, with all our customization settings. Can you tell us what to do to add URLs.
    http://www.palfinger.com/exchange/files/download/sap/20071009_ws_application.png
    http://www.palfinger.com/exchange/files/download/sap/20071009_ws_application_settings.png
    http://www.palfinger.com/exchange/files/download/sap/20071009_data_carrier.png
    http://www.palfinger.com/exchange/files/download/sap/20071009_data_carrier_settings.png
    http://www.palfinger.com/exchange/files/download/sap/20071009_document_errors.png
    Thanx in advance!

  • Problems with .ARW files and auto toning

    problems with .ARW files and auto toning
    let me try to explain this because this has happened in past and never found a way to resolve but i lived with it
    now that I have a Sony A7R the problem is more serious
    Firstly i take pride it making the picture happen all in camera, i use DRO lvl 5 to get enough light, like when i'm shooting at dusk. DRO its like doing HDR but in a single file, it lightens the darks. in my camera i'm happy with results
    but when I upload them to lightroom, they come out near black.
    allow me to explain
    lets say I import 100 images
    i double check my preferences and everything is UNCHECKED when it comes to importing options, there is no auto toning, nothing.
    as the images import i see a preview in the thumbnail which looks fine.
    i double click on one to enlarge it, hence leave grid view.
    for a brief 1 or 2 seconds, i see the full image in all its glory but than lightroom does something funny, it darkens the image
    one by one as it inspects each image, if it was a DRO image it makes it too dark.
    to make this clear, the image is perfect as it was in the beginning but after a few seconds lightroom for some reason thinks it needs to correct it.
    how to prevent lightroom from doing this, i want the image exactly as it is, why must lightroom apply a correction>?
    i think it has to do something with interpreting the raw file and lightroom applies its own algorithm.
    but here is what i dont get.....before lightroom makes the change i'm able to witness the picture exactly as it was taken and want it unchanged..
    now i have to tweak each file or find a profile for it which is added work.
    any ideas how to prevent lightroom from ruining my images and just leave them as they were when first detected...
    there are 2 phases...one is when it originally imports and they look fine
    second is scanning each image and applying some kind of toning which darkens it too much.
    thanks for the help

    sorry thats the auto reply message from yahoo email.
    i've disabled it now
    thing is, there is no DRO jpg to download from the camera
    its only ARW. so my understanding is when i use DRO setting, the camera makes changes to the ARW than lightroom somehow reads this from the ARW.
    but then sadly reverts it to no DRO settings.
    because i notice if i take normal picture in raw mode its dark but if i apply dro to it, it comes out brighter, yet when i d/l the image from camera to lightroom, which is an ARW - there are no jpgs. lightroom decides to mess it up
    so in reality there is no point in using DRO because when i upload it lightroom removes it.
    is there a way to tell lightroom to preserve the jpg preview as it first sees it.
    its just lame, picture appears perfect...than lightroom does something, than bam, its ruined,.
    what do i need to do to prevent lightroom from ruining the image? if it was good in the first place.

  • Problems while uploading files using the FileReference API

    I've built an image uploader module in Flex using the FileReference API and PHP.
    While this works perfect for images upto 1 MB, What I'm noticing is that for images greater that 1 MB even after the Event.COMPLETE  has triggered, the file hasn't yet been uploaded into the folder.. its only after a couple of seconds or minutes after the Event.COMPLETE,  that the image actually shows up in the FTP folder. Morever I also noticed that for such files the DataEvent.UPLOAD_COMPLETE_DATA that we are using to get feedback from PHP never gets called.
    I thought it would be related to the PHP script getting timed out... but the PHP script does get executed and the images do show up in the folder but thats way after the Event.Complete has been triggered and more importantly  DataEvent.UPLOAD_COMPLETE_DATA doesnt get called.
    Everything seems to work fine as long as the file size is under 1 MB
    Did others too face similar problems and any ideas on how to fix it?
    Thanks in advance

    I don't believe there is, as the browse button renders out as an html input type file component, and this has no ability to get native file size from the client. The only way to do it is to check the file size server side, but that kind of defeats the purpose to some extent, as the file is required to be uploaded before the file size can be checked.
    There is no way to do this on the client short of using a third party client side component - ie. java, flash or some other active component that gets file system level access.
    Ben

  • How to check the file size before loading it to the context

    Hello,
    I have an application to upload a file and write it to the server using the FileUpload UI and IWDResource Interface.
    I would like to limit the size of the file the user is uploading to, say, 2MB.
    The problem is that the current API doesn't allow me to check the file size before I store it in IWDResource. The API available for IWDResource:
    IWDResource resource = ...
    InputStream stream = resource.read(false);
    size = stream.available();
    Is working on the file only AFTER storing it in the context and the server's memory. This way, if a user decides to upload 1GB file for example, he can easily crash the server.
    I am already familiar with <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71">this</a> arcticle but it doesn't answer this question as well, all it does is calculating the file size only after storing it in the context.
    Any ideas...?
    Roy

    Hi Ram,
    Have you activated your Objects ?
    You need to activate your objects in order to see them in RWB.
    Thanks & Regards,
    Varun Joshi

  • Problem with attaching file to Sales Order

    Hello,
    In my company we have the possibility to attach files to sales orders, e.g. pdf files with the printing details.
    These files are added by the GUI user, this works fine.
    Now we have an extra order creation stream in which a pdf file has to be added to the SO without user interaction.
    I found a helpful link ( /people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background )
    This program creates URL links with no problem, but the file generation is not implemented yet.
    I tried to add the file functions to his sample report but still have one problem. The file is uploaded, but not reported as a PDF file in sap. If I select the created attachment SAP allows only the saving of the attachment. After saving the created file is a good PDF file, it opens with PDF-viewers.
    Why does SAP not know this is a PDF file and report it as such (and open the pdf viewer when selected).
    Thanks, Frank.
    source-code:
    REPORT  zzfb_brc                                .
    * Report  Z_RMTIWARI_ATTACH_DOC_TO_BO
    * Written By : Ram Manohar Tiwari
    * Function   : We need to maintain links between Business Object and
    *              the attachment.Attachment document is basiclally a
    *              business object of type 'MESSAGE'.In order to maintain
    *              links, first the attachment will be crated as Business
    *              Object of type 'MESSAGE' using Message.Create method.
    *              Need to check if we can also use FM
    *              'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
    *              than using Message.Create method.
    * I took this program and removed all the parts for adding URL's and
    * notes.
    * Include for BO macros
    INCLUDE : <cntn01>.
    * Load class.
    CLASS cl_binary_relation DEFINITION LOAD.
    CLASS cl_obl_object      DEFINITION LOAD.
    PARAMETERS:
    *  Object_a
       p_botype LIKE obl_s_pbor-typeid DEFAULT 'BUS2032',    "SO
       p_bo_id  LIKE obl_s_pbor-instid DEFAULT '0000757830', "example number
    *  Object_b
       p_docty  LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
       p_msgtyp LIKE sofm-doctp        DEFAULT 'EXT'     NO-DISPLAY,
    *  Relationship
       p_reltyp  LIKE mdoblrel-reltype DEFAULT 'ATTA'.
    TYPES: BEGIN OF ty_message_key,
            foltp     TYPE so_fol_tp,
            folyr     TYPE so_fol_yr,
            folno     TYPE so_fol_no,
            doctp     TYPE so_doc_tp,
            docyr     TYPE so_doc_yr,
            docno     TYPE so_doc_no,
            fortp     TYPE so_for_tp,
            foryr     TYPE so_for_yr,
            forno     TYPE so_for_no,
           END OF ty_message_key.
    DATA : lv_message_key TYPE ty_message_key.
    DATA : lo_message TYPE swc_object.
    DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line,
           ls_doc_content TYPE soli-line.
    * Create an initial instance of BO 'MESSAGE' - to call the
    * instance-independent method 'Create'.
    swc_create_object lo_message 'MESSAGE' lv_message_key.
    * Upload the pdf file, for now from the frontend, in the future from
    * the server.
    DATA:
    *  dsn(40) TYPE C VALUE '/usr/sap/trans/convert/1.pdf', "server location
    l_lines TYPE i. "filelenght
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename   = 'c:t1.pdf'
        filetype   = 'BIN'
      IMPORTING
        filelength = l_lines
      TABLES
        data_tab   = lt_doc_content.
    * no exceptions, the file is there in this example
    break brouwersf.
    ** the coding for the server input, for later
    *OPEN DATASET dsn FOR INPUT IN BINARY MODE.
    *IF sy-subrc <> 0.
    *  EXIT.
    *ENDIF.
    *READ DATASET dsn INTO ls_doc_content.
    *WHILE sy-subrc EQ 0.
    *  APPEND ls_doc_content TO lt_doc_content.
    *  READ DATASET dsn INTO ls_doc_content.
    *ENDWHILE.
    *CLEAR ls_doc_content.
    *CLOSE DATASET dsn.
    * define container to pass the parameter values to the method call
    * in next step.
    swc_container lt_message_container.
    * Populate container with parameters for method
    swc_set_element lt_message_container 'DOCUMENTTITLE' 'Title'.
    swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
    swc_set_element lt_message_container 'NO_DIALOG'     'X'.
    swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
    swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
    swc_set_element lt_message_container 'DocumentSize'    l_lines.
    swc_set_element lt_message_container 'DocumentContent' lt_doc_content.
    swc_call_method lo_message 'CREATE' lt_message_container.
    * Refresh to get the reference of create 'MESSAGE' object for attachment
    swc_refresh_object lo_message.
    * Get Key of new object
    swc_get_object_key lo_message lv_message_key.
    * Now we have attachment as a business object instance. We can now
    * attach it to our main business object instance.
    * Create main BO object_a
    DATA: lo_is_object_a TYPE sibflporb.
    lo_is_object_a-instid = p_bo_id.
    lo_is_object_a-typeid = p_botype.
    lo_is_object_a-catid  = 'BO'.
    * Create attachment BO object_b
    DATA: lo_is_object_b TYPE sibflporb.
    lo_is_object_b-instid = lv_message_key.
    lo_is_object_b-typeid = p_docty.
    lo_is_object_b-catid  = 'BO'.
    *TRY.
    CALL METHOD cl_binary_relation=>create_link
      EXPORTING
        is_object_a = lo_is_object_a
        is_object_b = lo_is_object_b
        ip_reltype  = p_reltyp.
    * Check if everything OK...who cares!!
    COMMIT WORK.

    Hi,
    Welcome to the SDN Forums!!!
    You need to supply the PC file extension in the container element 'DOCUMENTTYPE'.
    swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
    In your case change the above statement as below:
    swc_set_element lt_message_container 'DOCUMENTTYPE' 'pdf'.
    <b>OR</b> change the default value of p_msgtyp to 'PDF'.
    Cheers,
    Ramki Maley.
    Please reward points if the answer is helpful.
    For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    Message was edited by: Ramki Maley

  • Uploading & Downloading Files into DMS Server using Web Dynpro Java

    Hello Friends,
          I want to Upload a file from Portal to Document Management Server and to Download a file from Document Management Server to Portal,  In short, I want to give the user the facility to Upload a File into DMS Sever via Portal and also to download the file from DMS Sever via Portal.
      Can anybody give me a Input for the same from Both Java Development End as well as ABAP End, more inputs are required from ABAP end, since i have a very less ABAP Experience on working with DMS. Few Questions i have in my mind?
    1. How to actually access the file contents with the help of Document Number?
    2. With the help of Doc-Number we can extract the file from DMS sever but to provide a option for downloading in portal, the   RFC should convert the File Contents into X-String or is there some other way?
    +3. While Uploading the Data should be given in Which format to RFC? Are there any limitation with respect to size or formats. Is there any Standard RFC i can use directly in WD4 Java application to upload the file into DMS Server and which will return me the Document Number? +
    Please give me your valuable inputs.
    Thank You.
    Edited by: TusharShinde on Feb 21, 2011 11:13 AM
    Now, I am able to download the File in Portal via my WD4 Java Application from DMS Server by passing the Document Number, but I am facing the problem in downloading the PDF files, Its not working for PDF files. Please give me inputs for the same.
    Thank You.
    Edited by: TusharShinde on Feb 22, 2011 10:13 AM

    HI,
    Thanks for reply.
    I am able to download the file From DMS server but I am still not able to Upload the File to DMS Server via Portal. For Download also it is working for all file formats but not for PDF any specific reason for the same.
    function zhrf_rfc_dms_download_document.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(LV_DOCUMENT) TYPE  DOKNR
    *"  EXPORTING
    *"     VALUE(LV_FADA) TYPE  XSTRING
    *"  TABLES
    *"      LT_DOC STRUCTURE  BAPI_DOC_FILES2
    *"      LT_OUT STRUCTURE  ZST_DMS_FILE_XSTRING
    data: ls_docfiles type bapi_doc_files2,
             ls_dms type dms_doc_files,
             lt_docfiles type standard table of bapi_doc_files2.
    *      data: LT_OUT  type table of  ZST_DMS_FILE_XSTRING.
      data :wa_out like line of lt_out.
      select single * from dms_doc_files
        into ls_dms
        where doknr = lv_document."Retrieve file
      if sy-subrc = 0.
        ls_docfiles-documenttype = ls_dms-dokar.
        ls_docfiles-documentnumber = lv_document.
        ls_docfiles-documentpart = ls_dms-doktl.
        ls_docfiles-documentversion = ls_dms-dokvr.
    *    ls_docfiles-documenttype = '321'.
    *    ls_docfiles-documentnumber = LV_DOCUMENT.
    *    ls_docfiles-documentpart = '000'.
    *    ls_docfiles-documentversion = 'A0'.
      endif.
      call function 'BAPI_DOCUMENT_CHECKOUTVIEW2'
        exporting
          documenttype    = ls_docfiles-documenttype
          documentnumber  = ls_docfiles-documentnumber
          documentpart    = ls_docfiles-documentpart
          documentversion = ls_docfiles-documentversion
          documentfile    = ls_docfiles
          getstructure    = '1'
          getcomponents   = 'X'
          getheader       = 'X'
    *      pf_http_dest    = 'SAPHTTPA'
          pf_ftp_dest     = 'SAPFTPA'
        tables
          documentfiles   = lt_docfiles.
      data: i_bin type standard table of sdokcntbin,
            i_info type standard table of scms_acinf,
            v_info type scms_acinf,
            v_id type sdok_phid,
            v_cat type sdok_stcat.
      if sy-subrc = 0.
        loop at lt_docfiles into ls_docfiles.
          v_id = ls_docfiles-docfile.
          v_cat = ls_docfiles-storagecategory.
          call function 'SCMS_DOC_READ'
            exporting
              stor_cat              = v_cat
              doc_id                = v_id
              phio_id               = ls_docfiles-file_id
            tables
              access_info           = i_info
              content_bin           = i_bin
            exceptions
              bad_storage_type      = 1
              bad_request           = 2
              unauthorized          = 3
              comp_not_found        = 4
              not_found             = 5
              forbidden             = 6
              conflict              = 7
              internal_server_error = 8
              error_http            = 9
              error_signature       = 10
              error_config          = 11
              error_format          = 12
              error_parameter       = 13
              error                 = 14
              others                = 15.
        endloop.
        if sy-subrc <> 0.
        else.
          data: v_xstring type xstring.
          read table i_info into v_info index 1.
          call function 'SCMS_BINARY_TO_XSTRING'
            exporting
              input_length = v_info-comp_size
            importing
              buffer       = v_xstring
            tables
              binary_tab   = i_bin
            exceptions
              failed       = 1
              others       = 2.
          if sy-subrc <> 0.
          endif.
        endif.
        wa_out-file_name =  ls_docfiles-docfile.
        wa_out-binary = v_xstring.
        lv_fada = v_xstring.
        append wa_out to lt_out.
      endif.
    endfunction.
    The above is the RFC Code,  I am using in my WD4Java app for downloading the file From DMS Server, Is there any Improvement suggested for above RFC to make it work in more efficient way. Please give me input for my Upload RFC.
    Thank You.

  • Problem with mp3 files after upgrading to iTunes 8.0

    I have the following problem in iTunes after installing the 8.0 version:
    I have noticed that certain (mp3 in this case) files do not play or download Album Cover from iTMS.
    These files were in normal condition at least 1 day ago, before the update and I can still find them in my iPhone which has not been sync since the iTunes update.
    Things I've done before posting:
    1. Checked the files that they still exist in their original location as they are set in iTunes preferences.
    2. Those files can be played either in Quick Time or in Finder Quick View (and Real Player and VLC).
    3. I have restored the mp3 files from Time Machine but no solution found.
    4. I have backed up and erased and created a new iTunes Library and tried to import them again on an empty library but nothing happened.
    5. The files existed in iTunes (without Artwork which they did have previously) but I could not play them (double-click etc). Then I removed them, I cannot add them again (either by 'Add to Library' or by drag-drop)
    6. Of course, I did a volume repair and permissions repair by booting from the OSX install DVD.
    (edit) 7. I moved the files on my MacBook Pro and tried to add them in the iTunes there (completely empty and different library). This also had no result...
    So after all these, the files are still not accepted in the iTunes but they still exist (and are playable) in my iPhone after yesterday's sync.
    Any ideas? because i'm running short atm
    Message was edited by: Periclesm

    Had the same problem with the new update. I finally got back to my previous version by using system restore. After the restore I had to go to the "All Programs" list and click on Quicktime and iTunes individually to allow them to re-configure, then had to restart the computer again. After that all's well. My lbrary was intact.
    I tried everything to get the newest version to work, including completely uninstalling my current versions of QT and iTunes, then downloading the latest directly from the Apple website, but, after 3 attempts, nothing worked. Guess I'll have to wait for the next update and try again.
    By the way, your library is not actually stored in iTunes--it is stored in your Music folder, so you should not lose anything by uninstalling iTunes if you need to.

  • Problem in Dimension File after securing Dimensions

    Hi,
    Why is there an error message "There is a problem in dimension file : ACCOUNT" in BPC for Excel if i do a "secure" and "R/W" on ACCOUNT dimension?
    Actually this error message seems to happen to every dimension except for "Category" and "Entity", any idea why?
    Cheers

    Hi,
    I do not believe that you can secure the Account dimensoin in BPC 5.1, you should however be able to secure all the other dimensions.
    Can you please check if you have updated your Member Access Profiles after securing a new dimension. You need to add this new dimension to your Member Access Profile (for each applicaiton where the dimension is used), otherwise you will get error message in the Excel Front-End.
    Regards,
    Marcel

  • Problem with Multi File upload example, help needed

    I got the code from the following location.....
    http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html
    And I've got it to work to some degree except I cant get the file transfer to work when pressing, Upload.   Below is what my debugger outputs.  Any thoughts on how to fix this or even what it means?
    At the very bottom of this message is the upload.cfm code.......
    Thanks in advance for the help
    <html>
    <head>
      <title>Products - Error</title>
    </head>
    <body>
    <h2>Sorry</h2>
    <p>An error occurred when you requested this page.
    Please email the Webmaster to report this error.
    We will work to correct the problem and apologize
    for the inconvenience.</p>
    <table border=1>
    <tr><td><b>Error Information</b> <br>
      Date and time: 12/07/09 22:25:51 <br>
      Page:  <br>
      Remote Address: 67.170.79.241 <br>
      HTTP Referer: <br>
      Details: ColdFusion cannot determine how to process the tag &lt;CFDOCUMENT&gt;. The tag name may be misspelled.<p>If you are using tags whose names begin with CF but are not ColdFusion tags you should contact Allaire Support. <p>The error occurred while processing an element with a general identifier of (CFDOCUMENT), occupying document position (41:4) to (41:70).<p>The specific sequence of files included or processed is:<code><br><strong>D:\hshome\edejham7\edeweb.com\MultiFileUpload\upload.cfm      </strong></code><br>
      <br>
    </td></tr></table>
    </body>
    </html>
    <!---
    Flex Multi-File Upload Server Side File Handler
    This file is where the upload action from the Flex Multi-File Upload UI points.
    This is the handler the server side half of the upload process.
    --->
    <cftry>
    <!---
    Because flash uploads all files with a binary mime type ("application/ocet-stream") we cannot set cffile to accept specfic mime types.
    The workaround is to check the file type after it arrives on the server and if it is non desireable delete it.
    --->
        <cffile action="upload"
                filefield="filedata"
                destination="#ExpandPath('\')#MultiFileUpload\uploadedfiles\"
                nameconflict="makeunique"
                accept="application/octet-stream"/>
            <!--- Begin checking the file extension of uploaded files --->
            <cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
            <cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
    <!---
    If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
    --->
            <cfif filecheck eq false>
                <cffile action="delete" file="#ExpandPath('\')#MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
            </cfif>
    <!---
    Should any error occur output a pdf with all the details.
    It is difficult to debug an error from this file because no debug information is
    diplayed on page as its called from within the Flash UI.  If your files are not uploading check
    to see if an errordebug.pdf has been generated.
    --->
            <cfcatch type="any">
                <cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
                    <cfdump var="#cfcatch#"/>
                </cfdocument>
            </cfcatch>
    </cftry>

    Just 2 things in my test:
    1) I use no accept attribute. Coldfusion is then free to upload any extenstion.
    Restricting the type to application/octet-stream may generate errors. Also, it is unnecessary, because we perform a type check anyway.
    2) I have used #ExpandPath('.')#\ in place of #ExpandPath('\')#
    <cfif isdefined("form.filedata")>
    <cftry>
    <cffile action="upload"
                filefield="filedata"
                destination="#expandPath('.')#\MultiFileUpload\uploadedfiles\"
                nameconflict="makeunique">
            <!--- Begin checking the file extension of uploaded files --->
            <cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
            <cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
    <!---
    If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
    --->
            <cfif filecheck eq false>
                <cffile action="delete" file="#ExpandPath('.')#\MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
                <cfoutput>Uploaded file deleted -- unacceptable extension (#ucase(File.ServerFileExt)#)</cfoutput>.<br>
            </cfif>
    Upload process done!
            <cfcatch type="any">
                There was an error!
                <cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
                    <cfdump var="#cfcatch#"/>
                </cfdocument>
            </cfcatch>
    </cftry>
    <cfelse>
    <form method="post" action=<cfoutput>#cgi.script_name#</cfoutput>
            name="uploadForm" enctype="multipart/form-data">
            <input name="filedata" type="file">
            <br>
            <input name="submit" type="submit" value="Upload File">
        </form>
    </cfif>

  • Checking for files in a folder -- Wrong output

    Hi guys,
    I'm writing a simple program, I have to check for 6 files (hardcoded, they will never change) if they are in certain directories/paths.
    The problem is, I think I have a problem in my IF statements, because it continueally returns false.
    The paths are on networked drives, does that make a difference?
    I'm rather stuck on this one, any help would be appreaciated.
    (some paths/file names have been replaced by "xxxxxxxxx", for security)
    * Checks for files in a directory, prints results.
    * @author Mitchell
    * @version 0.2
    * @date 28 Jul '05
    import java.awt.*;
    import java.io.*;
    import java.lang.Object;
    import javax.swing.*;
    import java.util.*;
    public class FileCheck extends JFrame
        //declare filenames/paths, add more if needed.
        String fileName1 = "file it2_load.txt";
        String fileName2 = "mo_batch.txt";
        String fileName3 = "mo_bcp.txt";
        String fileName4 = "mo_load.txt";
        String fileNameX = "IT2_1000_yyyymmdd.txt";
        String fileNameY = "IT2_2000_yyyymmdd.txt";
        //declare directories to search
        String fileLocation1 = "\\\\xxxxxxxxx\\aus_bear\\Patrol";
        String fileLocation2 = "\\\\xxxxxxxxx\\nz_bear\\Patrol";
        String fileLocation3 = "\\\\xxxxxxxxx\\bear\\remote\\RTS";
        String fileLocation4 = "\\\\xxxxxxxxx\\bear\\remote\\RTS";
        //declares array for filename storage. Change if needed.
        File fileNamesArray1[];
        File fileNamesArray2[];
        File fileNamesArray3[];
        File fileNamesArray4[];
        //set path to find files
        File filePath1 = new File(fileLocation1);
        File filePath2 = new File(fileLocation2);
        File filePath3 = new File(fileLocation2);
        File filePath4 = new File(fileLocation2);
        //string buffer to store results
        StringBuffer results = new StringBuffer();
        //start of FileCheck method
        public FileCheck()
            //collects all filenames from pre-set path1
            fileNamesArray1 = filePath1.listFiles();
            results.append("This program checks for files in given folders."
                            +"\nTRUE = File does exist in folder."
                            +"\nFALSE = File does not exist in folder.\n\n");
            results.append(fileLocation1 + "\n");
            //start for loop1 - check for pre-set filenames in path1
            for(int i=0; i < fileNamesArray1.length; i++)
                    if( fileName1.equals(fileNamesArray1.toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else if( fileName2.equals(fileNamesArray1[i].toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else if( fileName3.equals(fileNamesArray1[i].toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else if( fileName4.equals(fileNamesArray1[i].toString()))
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> TRUE\n" + fileNamesArray1[i].lastModified());
    else
    results.append("PATH1 >> " + fileNamesArray1[i] + " >> FALSE\n");
    } //end for loop1
    //collects all filenames from pre-set path2
    fileNamesArray2 = filePath2.listFiles();
    results.append("\n" + fileLocation2 + "\n");
    //start for loop2 - check for pre-set filenames in path2
    for(int j=0; j < fileNamesArray2.length; j++)
    if( fileName2.equals(fileNamesArray2[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else if( fileName2.equals(fileNamesArray2[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else if( fileName3.equals(fileNamesArray1[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else if( fileName4.equals(fileNamesArray1[j].toString()))
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> TRUE\n" + fileNamesArray2[j].lastModified());
    else
    results.append("PATH2 >> " + fileNamesArray2[j] + " >> FALSE\n");
    } //end for loop2
    //collects all filenames from pre-set path1
    fileNamesArray3 = filePath3.listFiles();
    results.append("\n" + fileLocation3 + "\n");
    //start for loop3 - check for pre-set filenames in path1
    for(int k=0; k < fileNamesArray3.length; k++)
    if( fileNameX.equals(fileNamesArray3[k].toString()))
    results.append("PATH3 >> " + fileNamesArray3[k] + " >> TRUE\n" + fileNamesArray3[k].lastModified());
    else
    results.append("PATH3 >> " + fileNamesArray3[k] + " >> FALSE\n");
    } //end for loop3
    //collects all filenames from pre-set path4
    fileNamesArray4 = filePath3.listFiles();
    results.append("\n" + fileLocation4 + "\n");
    //start for loop4 - check for pre-set filenames in path1
    for(int l=0; l < fileNamesArray4.length; l++)
    if( fileNameY.equals(fileNamesArray4[l].toString()))
    results.append("PATH4 >> " + fileNamesArray4[l] + " >> TRUE\n" + fileNamesArray4[l].lastModified());
    else
    results.append("PATH4 >> " + fileNamesArray4[l] + " >> FALSE\n");
    } //end for loop4
    //construct displaybox for results
    JTextArea textArea = new JTextArea( results.toString() );
    textArea.setEditable(false); //disables modification of results
    Container container = getContentPane();
    container.add( new JScrollPane( textArea ) );
    setSize( 500, 500 ); // set window size
    setVisible( true ); //allow visibility
    //main
    public static void main (String args[])
    FileCheck window = new FileCheck();

    You could try using the File.exists() method.
    The paths are on networked drives, does that make a difference?Try the above on a local file and a networked file.
    I'm writing a simple program, Actually a simple program would be something like:
    File file = new File("xxx");
    System.out.println(file.exists());No need to include all the code you posted.
    http://www.physci.org/codes/sscce.jsp

  • Unable to upload File to DMS (Document Managemt Sys) Via web Dynpro App

    Hi .
    I want add file to DMS i,e, SAP Document Management System .
    I first tried calling BAPI : BAPI_CREATE_DOCUMENT2 in Report and I was successfull.
    I am trying out same thing via Web Dynpro Application but I am getting error in Return of BAPI .Error is Error while checking in and storing: C:\Documents and Settings\Desktop\Hi.doc.
    I am pasting code I have written on click of Upload .
    method ONACTIONON_UPLOAD .
    implicitly available data objects
    wd_Context type ref to if_wd_context_node.
    wd_This type ref to if_FileUpload.
    DATA: gv_documento TYPE draw-doknr ,
    gv_clase TYPE draw-dokar VALUE 'Z99' ,
    gv_version TYPE draw-dokvr VALUE '00',
    gv_part TYPE draw-doktl VALUE '000',
    gv_descripcion TYPE drat-dktxt VALUE 'Description111',
    gv_return TYPE bapiret2,
    filename(60) type c ,
    lt_documentdata TYPE STANDARD TABLE OF bapi_doc_draw2,
    ls_documentdata LIKE LINE OF lt_documentdata,
    lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
    lt_classallocations TYPE STANDARD TABLE OF bapi_class_allocation ,
    lt_documentfiles TYPE STANDARD TABLE OF bapi_doc_files2 ,
    ls_documentfiles LIKE LINE OF lt_documentfiles ,
    lv_content type xstring ,
    size type i.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
    DATA ls_context TYPE wd_this->element_context.
    DATA lv_filename LIKE ls_context-filename.
    get element via lead selection
    lo_el_context = wd_context->get_element( ).
    get single attribute
    lo_el_context->get_attribute(
    EXPORTING
    name = `FILENAME`
    IMPORTING
    value = lv_filename ).
    ls_documentdata-documenttype = 'Z99'.
    ls_documentdata-documentversion = '000'.
    ls_documentdata-documentpart = '00'.
    ls_documentdata-description = 'Test Document Created Parag'.
    ls_documentdata-STATUSEXTERN = 'WR'.
    ls_documentdata-USERNAME = 'I046361'.
    ls_documentdata-WSAPPLICATION1 = 'DOC'.
    ls_documentdata-DOCFILE1 = lv_filename.
    ls_documentdata-DATACARRIER1 = 'DEFAULT'.
    ls_documentfiles-wsapplication = 'DOC'.
    ls_documentfiles-docfile = lv_filename.
    ls_documentfiles-storagecategory = 'DMS_C1_ST'.
    ls_documentfiles-checkedin = 'X'.
    APPEND ls_documentfiles to lt_documentfiles.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
    documentdata = ls_documentdata
    pf_http_dest = 'SAPHTTP'
    IMPORTING
    return = gv_return
    TABLES
    documentfiles = lt_documentfiles.
    IF gv_return-type CA 'AE'.
    WRITE gv_return-message.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    ENDIF .
    endmethod.
    Now Can anyone tell
    In case of Web Dynpro what Is this code right ?
    Do I need to change value of Parameters I have Set ?
    Do i need to some change as I am trying to Upload file Via WebApplication ?
    Do I have to change data Carrier ?
    Please let me know urgently .Points will be surely Given ...
    Regards ,
    Parag

    Hi ,
    Finally I was successfull in Uploading Docs.It seems I was not getting right Parameters ..anyways correct code is as follows ...
    method ONACTIONON_UPLOAD .
      implicitly available data objects
      wd_Context type ref to if_wd_context_node.
      wd_This    type ref to if_FileUpload.
    DATA:     gv_documento    TYPE draw-doknr            ,
              gv_clase        TYPE draw-dokar   VALUE 'Z99'  ,
              gv_version      TYPE draw-dokvr              VALUE '00',
              gv_part         TYPE draw-doktl VALUE '000',
              gv_descripcion  TYPE drat-dktxt VALUE 'Description111',
             gv_return       TYPE  BAPIRETURN ,
              gv_return       TYPE  BAPIRET2 ,
              gv_ruta         TYPE bapi_doc_files2-docfile VALUE 'C:\BAPI_DMS.doc' ,
              filename(60) type c ,
              lt_documentdata         TYPE STANDARD TABLE OF bapi_doc_draw2,
              ls_documentdata         LIKE LINE OF  lt_documentdata,
              lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
              lt_classallocations     TYPE STANDARD TABLE OF bapi_class_allocation ,
              lt_documentfiles        TYPE STANDARD TABLE OF bapi_doc_files2 ,
              ls_documentfiles        LIKE LINE OF lt_documentfiles ,
              lv_content type xstring ,
              size type i ,
              lt_binary              TYPE TABLE OF sdokcntbin ,
              ls_binary              LIKE LINE OF lt_binary ,
              lv_size                TYPE I  ,
              ls_doc_status          TYPE  CVAPI_DOC_STATUS ,
              ls_API_ctrl            TYPE  CVAPI_API_CONTROL ,
              l_MSG                  TYPE  MESSAGES ,
              lt_files type STANDARD TABLE OF CVAPI_DOC_FILE  ,
              lt_drao  TYPE STANDARD TABLE OF DRAO  ,
              ls_drao  LIKE LINE OF lt_drao ,
              lv_documenttype      TYPE  DRAW-DOKAR ,
              lv_documentnumber TYPE  DRAW-DOKNR ,
              lv_documentversion TYPE  DRAW-DOKVR ,
              lv_documentpart  TYPE  DRAW-DOKTL ,
              lv_text          TYPE string .
          FIELD-SYMBOLS <fs> TYPE ANY.
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_filename LIKE ls_context-filename   .
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(     EXPORTING       name =  `FILENAME`     IMPORTING       value = lv_filename ).
      lo_el_context->get_attribute(     EXPORTING       name =  `FILECONTENT`     IMPORTING       value = lv_content ).
    CONCATENATE lv_text 'by' sy-uname 'cretaed at ' sy-uzeit INTO lv_text .
      ls_documentdata-documenttype    = 'Z99'.
      ls_documentdata-documentversion = '00'.
      ls_documentdata-documentpart    = '000'.
      ls_documentdata-description     = 'Test Document Created in Web Dynpro ABAP '.
      ls_documentdata-STATUSEXTERN    = 'WR'.
      ls_documentdata-USERNAME        = 'I046361'.
      ls_documentdata-WSAPPLICATION1 = 'DOC'.
      ls_documentdata-DOCFILE1        = lv_filename.
      ls_documentdata-DATACARRIER1    = 'DEFAULT'.
      ls_documentfiles-DOCUMENTTYPE       = 'Z99'.
      ls_documentfiles-WSAPPLICATION      = 'DOC'.
      ls_documentfiles-DOCUMENTVERSION    = '00'.
      ls_documentfiles-DOCUMENTPART       = '000'.
      ls_documentfiles-DOCFILE            = lv_filename.
      ls_documentfiles-description        = 'Test Document Created in Web Dynpro ABAP  '.
      ls_documentfiles-CREATED_BY         = sy-uname.
      ls_documentfiles-CHECKEDIN          = 'X'.
      ls_documentfiles-DOCFILE            = lv_filename.
      APPEND ls_documentfiles  to lt_documentfiles .
        CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING
            documentdata    = ls_documentdata
            pf_http_dest    = 'SAPHTTPA'
        IMPORTING
            DOCUMENTNUMBER  = lv_DOCUMENTNUMBER
            return          = gv_return
        TABLES
          documentfiles = lt_documentfiles.
    IF gv_return-type CA 'AE'.
      WRITE gv_return-message.
    ELSE.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING     wait = 'X'.
       get message manager
       data lo_api_controller     type ref to if_wd_controller.
       data lo_message_manager    type ref to if_wd_message_manager.
       lo_api_controller ?= wd_This->Wd_Get_Api( ).
       CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
         RECEIVING
           MESSAGE_MANAGER = lo_message_manager
    CLEAR lv_text .
    CONCATENATE 'Dcoument ' lv_filename 'Successfully stored with Document No. ' lv_DOCUMENTNUMBER INTO lv_text .
       report message
       CALL METHOD lo_message_manager->REPORT_SUCCESS
         EXPORTING
           MESSAGE_TEXT             = lv_text
          PARAMS                   =
          MSG_USER_DATA            =
          IS_PERMANENT             = ABAP_FALSE
          SCOPE_PERMANENT_MSG      = CO_MSG_SCOPE_CONTROLLER
          VIEW                     =
          SHOW_AS_POPUP            =
          CONTROLLER_PERMANENT_MSG =
          MSG_INDEX                =
          CANCEL_NAVIGATION        =
    ENDIF .
    endmethod.

Maybe you are looking for

  • Pictures are not coming up on the internet

    '''when I open the internet, the pictures do not appear. When I go into some sites that I use frequently, the graphics for the buttons do not appear. '''

  • Anyone in UK managed to buy a 160gb SATA Disk and which one did you get

    Im really struggleing to find a 160gb disk for my macbook! have they not been released in the UK? I have seen a HITACHI Travelstar 5K160 and A seagate disk too, but cant find anyone who has them in stock? Which is the better disk out of the 2 ? Thank

  • Sharepoint 2007 - Turning off warning notification + additional check in/out information

    Scenario: Open file at 9am, leave open (to read) till 12p, then check out. Upon checking out, it will give you a warning to use the most current version. If the warning is ignored, the 9am version + whatever changes you will make will overwrite the n

  • Flip Transition in IPhoto Blacks out

    when i put random transitions and convert the photos into a slide show, all of the "flip" transitions black out just prior to the the next photo. how can i fix that. I just purchased and reinstalled the ILife '06 thinking this would fix it, but it ha

  • How to make a server out of an emac

    I have my sons emac (1ghz) and want to turn it in to a server. It's running 10.4.11. the cd rom does not work but other than that it works fine. We put 120gig hard drive in her. I will be connecting to router by either cable. I have got 3 macs and 2