File upload in SAP BI using Webdynpro.

Hi,
I have requirement in Webdynpro, where I need to upload the data from file of type Tab delimited (*.txt) file from desktop. In ECC I know how to upload the file i.e., by using the Function module (FM) 'HR_KR_XSTRING_TO_STRING'. But in SAP BI the FM doesnu2019t exist.
Is there any way to upload TAB delimited (*.txt) file in SAP BI for  Webdynpro ABAP.
Can we move or copy the package P99E  from ECC to SAP BI.This package contains the above said Function module. If it is possible then please guide on this.
Edited by: SUNIL B SMG on Jan 27, 2012 3:19 PM
Edited by: SUNIL B SMG on Jan 27, 2012 3:22 PM

Hi,
iView:
<hbj:form encodingType="multipart/form-data" >
   <hbj:fileUpload  id="myfileupload"                    maxLength="125000"                    size="50"   />
</hbj:form>
Action-Method:
public void onLoadFile(Event event) {
         FileUpload fu = (FileUpload) this.getComponentByName("myfileupload");
// this is the temporary file
         if (fu != null) {
// Output to the console to see size and UI.
            System.out.println(fu.getSize());
            System.out.println(fu.getUI());
// Get file parameters and write it to the console
            IFileParam fileParam = fu.getFile();
            System.out.println(fileParam);
// Get the temporary file name
            File f = fileParam.getFile();
            String fileName = fileParam.getFileName();
// Get the selected file name and write ti to the console
            ivSelectedFileName = fu.getFile().getSelectedFileName();
            System.out.println("selected filename: "+ivSelectedFileName);
Regards,
Gerhard

Similar Messages

  • 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é

  • 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

  • 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

  • Jar file upload and transport in Java webdynpro

    Hi,
    I wanted to change do small chnage to the existing jar file in webdynpro jave application. I did change the jar file.
    Question: Please let me know how can i include this jar file into existing application back and how the transport happend for the same?
    do we need to copy paste the ne jar file(updated jar file) in local drive where it exists and do little chnage the application will create an activity. then move to test and prd  will that move the jar file as well?
    appreciate your prompt help.
    Thanks
    Rag

    hi rag,
    1) "Like this have couple projects for same application. Under two are Jars, under these two jars i have to update my changed jar. Then the file used in another project.
    I can see other project which is using this jar is seeing in webdynpro explorer.
    But two jar projects are not showing in webdynpro explorer, but they can see through Navigator after i imported into location NWDS."
    here it shows that two are external library files having the jar file in the library folder.
    2) "My request is i have changed the jar file from existing jar project and replaced it in local path where it is currently. but it didnt ask me the activity to deploy the same.
    In this part , im not clear like how you were able to change the jar file without checking out the external lib dc , in the external lib, as i told earlier if it was checked out then activity will not be asked,
    3) "so how do i update JAR file and delpoy into server. and where can i see the JAR file been updated in server? i am how to deploy into server."
    JAR file cannot be deployed directly the way you deploy a DC or Webdyn pro project.
    if you have changed the jar file , just build your webdynpro project that uses this jar file. and deploy the same . The new jar file gets deployed along with your webdynpro project.
    if you want to deploy jar file, then you have to create a wedynpro development component of type j2EE-Server--library .
    Then in Used Dcs add your external lib dcs assembly public part with build time dependency
    go throught this blog you will know more about external jar file and its usage at run time.... and how it is getting deployed to the server.
    https://scn.sap.com/people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components

  • Excel Format File Upload in SAP APO 4.0

    I have an file on desktop with .xls format. This file I need to upload in SAP ztable in APO .... kindly suggest the various techinques availabe for this....
    kindly find the attached code for the same which I have written..... request you to suggest on this...
    This APO is not supporting following Function module
    1. KCD_EXCEL_OLE_TO_INT_CONVERT
    2. ALSM_EXCEL_TO_INTERNAL_TABLE
    I am attaching the code...
    EPORT ZTEST_EXCEL NO STANDARD PAGE HEADING MESSAGE-ID zsn.
    DATA: Begin of i_temp occurs 0,
           Z_LOCATION like ztest_tran-z_location,
            z_product  like ztest_tran-z_location,
            Z_0_30_DAYS like ztest_tran-Z_0_30_DAYS,
            Z_31_59_DAYS like ztest_tran-Z_31_59_DAYS,
            Z_OVER_59_DAYS like ztest_tran-Z_OVER_59_DAYS,
          End of i_temp.
          data : i_temp1 like i_temp OCCURS 0 WITH HEADER LINE.
          DATA : begin of itab_file occurs 0,
            line(255) type c,
          end of itab_file.
    DATA: v_file type string.
    selection-screen begin of block b1.
    parameters: fl_file like rlgrap-filename lower case.
    selection-screen end of block b1.
      v_file = fl_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = V_FILE
       FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = I_TEMP
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    ..........

  • Multiple file upload in SharePoint 2013 using AjaxFileUpload

    Hi all,
    I want to add multiple files using file upload control in our visual web part SharePoint 2013. I tried to use AjaxFileUpload (from Ajaxcontrol toolkit) in my visual web part and also added the handler in web.config as described in article (http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx).
    But, it’s not even opening the browse dialog box.
    I also tried to see if any third party control is available to achieve multiple file upload in SharePoint 2013 Visual web part, but without any success.
    Please help.
    Regards,
    Monica

    Hi
    Try to add the dll files of Ajax Control Toolkit in the
    Bin folder of your SharePoint Web Application (IIS Site)
    Hope that help
    Ahmed Naji SharePoint Geek
    MCP|MCTS|MCPD
    My English SharePoint Blog | DotnetFinder My Arabic SharePoint Blog|
    CodeReloaded
    My Gallery Contributions
    SharePoint 2010 Twitter Web Part
    SharePoint 2010 Custom Timer Job

  • File upload to HANA Database using UI5

    Hi ,
    I am using UI5 fileuploader to upload the data into HANA table.I have followed the blogs to upload the files into table.Created xsjs query to read file data and insert data in the table.below is the code snippet.if i follw this method,if no of records to be uploaded are more million records will there be any performance issue.Are there any other methods to upload data from UI5 to HANA table.
    function escape(v1)  
      var v2 = v1.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); 
      return v2;  
    function upLoadFile()
      var conn = $.db.getConnection();
      var filename = $.request.parameters.get("file_name");
      var query = "insert into \"SCHEMA\".\"table\" values (?,?,?,?,?,?,?,?,?,?,?,?,?)";
      var pstmt = conn.prepareCall(query);
      if($.request.entities.length>0)
      var file_body = $.request.entities[0].body.asString(); 
      var allTextLines = file_body.trim().split(/\r\n|\n/);
      var lines;
      var entries;  
      var pos;
      var c;
      var col;  
      for (lines=1; lines<allTextLines.length; lines++)   
      entries = allTextLines[lines].trim().split('\t'); 
      col = entries.splice(0,13);   
      pstmt.setString(1,escape(col[0].trim())); 
                    pstmt.setString(2,escape(col[1].trim())); 
                    pstmt.setString(3,escape(col[2].trim())); 
                    pstmt.setString(4,escape(col[3].trim())); 
                    pstmt.setString(5,escape(col[4].trim())); 
                    pstmt.setString(6,escape(col[5].trim())); 
                    pstmt.setString(7,escape(col[6].trim())); 
                    pstmt.setDecimal(8,parseFloat(col[7],2)); 
                    pstmt.setDecimal(9,parseFloat(col[8],2)); 
                    pstmt.setString(10,escape(col[9].trim())); 
                    pstmt.setString(11,escape(col[10].trim()));
                    pstmt.setString(12,escape(col[11].trim())); 
                    pstmt.setString(13,escape(col[12].trim()));
             pstmt.addBatch();
      pstmt.execute();
      pstmt.close();          
      conn.commit();            
      conn.close();         
    var vCmd = $.request.parameters.get('CMD');
    switch (vCmd) {
    case "INSERT": upLoadFile(); break;

    Hi Pavani,
    Keeping millions of records in the prepared statement object (yes it is saved in the memory ) does not look good. Can't we trigger pstmt.execute(); for a 1000 records block ?
    Sreehari

  • File upload to sftp server using apex

    We have an SFTP server on Linux and we want to provide users with web-based interface (Oracle APEX has been chosen for that purpose) so they can upload their flat files to our sftp server via secure transmission. is it possible to implement on APEX? What might be possible solution? or any workarouds?
    Thanks in advance.

    Hello Kevin,
    >
    if I got it right, in such a case files have to be stored in database directory, as far as I know APEX only allows to store files in database tables. is there any way to put files to a directory without storing them in tables? For instance, I want files to be placed in some oracle directory when users choose files with FILE BROWSE item and then submit the page.
    >
    Yes APEX stores files to tables, but there is a way to store them to OS directory.
    I don't know much about the plugin SaveToDisk:
    http://apex-plugin.com/oracle-apex-plugins/process-type-plugin/savetodisk_167.html
    but i have tried a blog solution by Håvard Kristiansen and it works fine:
    http://monkeyonoracle.blogspot.in/2009/10/storing-images-outside-oracle-xe-with.html
    He has given this solution to store images outside Oracle XE i.e. to a server directory.
    I had done this way:
    1) User uploads a file through file browse.
    2) The file is stored to APEX_APPLICATION_FILES or WWV_FLOW_FILES.
    3) The file is written to the OS directory using the write_to_file procedure mentioned in the blog.
    Hope it helps!
    Regards,
    Kiran

  • Local File Upload in Snow Leopard Using PHP

    I'm building a site and testing it locally (http://localhost). For some reason I can't get a file to upload using a PHP script. The script works perfectly on my server, just not on my Mac.
    I thought it may be a permissions issue, so I opened Terminal and tried to chgrp the folder. I received "Invalid Argument." I can chown and chmod no problem. I can't chgrp, even using sudo or su.
    I should also note that I have the following in php.ini, located in /private/etc/php.ini
    file_uploads = On
    uploadmaxfilesize = 2M
    Any ideas?

    I'm booted into X.8 at the moment but I believe I used the "quickview" in the finder and it gave me a "scrub bar".
    Message was edited by: sweetpollypurebred
    Sorry, I guess you were trying to avoid quick"look/view" (whatever)

  • Search Help from SAP values using WebDynpro ABAP in ADOBE Interactive Form

    Hi,
    How to populate search help on ADOBE interactive online form which is residing on a WebDynpro ABAP application?
    Thanks & Regards,
    Sandip amar

    HI,
    Adobe from is integraated with R/3 just like smartform.
    So if u use any DDIC tabel field which have inbuilt search help then it will automatically intergrated with Adobe form.
    If not then u have to make at ztable via foreign key or via FM at program level.
    Regards
    ricky

  • Monitor SAP Instance using Webdynpro

    Experts,
    I have a requirement to show the server SAP Instance status in WebDynpro Application.
    for an example:
    My server name : myserver
    SAP Instance   :  DE3
    I need to create a webdynpro iView which shows the server status like below:
    a) If the instance is up and running,I need to show that the server status as green.
    b) If the instance is not running,I need to show that the server status as red.
    Kindly let me know how to proceed.
    Thx in Advance.
    Regards,
    Subbareddy

    hi sdnuser1...
      you can create such web dynpro application....
      you have tutorial for service call..
      create aservice call in such a way that it displays the po in a table....
      have the table in edit mode....
      the values would be present in an internal table...
      so once the values are changed have an update button.
      call the respective bapi to update it in the database.
    ---regards,
       alex b justin

  • Is there a secure way to permit File Upload for authenticated users using HTTPS ?

    I'm concerned about potential web publishing exploits.
    I'm considering using a java servlet.

    Hi,
    The synergix-extensions work very well. I usually use a method which Jörgen Nisslon has written a vbscript (I'm planning on doing a similiar thing with PowerShell) that creates a password for each computer and stores it in a database. The password
    will then be presented with a hta front end.
    http://ccmexec.com/2012/06/generating-a-random-password-during-osd-and-save-it-in-sql/
    This is possible to run both in a task  sequence and by a regular basis, for instance every third month or so.
    Hope this helps you!
    /Johan
    Microsoft Certified Trainer
    MCSE: Desktop, Server, Private Cloud, Messaging
    Blog: http://365lab.net

  • How to upload a pdf file using webdynpro abap

    Hi Experts,
    I need to upload pdf files using webdynpro abap.my question is where to upload this files and how to upload this files, and how to display this pdf file.
    Please Provide Requried Information.
    Waiting for Reply.
    Thanks & Regards.
    Bhushan.

    Hi,
    There is a UI element with the type 'File Upload'.
    You can use that in your view.
    For further details and coding, please refer to
    [http://www.****************/Tutorials/WebDynproABAP/Upload/Page1.htm]
    Hope this helps you.
    Regards,
    Dolly

  • File open using Webdynpro for java

    Hi,
    I have a file "SAP.JPEG" in remote machine location "
    SAP\NetWeaver\WebDynpro".
    In my webdynpro application...I have a button and the action "OpenFile"...
    My question is on click of the button, how can I open the file "SAP.JPEG".
    Please advice me how to proceed with this.
    Rgds,
    Patana

    Hi,
    it is possible to access the file from the remote system using webdynpro java. your requirements is quite possible.
    the prerequisites are:
    the SAP WebAS Server and the remote system are in the same network, and the folder (in your case "SAP") is shared folder with access permissions.
    let us assume your remote system name is remSys09.
    add an ui element image in the layout. and create an attribute named "image " bind it to the property source
    use this below code to show the image.
    try {
              File f =new File("////remSys09//SAP//NetWeaver//WebDynpro//SAP.JPEG");
              BufferedInputStream bis= new BufferedInputStream(new FileInputStream(f));
              byte[] image = new byte[bis.available()];
              bis.read(image);
              IWDWebResource webResource = WDWebResource.getWebResource(
              image,
              WDWebResourceType.JPG_IMAGE);
              wdContext.currentContextElement().setImage(webResource.getURL());  
         } catch (Exception e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
    Regards,
    Naga

Maybe you are looking for

  • Table for pricing komp and komk.

    Hi gurus, My requirement is i need to get a transparent table for 'Communication for Pricing Header' Structure is KOMK. I need the table or view or through any function module by which we can get the pricing data. I have values from table VBRP and VB

  • Display Package version number in HTML?

    Hi, My customer wants to display the version number of the apps/xx package in the HTML. I'm just wondering if this is a good idea, i.e. the actual package contents could be overwritten, but the package doesn't change. Also - how could that be achieve

  • String to char conversion

    How do I convert a string I have (I am sure its one character) in to char?

  • Facebook won't load properly

    facebook no longer loads properly.  comes up with a white page

  • OBI Scheduler Error on AiX

    Hi, we need to configure scheduler on AIX machine. We have installed Oracle 11g client on the same machine where we need to configure scheduler. we ran schconfig from respective folder and tried to start scheduler service then we got following error