Uploading File into SAP Transaction using BSP

Hi Everybody,
I would like to know how to save the file into SAP Transaction thro BSP. I have one requirement,For example,the captured file from the web should be attached into the Equipment master (Transaction Code IE02).Its possible via SAP GUI.But i would like to know how it can be done from BSP.The same example applicable to sales order also..
Also i wondering where these files get stored.
Anybody could help me out of this issue please?...
Naga Bokkisam

You can do that using BDS..But you need to find the Business object to store it under Equipment Master or Sales order.
Here is the example where i stored the document under Warranty process, ie sub set of Equipment master:
Here BUS2222 is business object for Warranty Process:
  CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      BUFFER                = STR_FILE_CONTENT
    TABLES
      BINARY_TAB            = I_FILE_CONTENT.
  CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
    EXPORTING
      CLASSNAME             = 'BUS2222' "classname_select
      CLASSTYPE             = 'BO'" classtype_select
    CLIENT                = SY-MANDT
      OBJECT_KEY            = OBJECT_KEY
    BINARY_FLAG           = 'X'
    TABLES
      SIGNATURE             = I_SIGNATURE
      COMPONENTS            = I_COMPONENTS
    CONTENT               = I_FILE_CONTENT
EXCEPTIONS
   NOTHING_FOUND         = 1
   PARAMETER_ERROR       = 2
   NOT_ALLOWED           = 3
   ERROR_KPRO            = 4
   INTERNAL_ERROR        = 5
   NOT_AUTHORIZED        = 6
   OTHERS                = 7     .
Let me know if you need any detail..
<i>*Reward each useful answer</i>
Raja T

Similar Messages

  • Upload Files into SAP Office Folder in Background

    Hi All ,
    Has anyone tried uploading file(s) of any type say *.XLS , *.PDF to SAP office folder (Outbox) in the background . I am using the function module  'SO_DOCUMENT_REPOSITORY' with methods "SAVE" , "ATTCREATEFROMPC" and "SEND" . It works fine in foreground without any errors . But when tried to schedule in background , the job stops at the method call "ATTCREATEFROMPC" and gives a message  "Database error for <INSERT INTO KPRO> " . It looks like the uderlyiong function module checks for an active GUI and fails during background .
    Any thoughts or other solutions would be appreciated ....
    Thanks

    Hi,
    I think ATTCREATEFROMPC method is for loading the file from frontend PC. It is bound to fail if you run it in background since there is no SAPGUI running it and it can't know the location.
    You will need to use some other method to be able to read the files from the APP server, and have your documents on the APP server if you want to run your code in the background.
    cheers,
    Ajay

  • I want to upload files in  sap-directories using  webdynpro abap.

    My requirement is i need to read the filess from the local system in a  folder and save those files in the sap directories(AL11).Need help .
    Thanks.

    Hi Dear,
    U have to use File upload UI element , then read the file then  follow the code for transfering into SAP directories:
    check this 
    *Declare T_UPLOAD , W_UPLOAD  itab  and  wa with your file heading structure
    DATA:L_LINE TYPE STRING.
      P_FLNAME = 'Test123'. " file name
    OPEN DATASET P_FLNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    CHECK SY-SUBRC = 0.
    LOOP AT T_UPLOAD INTO W_UPLOAD.
      CONCATENATE W_UPLOAD-Field1
                  W_UPLOAD-Field2
                  W_UPLOAD-Field3
                  W_UPLOAD-Field4
                  W_UPLOAD-Field5
                  INTO L_LINE
                  SEPARATED BY ','.
    TRANSFER L_LINE TO P_FLNAME.
    ENDLOOP.
    CLOSE DATASET P_FLNAME.
    I think it may help u a lot..
    Regards
    Aisurya

  • Warning while uploading file into SAP - SAP GUI Security

    Hello Experts,
    When ever I am uploading any file to SAP from desktop, system asks me:
    "Do you want to grant access to this file - Yes or No"
    Also there is check box "Remember my decision"
    Refer screenshot
    Please note: This warning is given to me only. My other colleagues does not get this warning. How can I remove this
    Moreover, it is showing as "SAP GUI Security"
    Meena

    Hi Meena,
    It is just a warning message and so you can ignore it. Also, be informed that nothing is skeptical here. Things are working as it should work.
    You other colleagues must have clicked Remember my decision so now it is not asking them. You can click on remember my decision and then can click on yes. From next time on it wont ask. And even if it asks you just follow the same process.
    Hope this helps!
    Regards,
    Sanket Sachde

  • Upload data from multiple worksheets of excel file into SAP by using MIME?

    Hi all,
    I'm trying to getting the data from a multiple worksheet excel file by usin the MIME Repository.
    First of all i realizied it like [here|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in a normal ABAP Report.
    By trying to transfer the code to a WebDynpro Component, i get problems.
    With this part of code, because ActiveX is not allowed in our Webbrowser. So i have to find another solution to get the data from the excel file.
    CALL METHOD c_oi_container_control_creator=>get_container_control
    IMPORTING
    control = iref_control
    error   = iref_error
    I tried to rebuild this solution in webdynpro. But it dont works.
    So my next step was trying to Read the Excel sheet directly from MIME by getting the Content (XString).
    But there is no useful information Just a mix out of '######' and other symbols.
    By converting it into String the same problem.
    Maybe someone has an idea how to rebuild [this code|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in Webdynpro that it works correctly.
    Currently Im Using the Fileupload UI Element. All Works fine. I can Upload the Excel file to MIME Repository and i can open it from there.
    But i cant get the same clear informationen from the file, to write it later in a Database, like before without webdynpro.
    i hope someone can help me.
    Edited by: Sascha Baumann on Apr 20, 2009 4:28 PM

    You can't read the native binary Excel Format in server side ABAP.  The functions and classes that did this in Classic Dynpro used OLE Automation via the SAPGUI Control Framework to remotely control Excel to read the data.  Because in the browser you have no connection to the SAPGUI or are sandboxed inside the browser; the same functionality is not possible. 
    I would suggest that you look into saving the Excel file as a open, text format.  You might be able to use XML (although the Excel XML format can be complex) to support multiple sheets. You would have to build the logic yourself (using XSLT or the iXML parser) to process the XML format back into ABAP data.

  • T-code to upload mutliple files into SAP directories ?

    Hi,
    Is there any other transaction to upload multiple files into SAP directories ( ALL11) other than CG3Z ? Any other procedures at the operating system level ? Please advise.
    Regards
    Shiva

    I dont think so. But you can :
    -- Ask your developer to create a BDC for this transaction to upload multiple files.
    -- Use LSMW to record this transaction to upload multiple files.
    Regards,
    Jazz

  • How do I upload XML files into sap table?

    Dear all,
    I found some methods that upload xml into SAP,
    but there doesn’t work under 4.6c.
    Can someone tell me how to upload XML files into
    sap under 4.6c?
    THX!

    hi,
    You can convert XML to abap using transformations. Simple transformations is a proprietary SAP programming language that describes the transformation of ABAP data to XML (serialization) and from XML to ABAP data (deserialization).
    goto SE80->workbench->edit object(or other objects)->in object selection chose more tab and then choose the transformation radio button and write a name and click create new.
    Here you enter your transformation like
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:transform>
    You can use this transfomation in your program using call transformation. You can find more info on call transformation in help.
    Hope this helps.
    Regards,
    Richa

  • Down-/Upload files via Web Services using a NON-SAP system!?

    Hello,
    is it possible to down-/upload files via web services using a NON-SAP system!?
    Regards,
    Jens

    Hi Jens,
    I am not sure about your requirement here. What i could understand is that you want to check whether service could handle file processing?
    1) Uploading file - You can build a Webservice which has import/export parameters as the file structures and implement the proxy class in such a way that the passed data is written to application server.
    2) Downloading file - Same as uploading file, but the proxy class would have the code to extract data from the application server and pass them as output parameter.
    Functionality of Non SAP system: The system which calls these services should be able to convert the output of proxy data into file in case of downloading the file and it should be able to convert the file data into export parameters in case of uploading file.
    Hope this helps.
    Regards,
    Prasanna

  • Upload data from Excel into SAP CRM using webservices

    Hi,
               I want to upload the data from EXCEL into SAP CRM using a web  service, can anyone say me the process and also how to map the excel and the source code structures.
    Thanks,
    Sanju.

    Try the following :
    Class: CL_GUI_FRONTEND_SERVICES
    Method: GUI_UPLOAD
    Thanks
    <b>Allot points if this helps!</b>

  • Query on integrating windows file server into SAP KM using WEBDAV

    hi
    I have sucessfully integrated windows file server into SAP KM using WEBDAV. I have query in it regarding the possible validation against the portal Database user. Can we configure such that the user comparison happens for LDAP as well as database user. Have anyone configured such a scenario?
    Regards,
    Ganesh N

    Hi Ganesh,
    this should work in principle.
    However you would need a user in Active Directory for each user in the portal database that should connect to the file server if you are using the SSO22KerbMap Module as I assume.
    In my whitepaper I have mentioned this for the internal user index_service that does only exist in the portal database.
    Best regards,
    André

  • Load a flat file into BW-BPS using SAP GUI

    Hi,
    We are using BW BPS 3.5 version, i implemented how to guide  " How to load a flat file into BW-BPS using SAP GUI" successfully without any errors.
    I inlcuded three infoobjects in the text file   costelemt, Posting period and amount. the same three infoobjects i inlcuded the file structure in the global data as specified in the how to document
    The flat file format is like this
    Costelmnt      Postingperiod         Amount   
    XXXXX             #      
    XXXXX             1                          100
    XXXXX             2                           800
    XXXXX             3                           700
    XXXXX             4                           500
    XXXXX             5                           300
    XXXXX             6                           200
    XXXXX             7                           270
    XXXXX             8                           120
    XXXXX             9                           145 
    XXXXX            10                           340
    XXXXX            11                           147
    XXXXX            12                           900 
    I successfully loaded above flat file in to BPS cube and it dispalyed in the layout also.
    But users are requesting to load  flatfile in the below format
    Costelmnt        Annual(PP=#)   Jan(PP=1)   Feb(PP=2) ........................................Dec(PP=12)  
    XXXXX              Blank                       100           800                                                   900
    Is it possible to load a flat file like this
    They wants load a single row instead of 13 rows for each costelement
    How to do this. Please suggest me if anybody accorss this requirment.
    In the infocube we have got only one Info object 0FISCPER3(Posting period) and one 0AMOUNT(Amount)
    do we need 13 Infobjects for each posting period and amount.
    Is there any possiblity we can implement any user exit which we use in BEX Quer's
    Please share your ideas on this.
    Thanks in advance
    Best regards
    SS

    Hi,
    There are 2 ways to do this.
    One is to change the structure of the cube to have 12 key figures for the 12 posting periods.
    Another way is to write an ABAP Function Module to fetch the values from each record based on the posting period and store it in the cube for the corresponding characteristic. This way, you dont have to change the structure of the cube.
    If this particular cube is not used anywhere else, I would suggest to change the structure itself.
    Hope this helps.

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Someone used upload files into blob in JDeveloper 10.1.3.2 ?

    Someone used upload files into blob in JDeveloper 10.1.3.2 ?
    I used Steve Muech example 85, but after downloading , downloaded files doesn't work ?
    I prepared test case http://www.sttb.pl/jakub/UploadAndDownloadBlob.zip - meybe someone resolve it.
    Regards
    Kuba

    Hi,
    There is no problem with download in above example. I have used Steve's example to upload, and solution delivered by Ric Smith on his blog to download files. I think there is something wrong with Steve's uploading solution. When I used Ric solution (he sent me by email complete JDeveloper project) to upload and download everyting works correct. I created last Friday SR on Metalink to review it and it's still in progress. My advice is:
    1) Look onto Ric Smith blog:
    http://thepeninsulasedge.com/blog/2006/08/17/reading-and-writing-blobdomains-to-and-from-an-adf-uploadfile/
    and
    http://thepeninsulasedge.com/blog/2006/11/06/adf-faces-and-adf-bc-fileupload-and-blobs-continued/
    2) Ask him to send JDeveloper project or update email to your profile - I'll send you directly this project that I retrieved from Ric Smith
    Regards
    Kuba

  • How to upload a Flat file into sap database if the file is in Appl'n Server

    Hello Sap Experts , Can you tel me
    " How to upload a Flat file into sap database if the file is in Application Server.
    what is Path for that ?
    Plz Tel Me its Urgent
    Thanks for all

    Hi,
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    * Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.

  • Problem while integrating windows file server into SAP KM using WEBDAV

    Hi
    I am trying to integrate windows file server into SAP KM using WEBDAV . I have downloaded the kerberos ini filter and included in the windows system. I am only trying to bring the files in the same system into KM but with no luck. When i check the log file in the kerberos folder i am getting
    <b>12:02:22 10828/10476 E OnPreprocHeaders: Found 0 UserPrincipalNames for ADSI Filter (&(objectCategory=person)(objectClass=user) (userPrincipalName=xxxx))</b>.
    In the log i am getting the following
    ERROR! Delegation Flag:Use any authentication protocol: NOT ACTIVE
                           Open 'Active directory Users and Computers'. Choose <domain> -> 'Computers'.
                           Right-click 'IDBSRV8' and choose 'Properties'.
                           Select 'Delegation' and 'Trust this computer for delegation to specified services only'.
                           Select 'Use any authentication protocol'.
                    ERROR! The Trusted-to-Authenticate-for-Delegation flag is not set for SPN 'HOST/idbsrv8.idbhq.org'.
                           Please check the SPN by calling 'setspn -l IDBSRV8'.
                           If the SPN is well known, configure the Trusted-to-Authenticate-for-Delegation flag:
                           Open 'Active directory Users and Computers'. Choose <domain> -> 'Computers'.
                           Right-click 'IDBSRV8' and choose 'Properties'.
                           Select 'Delegation' and 'Trust this computer for delegation to specified services only'.
                           Select 'Use any authentication protocol' and choose 'Add'.
                           Select 'Users or Computers' and enter IDBSRV8 as object name.
                           Add the ServicePrincipalName HOST/idbsrv8.idbhq.org.
    Can anybody please help me in this regard???
    Regards,
    Ganesh N
    Message was edited by:
            Ganesh Natarajan

    Hi Ganesh,
    this error message tells you that there is no user in your active directory that has the userPrincipalName xxxx.
    The SSO22KerbMapModule works as follows.
    1. It receives a SAP Logon Ticket from the WebDAV request.
    2. If valid the SAP username is extracted. In your case the SAP username is xxxx.
    3. It then searches for a user in AD. It does so using the attribute in the ini-file that has been specified to contain the SAP username. In your case the SAP username should be identical with the userPrincipalName.
    So you have to make sure that the portal user id (j_user) is mapped to the same AD user attribute  that is specified in the ini-file .
    Best regards,
    Andre

Maybe you are looking for