Problem uploading a text file

Hi All,
   I'm trying to upload data from a file in the application server. The file that I read is a 'dat' file and the length for each field is preserved meaning if the currency key field is of length 5 and the file has 'USD' it is filled with spaces for the remaining 2.
I have an internal table t_data which has all the records from the file. I loop through t_data into wa_data. Then I move the contents of my wa_data to the structure work area wa_struct1 which has all my table fields(same length as the fields in the file and all the fields are standard SAP fields).
However the structure wa_struct1 always gets some junk values in fields like exchange rate and amount field (simply it doesn't like any packed number). Because of this all the other fields that come after these fields have the data messed up.
Also I thought maybe it's because of the character to Packed conversion, but then I use a MOVE statement and I'm pretty sure a conversion exists between these two data types. Also the SAP document for conversion between two data types say the source fields can be blank when converting from character to packed and in my case it is sometimes blank and sometimes filled with value. In both cases I always get a junk value like 2020.2020222. Please give me some suggestions. Thanks in advance.
Regards,
Saravana.

Hi
Probably you need to move field by field:
MOVE: FILE-FIELD1 TO WA_STRUC-FIELD1,
           FILE-FIELDN  TO WA_STRUC-FIELDN.
Probably some value has to be converted before moving to SAP structure.
Max

Similar Messages

  • Problems uploading a text file with line feed characters from Windows

    Hi,
    I am using the FM GUI_UPLOAD to load a text file in which at the end of each line there is a line feed character. When I upload the file, the FM interprets the entire file as ONE record; it does not recognize the line feed character at the end of each file line. I am using the parameter in the FM "HAS_FIELD_SEPARATOR" and it does not do anything to remidiate this issue.
    The funny thing is that  WS_upload works like a charm and it separates every line in the text file according to the line feed character at the end of each file line.
    Why a FM that is obsolete would work better and with  less effort than the new one? We are on 4.6c and will go to ECC6.0 May 2009.
    Can anybody recommenced a way to process this type of file using GUI_upload?
    The file to process is downloaded from a bank Website into a Windows PC. Sending the file to Unix first is not an option.
    Thanks,
    Pierre Martinez
    Edited by: Pierre Martinez on Aug 15, 2008 1:09 AM

    Hi,
    I have done that and Notepad does NOT interpret the line feed character. The file looks all messed up. Notepad does NOT split the data into records. The Hex character at the end of each file line is 0A.
    The user will download the file into a Windows desktop from the bank's website and from there an ABAP  program needs to read it and parse it. But the ABAP  program can not even catch the entire file with gui_upload. WS_upload can catch it with no issues.
    I tried catching the file into an internal table of data type string using GUI_upload, but it only catches two bytes of the file and nothing else.
    I will try catching the file in some other type of data type for the internal table in gui_upload.
    Once I catch it, I can split the file by the line feed character. I need to catch it  first, but "my glove" is not big enough. Defining the internal table for the gui_upload as character is a guessing game since I really do not know how big the text file is since GUI_upload will put it in a one record.
    Thanks.

  • How to upload a text file from a shared folder and provide an o/p

    how to upload a text file from a shared folder and provide an o/p  containing the details in each order in the text file

    Hi,
    Use <b>GUI_UPLOAD</b> to upload a text file from a shared folder.
    Use <b>GUI_DOWNLOAD</b> to download data in a file on the presentation server or use <b>OPEN DATASET, TRANSFER</b> and <b>CLOSE DATASET</b> statements to download data to the application server.
    Now, I hope the code for data fetching, if required, is already present in the report.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • 'No Upload Authorization' While Uploading a Text File from Multiple Select

    Hi all,
       The User is trying to upload a text file from Multiple Selection screen of a Query in BEx and it gives the error message of 'No Upload Authorization' (Error DB886).
       In 'Logon data' tab of Tcode SU01, it has 'User' for 'User Group for Authorization check' for this User.
       I could upload a text file from Multiple Selection screen with my User Id.
       An idea about this error, PLEASE ?
    Thanks,
    Venkat.

    Hi Ron,
       This User does not have the access to Tcode ST01.
       The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
      Any further suggestions, PLEASE.
    Thanks.

  • Problems loading a text-file from a shared NT network order

    Hi @ all,
    I try to upload a text file in MII that is destinated in a shared order in the NT file network.
    I used text_loader with URL FILE://SERVERNAME/SHARE/input.txt and I get the error message "connection refused" even if I use credentials with an authorised user.
    Do you have any idea why it does not work?
    Thanks in advance!
    Sebastian

    Hi,
    For this you need to use FTP Input Action. Put all the files(you want to upload to MII) are in shared network into your FTP server.
    Then use the FTP related actions in transaction. This is the best way.
    Also see the similar [Thread|Re: Saving a file to an external system from MII server] and [Help|http://help.sap.com/saphelp_mii121/helpdata/en/44/710ca09ea03abee10000000a155369/content.htm]
    Hope this helps you.
    -Suresh

  • Uploading a text file to FTP Loc

    Hi,
    Please guide me in the following query:
    While uploading a text file to FTP Loc by using FM 'FTP_R3_TO_CLIENT', all the data is coming in one line. Please guide me how can i insert the new line character after the end of each line.
    Please guide.
    Thanks and Regards

    Hi,
    When i make the character_mode = 'X', then no data is getting uploaded to FTP Loc, only a blank file is being created. Please guide.
    Thanks and Regards
    Edited by: MP Vashishth on Jan 12, 2010 10:34 AM

  • Problem in creating text file from report file

    Hello Everybody...
    I have problem in creating text file.
    I had set System Parameter as below
    DESTYPE : File
    MODE : Character
    DESNAME : gayu.txt
    And ruler setting
    Units : Character Cells
    Character Cell Size : Horiziontal = 7
    Vertiacle =12
    GridSpacing : 1
    no of snap points per grid spacing : 1
    but when i run report it will give error
    "REP_1219 M_2 or R_2 has no size -- length or width zero"
    so is there any solution of that
    or another way to convert report into text file?....

    Hi Folks,
    Please don't go after that Error as its a very deceptive one. Please don't go for altering your design Or changing the size of items in your layout.
    Similar errors I have come across in reports. I think its due to file transfer type. You might have transferred the file in Binary and your File Mode I am seeing it as CHAR.
    This normally happens while making the Report Format as "Text". Either you change that format which I think is possible in your case as your basic requirement is making a report output of CHAR type.
    Please check for this error in Metalink and proceed accordingly. I could fix similar errors when I changed Format type to PDF(from text).
    Regards
    Shibu

  • Upload a text file of values when run a query

    In SAP BW 3.x BEx Analyzer, we can import a text file with list of values for each variable.
    For example, you want to run a report for certain product numbers, but say the prod no list is of 3000 no's long, it'll take the user forever to select and enter them in the report entry variable, so instead you upload a text file, with all this list of 3000 prod no's and run the report.
    Does this option still exist anywhere for version 7.0? BI Analyzer is different than Bex Analyzer. Can anyone explain it? Thanks!

    Hi Qingbo,
    Not using any standard solution (i don't know any in 3.5) you can use an variable of type exit. Inside the variable value calculation, you can use a flat file stored in the application server to read the values of the variable.
    Another option is to store those values in a cube (mantained using flat file upload or a BPS layout) and use a replacement path variable using a query over this cube to run the query you need.
    Hope this helps.
    Regards,
    Diego

  • How to upload a text file to a webpage and process it using a Java app?

    Apologies if the question is off topic.
    I would like a user to upload a text file to a webpage and have a pre-existing Java application I created process the text file and return the results to the user. The Java application is fairly memory intensive. It is expected that multiple clients will be uploading at the same time. What is the simplest or most efficient method to achieve this?
    Thank you

    This might help you to get started: http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml
    As done in this example, processing the uploaded file in the JSP itself may not be a good idea though. You're better off handling it in your controller servlet or action class.

  • Uploading a text file from webi filter area as part of the query condition

    Post Author: balasura
    CA Forum: Publishing
    Requirement : Uploading a text file from webi filter area as part of the query condition Hi, I am in a serious requirement which I am not sure available in BO XI. Can some one help me plz. I am using BO XI R2, webi I am generating a ad-hoc report, when I want to give a filter condition for a report, the condition should be uploaded from a .txt file. In the current scenario we have LOV, but LOV could hold only a small number of value, my requirement is just like a lov but the list of values will be available in a text file ( which could number to 2000 or 2500 rows). I would like to upload this 2500 values in the form of a flat text file to make a query and genrate report. Is it possible in BO XI? For Eg:- Select * from Shipment Where u201CShipment id = u2018SC4539u2019 or Shipment id = u2018SC4598u2019u201D The u201Cwhereu201D condition (filter) which has shipment id will be available in a text file and it needs to be loaded in the form of .txt file so that it will be part of the filter condition. Content of a .txt file could be this shipment.txt =============== SC4539 sc2034 SC2343 SC3892 . . . . etc upto 2500 shipment Ids I will be very glad if some could provide me a solution. Thanks in advance. - Bala

    Hi Ron,
       This User does not have the access to Tcode ST01.
       The user executed Tcode SU53 immediately following the authorization failure to see the authorization objects. The 'Authorization obj' is blank and under the Description it has 'The last Authorization check was successful' with green tick mark.
      Any further suggestions, PLEASE.
    Thanks.

  • Problems Uploading a Pages file in html format including pictures to web pa

    I have problems uploading a Pages file in html format to a web page.
    The files itself is downloaded but the images are not. How can I upload a page file in html including the pictures or illustrations?

    I just bought a macbook as well as the iwork software. I am having a few problems. I am a student and when I try to print out documents (originally word documents) it puts them automatically into textedit instead of pages. Also, the pages get all screwed up, things are missing, etc. How do I make pages my default and do i need to export? import? or do something so that these documents show up perfectly in pages?
    A second questions- When i try to print out slideshows in keynote (originally from powerpoint) the handouts print on the little edge of the paper horizontally rather than the long way. I am hoping these are easy adjustments.
    I would appreciate any help anyone can give me.
    Thank you!

  • How to upload the text file into smart forms

    Hi Experts,
    can any one tell me that how to upload  the text file or html file to SAP Script form or smart forms
    i have download the form info from SAPscript form.to text file.
    now i want to upload the text file to smartforms.
    is it possible ? if it is possible, then how can i do that ?
    Thanks in Advance.
    Regards,
    Mani

    <b>For Scripts</b>
    Go to SE38. Put in the program name RSTXSCRP. Execute it.
    Mode(Export/Import) : Import.
    Give the file name from which you want to upload and execute it.
    <b>For Smartforms</b>
    TCode : smartforms.
    Give the form name.
    Utilities-->Upload form.
    Reward points if helpful.
    Thanks
    Aneesh.

  • I am facing problem to get text file from application sever

    Hi This is lokesh.
    Actually my requirement is to craete sales orders by getting file from other server.for that i have used shell script to connect that server.Ok i am connecting to that different server(not sap server) successfully.
    But my problem is getting text file from application SERVER.
    That different server people will send the file name as 'DDHHMMSS' (Days,Hours,Minutes,Seconds).
    Just suppose if they will send today means that file name will come as 20103025. and with in half an hour if they again send that file file means that file name as '20110025'.
    like that file name is always varies.So how can i read that type of text files from the application server.
    and one more thing that is there chance to read morethan one text file from application server.
    Pls guide me if u know the solution.PLs this requirement is urgent.
    Regards,
    Lokeshgoud

    Hi..,
    <b>Just execute this program ... this is for the files received in JUST 3 MINS...</b>
    change it according to your requirement !!
    data time type sy-uzeit value '100000'. <i>"<<----start time</i>
    data file(8) type c value '20'.
    do 180 times. <i>" <<----- for 3 minutes</i>
    add sy-index to time.
    concatenate file time into file.
    write / file.
    OPEN DATASET FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC EQ 0.
    PERFORM READ_DATASET.
    ENDIF.
    file = '20'.
    time = '100000'.
    ENDDO.
    <b>form read_dataset.
    read the file here with the file name <b>FILE</b>.
    endform.</b>
    regards,
    sai ramesh

  • Uploading a text file to a server using gprs connection and http method

    Hi,
    I want to upload a text file from my windows mobile device( WM 6.1 version) to a server using the gprs connection and the http method. The application runs on IBM weme j9 VM.
    Anybody having done anything similar to this,please post a code snippet or provide helpful resources..
    Thanks in advance.
    Edited by: 803691 on Oct 20, 2010 3:50 AM

    Please give a response..
    I want to know whether there is a feasible solution for this in java..
    PLease provide code snippets for establishing gprs connection in java..

  • How to upload a text file...

    here iam developing a web application in that i need to upload a text file and that text file should converted in to binary file...
    i have done the above things...by using just files concept...
    for that i used file reader and writer objects and buffer reader and writer objects...and string tokenizer...now what i need is to upload a text file before converting it into binary fle....
    iam using tomcat...
    plz any one help me....

    You would use a FileReader for reading streams of characters from a text file, so you could open the file through a FileInputStream instead for a byte array. Look at the Java API for the read method.
    Why do you need it in byte array format?

Maybe you are looking for

  • Text type to PLD report ??

    Anyone know how to bring the information from the row text detail from the form to the PLD report? Cannot find the help anywhere. For example, I open the new Sale order and create as the following.. Item1 Item2 Text Item3 Text Item4 When I print, it

  • Payment term

    Hi GURU I want to get the report for purchasing payment terms for all of our creditors. can any one tell me the table are tcode kind regards sunitha

  • GeForce2 GTS refresh rate problem

    I have a GeForce2 GTS (MSI Starforce 815) running on an IWill KK266 (KT133A chipset) and a Sony GDM-400PS monitor. My problem is that when I set the refresh rate to "optimal" it runs at 60hz. This is a problem because my eyes are really sensitive to

  • Anyone else getting the BLACK screen of death after Kitkat 4.4 update?

    Ever since the update, my phone is wacked, like everyone elses.  I got my Samsung Galaxy S4 a month ago.  Beautiful, loved it.  Update happens: I want to pitch this thing as far as I can throw it. The phone rings.  I go to answer it but all I have is

  • Leopard Latency?

    Hello. Unlike the recent post concerning rendered files disappearing: I am having the opposite problem of rendered files appearing. E.g., I render out a 16bit tiff file and if I import back into Shake, the file is empty. If I try to import into photo