To Download a file to XLS(default) format using KD_GET_FILENAME_ON_F4

Hi,
I want to download a file in XLS format.
While using KD_GET_FILENAME_ON_F4 FM .
When i get a pop up window ,i need the default filetype to be shown as XLS file type.

I am declaring like this.
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
       EXPORTING
         program_name        = syst-repid
         dynpro_number       = syst-dynnr
        FIELD_NAME          = 'rt'
        static              = 'X'
         mask                = ',.XLS,*.xls'
        CHANGING
          file_name           = lv_filepath
EXCEPTIONS
   mask_too_long       = 1
   OTHERS              = 2.

Similar Messages

  • How to download a file version from office 365 using csom

    I need to download an older file version from office 365 and get the data into a byte array. I have no trouble downloading the latest version with File.OpenBinaryStream() and I have no trouble loading the previous file versions with File.Versions. But now
    I need to actually download an older version of the file and it seems the only way is to use File.OpenBinaryDirect. So I am creating a client context using my oAuth access token and providing the correct path, but I am getting a (401) Unauthorized
    error. Looking with Fiddler I can see that the call to OpenBinaryDirect is somehow trying to post to my file URL and the server is responding with 401.
    context = TokenHelper.GetClientContextWithAccessToken(SPHostUrl, AccessToken);
    FileInformation info = File.OpenBinaryDirect(context, "/" + _fileVersion.Url);  //throws 401
    //leading slash required otherwise ArgumentOutOfRangeException
    I have to be able to access the older file versions with my c# code -- I don't have a viable app without that ability -- any help urgently needed and greatly appreciated!

    Thank you SO much (Can't wait for the next release)!
    For anyone else who lands here, here's the code I ended up using:
    // VersionAccessUser and VersionAccessPassword are stored in web.config
    // web.Url is loaded via the clientContext
    // myVersion is the FileVersion I got from the file's Versions.GetById() method
    // probably a lot of ways to get hostUrl, it just needs to be https://yourdomain.sharepoint.com/
    // - I'm running my app from a subweb
    // I had trouble following the links to get the full MsOnlineClaimsHelper code
    // (the one on msdn.com was missing RequestBodyWriter, WSTrustFeb2005ContractClient,
    // and IWSTrustFeb2005Contract
    // so I've included the code I used here.
    string myVersionFullUrl = string.Format("{0}/{1}", web.Url, myVersion.Url);
    string userName = WebConfigurationManager.AppSettings.Get("VersionAccessUser");
    string strPassword = WebConfigurationManager.AppSettings.Get("VersionAccessPassword");
    string hostUrl = Regex.Replace(web.Url, "([^/]+//[^/]+/).*", "$1");
    MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(hostUrl, userName, strPassword);
    var client = new WebClient();
    client.Headers["Accept"] = "/";
    client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    client.Headers.Add(HttpRequestHeader.Cookie, claimsHelper.CookieContainer.GetCookieHeader(new Uri(hostUrl)));
    var document = client.DownloadString(myVersionFullUrl);
    // These classes are needed to download old versions of files (see: http://social.msdn.microsoft.com/Forums/en-US/7746d857-d351-49cc-b2f0-496663239e02/how-to-download-a-file-version-from-office-365-using-csom?forum=sharepointdevelopment)
    // I cobbled this file from http://social.technet.microsoft.com/Forums/msonline/en-US/4e304493-7ddd-4721-8f46-cb7875078f8b/problem-logging-in-to-office-365-sharepoint-online-from-webole-hosted-in-the-cloud?forum=onlineservicessharepoint
    // and http://fredericloud.com/2011/01/11/connecting-to-sharepoint-with-claims-authentication/
    using Microsoft.IdentityModel.Protocols.WSTrust;
    using Microsoft.SharePoint.Client;
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Net.Security;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.Text;
    using System.Web;
    using System.Xml;
    using System.Xml.Linq;
    namespace DPSiDoxAppWeb.Helpers
    /// <summary>
    /// Create a new contract to use for issue claims for the SharePoint requests
    /// </summary>
    [ServiceContract]
    public interface IWSTrustFeb2005Contract
    [OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign,
    Action = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue",
    ReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue",
    AsyncPattern = true)]
    IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state);
    Message EndIssue(IAsyncResult asyncResult);
    /// <summary>
    /// Implement the client contract for the new type
    /// </summary>
    public class WSTrustFeb2005ContractClient : ClientBase<IWSTrustFeb2005Contract>, IWSTrustFeb2005Contract
    public WSTrustFeb2005ContractClient(Binding binding, EndpointAddress remoteAddress)
    : base(binding, remoteAddress)
    public IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state)
    return Channel.BeginIssue(request, callback, state);
    public Message EndIssue(IAsyncResult asyncResult)
    return Channel.EndIssue(asyncResult);
    /// <summary>
    /// Create a class that will serialize the token into the request
    /// </summary>
    class RequestBodyWriter : BodyWriter
    readonly WSTrustRequestSerializer _serializer;
    readonly RequestSecurityToken _rst;
    /// <summary>
    /// Constructs the Body Writer.
    /// </summary>
    /// <param name="serializer">Serializer to use for serializing the rst.</param>
    /// <param name="rst">The RequestSecurityToken object to be serialized to the outgoing Message.</param>
    public RequestBodyWriter(WSTrustRequestSerializer serializer, RequestSecurityToken rst)
    : base(false)
    if (serializer == null)
    throw new ArgumentNullException("serializer");
    _serializer = serializer;
    _rst = rst;
    /// <summary>
    /// Override of the base class method. Serializes the rst to the outgoing stream.
    /// </summary>
    /// <param name="writer">Writer to which the rst should be written.</param>
    protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
    _serializer.WriteXml(_rst, writer, new WSTrustSerializationContext());
    public class MsOnlineClaimsHelper
    #region Properties
    readonly string _username;
    readonly string _password;
    readonly bool _useRtfa;
    readonly Uri _host;
    CookieContainer _cachedCookieContainer = null;
    DateTime _expires = DateTime.MinValue;
    #endregion
    #region Constructors
    public MsOnlineClaimsHelper(string host, string username, string password)
    : this(new Uri(host), username, password)
    public MsOnlineClaimsHelper(Uri host, string username, string password)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = true;
    public MsOnlineClaimsHelper(Uri host, string username, string password, bool useRtfa)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = useRtfa;
    #endregion
    #region Constants
    public const string office365STS = "https://login.microsoftonline.com/extSTS.srf";
    public const string office365Login = "https://login.microsoftonline.com/login.srf";
    public const string office365Metadata = "https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml";
    public const string wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
    public const string wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
    private const string userAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
    #endregion
    class MsoCookies
    public string FedAuth { get; set; }
    public string rtFa { get; set; }
    public DateTime Expires { get; set; }
    public Uri Host { get; set; }
    // Method used to add cookies to CSOM
    public void clientContext_ExecutingWebRequest(object sender, WebRequestEventArgs e)
    e.WebRequestExecutor.WebRequest.CookieContainer = getCookieContainer();
    //e.WebRequestExecutor.WebRequest.UserAgent = userAgent;
    // Creates or loads cached cookie container
    CookieContainer getCookieContainer()
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    // Get the SAML tokens from SPO STS (via MSO STS) using fed auth passive approach
    MsoCookies cookies = getSamlToken();
    if (cookies != null && !string.IsNullOrEmpty(cookies.FedAuth))
    // Create cookie collection with the SAML token
    _expires = cookies.Expires;
    CookieContainer cc = new CookieContainer();
    // Set the FedAuth cookie
    Cookie samlAuth = new Cookie("FedAuth", cookies.FedAuth)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(samlAuth);
    if (_useRtfa)
    // Set the rtFA (sign-out) cookie, added march 2011
    Cookie rtFa = new Cookie("rtFA", cookies.rtFa)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(rtFa);
    _cachedCookieContainer = cc;
    return cc;
    return null;
    return _cachedCookieContainer;
    public CookieContainer CookieContainer
    get
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    return getCookieContainer();
    return _cachedCookieContainer;
    private MsoCookies getSamlToken()
    MsoCookies ret = new MsoCookies();
    try
    var sharepointSite = new
    Wctx = office365Login,
    Wreply = _host.GetLeftPart(UriPartial.Authority) + "/_forms/default.aspx?wa=wsignin1.0"
    //get token from STS
    string stsResponse = getResponse(office365STS, sharepointSite.Wreply);
    // parse the token response
    XDocument doc = XDocument.Parse(stsResponse);
    // get the security token
    var crypt = from result in doc.Descendants()
    where result.Name == XName.Get("BinarySecurityToken", wsse)
    select result;
    // get the token expiration
    var expires = from result in doc.Descendants()
    where result.Name == XName.Get("Expires", wsu)
    select result;
    ret.Expires = Convert.ToDateTime(expires.First().Value);
    HttpWebRequest request = createRequest(sharepointSite.Wreply);
    byte[] data = Encoding.UTF8.GetBytes(crypt.FirstOrDefault().Value);
    using (Stream stream = request.GetRequestStream())
    stream.Write(data, 0, data.Length);
    stream.Close();
    using (HttpWebResponse webResponse = request.GetResponse() as HttpWebResponse)
    // Handle redirect, added may 2011 for P-subscriptions
    if (webResponse.StatusCode == HttpStatusCode.MovedPermanently)
    HttpWebRequest request2 = createRequest(webResponse.Headers["Location"]);
    using (Stream stream2 = request2.GetRequestStream())
    stream2.Write(data, 0, data.Length);
    stream2.Close();
    using (HttpWebResponse webResponse2 = request2.GetResponse() as HttpWebResponse)
    ret.FedAuth = webResponse2.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse2.Cookies["rtFa"].Value;
    ret.Host = request2.RequestUri;
    else
    ret.FedAuth = webResponse.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse.Cookies["rtFa"].Value;
    ret.Host = request.RequestUri;
    catch (Exception ex)
    return null;
    return ret;
    static HttpWebRequest createRequest(string url)
    HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.CookieContainer = new CookieContainer();
    request.AllowAutoRedirect = false; // Do NOT automatically redirect
    request.UserAgent = userAgent;
    return request;
    private string getResponse(string stsUrl, string realm)
    RequestSecurityToken rst = new RequestSecurityToken
    RequestType = WSTrustFeb2005Constants.RequestTypes.Issue,
    AppliesTo = new EndpointAddress(realm),
    KeyType = WSTrustFeb2005Constants.KeyTypes.Bearer,
    TokenType = Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml11TokenProfile11
    WSTrustFeb2005RequestSerializer trustSerializer = new WSTrustFeb2005RequestSerializer();
    WSHttpBinding binding = new WSHttpBinding();
    binding.Security.Mode = SecurityMode.TransportWithMessageCredential;
    binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
    binding.Security.Message.EstablishSecurityContext = false;
    binding.Security.Message.NegotiateServiceCredential = false;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
    EndpointAddress address = new EndpointAddress(stsUrl);
    using (WSTrustFeb2005ContractClient trustClient = new WSTrustFeb2005ContractClient(binding, address))
    trustClient.ClientCredentials.UserName.UserName = _username;
    trustClient.ClientCredentials.UserName.Password = _password;
    Message response = trustClient.EndIssue(
    trustClient.BeginIssue(
    Message.CreateMessage(
    MessageVersion.Default,
    WSTrustFeb2005Constants.Actions.Issue,
    new RequestBodyWriter(trustSerializer, rst)
    null,
    null));
    trustClient.Close();
    using (XmlDictionaryReader reader = response.GetReaderAtBodyContents())
    return reader.ReadOuterXml();

  • Raw files from the new Nikon D810 will not open with either Photoshop CS5.1 or Lightroom 4.  When will a real Adobe solution be available to work with Raw (NEF) files in their native format, using CS5.1 and LR4?

    Raw files from the new Nikon D810 will not open with either Photoshop CS5.1 or Lightroom 4.  When will a real Adobe solution be available to work with Raw (NEF) files in their native format, using CS5.1 and LR4?

    Clarification: this is a user forum; you are not addressing Adobe here.
    The answer to your question as phrased is: never.
    CS5 is history and it is not longer supported.  There will not be any updates or bug fixes for CS5.
    You need to convert the raw NEF files from your D810 to raw DNGs using the free, standalone Adobe DNG Converter 8.6 RC (beta), the first version ever to support that camera.. 

  • I can't download ARW files from the card I use in my SONY RX100M2

    I can't download ARW files from the card I use in my SONY RX100M2

    You could just download and install LR5.2 right now
    Mac: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5647
    Win: http://www.adobe.com/support/downloads/detail.jsp?ftpID=5648
    Enter your serial number (when you receive it) to license the software on your computer.

  • Where can I download the File 102_EWT_config_EN_IN.xls

    Hi,
    In the documentation DVD it has been asked to refer the file 102_EWT_config_EN_IN.xls. But I'm not able to find that file. Can it be downloaded from somewhere?
    Thanks in advance...
    Regards,
    Sriram

    I am also searching for the same. I couldnt find it with the DVD or SAP Notes.
    If you get it please let me also know...

  • Cannot download Mp3 files and some other format

     Hi people,
    I cannot download Mp3 files and many other files. I cannot update my Ovi Store app and pretty much everything else. I can download pdf and zip using opera but almost everything else (including mp3 and sis files) redirects to Nokia browser which just freezes no download. I have tried another same model phone E72 and no problem.
    It seem my browser is corrupt and can't find way to reinstall.
    Also why don't nokia let us download with browser of our choice? I would rather use opera than inbuilt one
    Stefano

    Hi evstevemd
    Apart from loss of data issue in the circumstances you may have to either "hard reset" or re-install existing firmware to eliminate possible software corruption.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • I am not able to convert a pdf file to a xml format using adobe reader 11. please tell me how to do the same!!!

    I have to upload a form in xml format. The file is in pdf format. I am using adobe reader 11. Please tell me how to export to xml format. There is no option for xml.

    Please give us a link to the instructions you are trying to follow.

  • Problems in Downloading a file from a web site using HttpClient

    Hi,
    My requirement is to download a file from a website using a java program. I have written a program using HttpClient API but I am unable to do so. Reality is that I don't know how to proceed with the HttpClient API to get the file downloaded. Same file can also be downloaded manually by login to that website, below mentioned steps are to be followed to download the file manually.
    1. Login to the website using Login/Password (I have valid login/password)
    2. Two options (links) are there (a) Report (b) Search [I am chosing report option]
    3. Newly opened window shows two tabs (a) Today (b) From & To [I am selection Today tab]
    4. Every tab has two radio button (a) File (b) Destination [Destination is selected by me]
    5. When Search button is pressed. A link gets created when that link is clicked file download popup is opened which allows facility to open/save the file.
    All these 5 step are to be followed in a java program to download the file. Please help in doing the same.

    // first URL which is used to open the website, this will have two text fields userName and password
    String finalURL = "http://www.xyz.in/mstatus/index.php";
    SMSGatewayComponentImpl obj = new SMSGatewayComponentImpl();
    obj.sendMessage(finalURL);
    public void sendMessage(String finalURL) {
    String ipAddrs = "a.b.c.d";
    int port = 8080;
    boolean flag = false;
    try {
    // Create an instance of HttpClient.
    HttpClient client = new HttpClient();
    HostConfiguration hostConfig = new HostConfiguration();
    hostConfig.setProxy(ipAddrs,port);
    client.setHostConfiguration(hostConfig);
    // Create a method instance.
    String cookieName=null;
    String cookieValue=null;
    // Here URL for the login page is passed and passing the user/password
    PostMethod method = new PostMethod(finalURL);
    method.setRequestHeader("userid","userName");
    method.setRequestHeader("passwd","pwd");
    // Execute the method.
    int statusCode = client.executeMethod(method);
    Cookie[] cookies = client.getState().getCookies();
    for (int i = 0; i < cookies.length; i++) {
    Cookie cookie = cookies;
    cookieName = cookie.getName();
    cookieValue = cookie.getValue();
    System.err.println(
    "Cookie: " + cookie.getName() +
    ", Value: " + cookie.getValue() +
    ", IsPersistent?: " + cookie.isPersistent() +
    ", Expiry Date: " + cookie.getExpiryDate() +
    ", Comment: " + cookie.getComment());
    NameValuePair[] respParameters = method.getResponseHeaders();
    String cookie = "";
    for(NameValuePair o : respParameters){
         System.out.println("Name : "+o.getName());
         System.out.println("Value : "+o.getValue());
         if("Set-Cookie".equalsIgnoreCase(o.getName()))
              cookie = o.getValue();
    NameValuePair[] footParameters = method.getResponseFooters();
    System.out.println("****************** Footer Values *******************");
    for(NameValuePair o1 : footParameters){
    System.out.println("Name : "+o1.getName());
    System.out.println("Value : "+o1.getValue());
    // This is jthe URL which comes when login/passowrd is entered and Login button is pressed.
    // I am trying to get the cookie from the first URL and pass this cookie for the second URL so that the session can be maintained
    // Here I may be wron..don't know is this the right way to download the file like this.....????
    finalURL = "http://www.xyz.in/mstatus/mainmenugrsms.php";
         method = new PostMethod(finalURL);
         method.setRequestHeader(cookieName,cookieValue);
         method.setRequestHeader("userid","userName");
         method.setRequestHeader("passwd","pwd");
         method.setRequestHeader("Set-Cookie",cookie);
         statusCode = client.executeMethod(method);
         respParameters = method.getResponseHeaders();
    for(NameValuePair o : respParameters){
    System.out.println("Name : "+o.getName());
         System.out.println("Value : "+o.getValue());
    // and this is the final URL which i got when that final link which enabled file download from the website have been copied as a shortcut and
    // pasted in a notepad. I was thinking that this will return the file as an input stream. but its not happening.
         finalURL = "http://www.xyz.in/mstatus/dlr_date.php#";
         method = new PostMethod(finalURL);
         method.setRequestHeader("Set-Cookie",cookie);
         method.setRequestHeader("userid","userName");
    // userid and passwd field are obtained when login/password page contents are seen using view source of that html
         method.setRequestHeader("type","1");
         // trying to set the cookie so that session can be maintained
    method.setRequestHeader(cookieName,cookieValue);
         method.setRequestHeader("passwd","pwd");
         statusCode = client.executeMethod(method);
         ObjectInputStream objRetInpuStream = new ObjectInputStream(method.getResponseBodyAsStream());
         System.out.println("objRetInpuStream : "+objRetInpuStream);
         if(objRetInpuStream!=null)
         System.out.println("objRetInpuStream available bytes : "+objRetInpuStream.available());
         String returnFile=(String)objRetInpuStream.readObject();
         System.out.println("Returned value \n : "+returnFile);
         respParameters = method.getResponseHeaders();
         for(NameValuePair o : respParameters){
         byte[] responseBody = method.getResponseBody();
         System.out.println("Response Body : "+new String(responseBody));
         if (statusCode != HttpStatus.SC_OK) {
              System.out.println("Error: " + method.getStatusLine());
         } else {
              System.out.println(method.getStatusLine());     
         } catch(Exception nfe) {
                   System.out.println("Exception " + nfe);
    Output
    =====
    /home/loguser/batch> sh run.sh SMSGatewayComponentImpl
    Classname : SMSGatewayComponentImpl
    run.sh[4]: test: 0403-004 Specify a parameter with this command.
    final URL : http://www.xyz.in/mstatus/index.php
    client is :org.apache.commons.httpclient.HttpClient@190e190e
    Cookie: PHPSESSID, Value: anqapu83ktgp8hlot06jtbmdf1, IsPersistent?: false, Expiry Date: null, Comment: null
    Name : Date
    Value : Thu, 06 May 2010 09:08:47 GMT
    Name : Server
    Value : Apache/2.2.3 (Red Hat)
    Name : X-Powered-By
    Value : PHP/5.1.6
    Name : Set-Cookie
    Value : PHPSESSID=anqapu83ktgp8hlot06jtbmdf1; path=/
    Name : Expires
    Value : Thu, 19 Nov 1981 08:52:00 GMT
    Name : Cache-Control
    Value : no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Name : Pragma
    Value : no-cache
    Name : Content-Length
    Value : 4792
    Name : Content-Type
    Value : text/html; charset=UTF-8
    Name : X-Cache
    Value : MISS from dcp.pas.abc.in
    Name : X-Cache-Lookup
    Value : MISS from dcp.pas.abc.in:8080
    Name : Via
    Value : 1.0 dcp.pas.abc.in:8080 (squid/2.6.STABLE21)
    Name : Proxy-Connection
    Value : keep-alive
    Cookie Value : PHPSESSID=anqapu83ktgp8hlot06jtbmdf1; path=/
    ****************** Footer Values *******************
    Name-2 : Date
    Value-2: Thu, 06 May 2010 09:08:47 GMT
    Name-2 : Server
    Value-2: Apache/2.2.3 (Red Hat)
    Name-2 : X-Powered-By
    Value-2: PHP/5.1.6
    Name-2 : Expires
    Value-2: Thu, 19 Nov 1981 08:52:00 GMT
    Name-2 : Last-Modified
    Value-2: Thu, 06 May 2010 09:08:47 GMT
    Name-2 : Cache-Control
    Value-2: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Name-2 : Pragma
    Value-2: no-cache
    Name-2 : Location
    Value-2: index.php
    Name-2 : Content-Length
    Value-2: 0
    Name-2 : Content-Type
    Value-2: text/html; charset=UTF-8
    Name-2 : X-Cache
    Value-2: MISS from dcp.pas.abc.in
    Name-2 : X-Cache-Lookup
    Value-2: MISS from dcp.pas.abc.in:8080
    Name-2 : Via
    Value-2: 1.0 dcp.pas.abc.in:8080 (squid/2.6.STABLE21)
    Name-2 : Proxy-Connection
    Value-2: keep-alive
    Cookie Value second time : PHPSESSID=anqapu83ktgp8hlot06jtbmdf1; path=/
    **Exception java.io.EOFException**
    Is my approach to download the file fromthe website ok????? please help me.

  • Reading file in UFT-8 format using OWB

    Is it possible to read a flat file having data in UFT-8 format with OWB?

    Hi
    This should be fine, the character set can be defined for files, OWB can load a wide range of file based data from ascii, to binary, to single record to multi record etc..
    The ascii based handling is simple, there is a post on the blog illustrating more complex cases;
    http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$470
    Cheers
    David

  • Cannot download a file with internet explorer 6 using SSL connection

    Hello,
    I am working on a application that uses SSL. But when the clicks a button to donwload a file using IE 6 or IE 7, internet explorer shows a error message saying that "The internet explorer cannot open this site". This error dont occur in Firefox, but i have to use Internet Explorer. And the error occurs only if i use https, with http it works fine.
    I search the net and i found that internet explorer has a bug, that when the server sends the http header "Pragma: no-cache" or "Cache-control: no-cache,max-age=0,must-revalidate", then the internet explorer doesnt cache the file, and i cannot open it. See here: http://support.microsoft.com/kb/316431/en-us
    My problem is that OC4J appears to send this headers automatically. I am using Oracle Enterprise Manager 10g Application Server Control 10.1.3.3.0. Here, is my code to send the file:
    HttpServletResponse response = (HttpServletResponse)
    FacesContext.getCurrentInstance().getExternalContext().getResponse();
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition", "attachement; filename=\"file.pfx\"");
    response.setContentLength((new Long(myFile.length())).intValue());
    OutputStream out=null;
    try {
    out = response.getOutputStream();
    fis = new FileInputStream(myFile);
    int n;
    while ((n = fis.available())> 0) {
    b = new byte[n];
    int result = fis.read(b);
    out.write(b, 0, b.length);
    if (result == -1) break;
    out.flush();
    out.close();
    } catch (Exception e){
    throw new DownloadException("Erro ao enviar arquivo para o stream de download.");
    finally{
    FacesContext.getCurrentInstance().responseComplete();
    You can see that i not send that headers in this code.
    Here, is the headers sent to IE when i use https.
    HTTP/1.x 200 OK
    Date: Wed, 07 May 2008 17:40:28 GMT
    Server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
    Pragma: no-cache
    Cache-Control: no-store
    Surrogate-Control: no-store
    Expires: Thu, 01 Jan 1970 12:00:00 GMT
    Content-Length: 5208
    Set-Cookie: JSESSIONID=ac1002292008f788e14d0d6e40c29f3185f2fc72e5b9.e3eTb3mTb3yKe34SbhqOaxyTe6fznA5Pp7ftnR9Jrl0; path=/actcers; secure
    content-disposition: attachement; filename="file.pfx"
    Keep-Alive: timeout=15, max=74
    Connection: Keep-Alive
    Content-Type: application/x-download
    I hope that someone can helpme.
    Tanks
    Message was edited by:
    user635088

    Hi!
    I don't have a solution fou you, just a few ideas =)
    You can check what headers response contains with
    response.containsHeader( "your_header_here");
    http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/servlet/http/HttpServletResponse.html#containsHeader(java.lang.String)
    after that you could set/overwrite those headers that you don't like with, for example:
    response.setHeader("Cache-control", "no-cache,max-age=0,must-revalidate");
    Aparently Pragma and Cache-control headers should be used in pair, as noted here
    http://curl.haxx.se/mail/archive-2005-12/0003.html
    quote:"The author of Bad Behavior points out that RFC2616 requires that a
    Pragma: header to be accompanied by a Cache-Control: header. From what I
    see, it only says "SHOULD" (in section 14.32), but that is still a
    strong recommendation and something to be considered, IMHO."
    I'm a bit sceptical about you needing to cache the file, but if you feel strong about it, you could read this
    http://www.mnot.net/cache_docs/#META
    If you're working on SSL there is supposed to be some kind of validation, certificate or something like that. IE6 and 7 both have strong security measures in these regards. Maybe you should look something up in that direction.
    Hope I helped.

  • Writing a file in UTF-8 Format using FileWriter

    Hi,
    I am trying to write some data to the file system using a filewriter object. I want the file to be stored in UTF-8 encoding. Please give me some pointers regarding the same.
    Best Regards,
    Pradeep

    First you have to declare that you will use UTF8 :
    OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(myFilePath,true),"UTF8");Then you can write in you file in UTF8.
    The problem is that when you open the file with an editor like Crimson or UltraEdit, it says that your file is encoded in ASCII ... even if your stream had well been saved in UTF8.
    To be sure that your file format is UTF8, you have to had at the beginning of your file 3 bytes : EF, BB and BF :
    byte[] x = new byte[3];
    x[0] = (byte) (Integer.parseInt("EF",16));
    x[1] = (byte) (Integer.parseInt("BB",16));
    x[2] = (byte) (Integer.parseInt("BF",16));
    osw.write(new String(x,"UTF8"));Here my "complete" code :
    String myFilePath = "........";
    String myText = "............";
    OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(myFilePath,true),"UTF8");
    System.err.println("osw encoding : "+osw.getEncoding()); //just to be sure of the encoding
    byte[] x = new byte[3];
    x[0] = (byte) (Integer.parseInt("EF",16));
    x[1] = (byte) (Integer.parseInt("BB",16));
    x[2] = (byte) (Integer.parseInt("BF",16));
    osw.write(new String(x,"UTF8"));
    osw.write(new String(myText));
    osw.close();I think you can use OutputStreamWriter instead of FileWriter as FileWriter inherits of OutputStreamWriter.

  • Changes in date format while creating/downloading the file

    Hi All,
    Can any one let me know how does the system determines which date format should it apply while creating/downloading the file.
    Issue :
    When I create/download the file generated by report RTXWCF02 using unix level acess the Date format of a field in file is DD.MM.YYYY where as in user profile i can see its in MM/DD/YYYY.
    I dont understand how system determines the date format and How we can change it. Please suggest.
    Regards,
    Ravi Kasnale

    I would suggest you to use ALV_XXL_CALL if your want to keep your data formats intact.
    like this -   CALL FUNCTION 'ALV_XXL_CALL'
           EXPORTING
                i_tabname           = 'T_GRID'   " Name of your internal table
                it_fieldcat         = t_fcatk[]      "Your LAV grids catalog.
           TABLES
                it_outtab           = t_grid         "Internal table itself
           EXCEPTIONS
                fatal_error         = 1
                no_display_possible = 2
                OTHERS              = 3.
      IF sy-subrc <> 0.
        MESSAGE e806(bk).
      ENDIF.
    hope it helps.

  • How to download a file from a link within an AIR application ?

    Dear friends, I have created a simple AIR app with Flex, where it basically navigates toa specific URL. It works fine, all the links, and so on... however, when I need to click a specific link to download a file (DOC, XLS, PDF) from it... it just do NOT work !  why is it ? what am I supposed to do to achieve my purpose ? Appreciate any help, thanks in advance !

    Hi Arun,
    Goto AL11 - > click on the directory path and select your file  -open the file - > click on menu item List - >save/send -> file
    -> select the type of file.
    Or you can write a small abap code using DATASETS. If you require I will post the code.
    Hope it helps you.
    Regards,
    Rajani.

  • From a film file to a cd format.

    Hi!
    Im trying to burn a documental I downloaded into a cd o dvd in order to watch with my family in the living room cd dvd player but I do not find the way.
    I guess that if I managed to take it into de Itunes may be then I could burn it, but I have not found any information about how to do it.
    the fail is at this moment in the foulder "shared" of the p2p.
    any suggestions please?
    thanks.
    j.fernandez

    To export your PDF file to Excel format:
    Using Web UI:
    Log into https://exportpdf.acrobat.com/signin.html with your Adobe ID and password
    Select “Export from PDF”
    Click “Select Files” button then choose your PDF file
    Select the format from the list below
    Check ON “Recognized text in” if your PDF file is scanned images to recognize the image to text
    Click “Export” button
    Click “Download” button in the progress bar after completion of exporting to download the file to your computer.
    Using Adobe Reader:
    Launch Adobe Reader X or Reader XI
    Select “Tools” and click “Sign In” link to sign in with your Adobe ID and password
    Select “Export PDF” then click “Select PDF file” link to choose your PDF file
    Select format from “Convert To” pull down menu(docx, doc,rtf,xlsx)
    Click “Convert”
    Click “Download Converted File” link to download the file to your computer after the process is completed.
    All exported files are stored at https://files.acrobat.com and you can access with your Adobe ID and password or click "Files" at top in Web UI.
    Hisami

  • Downloading the file through transaction F110.

    Hi all,
           My requirement is to generate a payment file in EFT format(comma separated format) and to download that file to a PC location using the transaction F110. The EFT file needs to generated automatically after the payment run. So I am copying the standard program RFFONZ_T which is the payment medium program and adding my code to generate the EFT file there. After the program execution, the file needs to displayed in  the F110 transaction. But it is not coming in F110.

    Hello,
    Can you please confirm that the program name is maintained in FBZP?
    Goto FBZP --> Pymt Methods in Country --> Give the Payment Method name --> In the Pymt Medium tab, Select the "Use Classic pymt medium programs" & give your program name there.
    In F110, you can view the EFT through:
    Environment --> Pymt Medium --> DME Administration
    BR,
    Suhas
    Edited by: Suhas Saha on Feb 17, 2009 12:48 PM

Maybe you are looking for

  • ITunes syncing: unknown error (-50)

    Whenever I plug in my iPod Shuffle to sync my music a pop up comes up saying 'iTunes could not copy {song name} to the iPod {iPod name} because an unknown error occured (-50).' It happened after it asked me something to do with iTunes Store purchases

  • Can't Delete/Change Schedule Line in Sceduling Agreement

    Hi    I can't delete schedule line in scheduling agreement.    Actually The PO History has diff data & Scheline screen have diff data.    In Po History the Delivered Qty is 1520 GI Qty is 1520 GR Qty is 1520 but when I checked in Delivery Schedule sc

  • Ereading on playbook - orientatio​n

    Just got my playbook today and never had a tablet before so please be gentle with me! I want to know how to have the ebook change orientation when I turn the playbook. Currenlty the books only display horizontally but I thought it should be automatic

  • Explain the situation for using  ale , bapi ,session ,call transation, di

    what is the use of bdcmsgcall, if any erroe occur in the legacy records how to rectify it? In what situation we can go for lsmw. Kindly explain the situation's for using  ale , bapi ,session ,call transation, direct input.

  • How to convert an .xls file to .csv file using procedure or function

    Hi All, My requirement is as follows. 1. In my database server(linux), my excel file will be loaded in a particular directory. 2. I need to load this excel file's data into an external table. 3. Can i load the data from an excel file to table directl