Using flat file to upload in ABAP. Please help. Urgent

Hi all,
I am using a CSV excel file to upload some data to my ABAP program. Thje file contains material numbers as one of the fields. But if I enter the material number 11910892E80, excel converts it to  1.19E+87. Since I am using this file in the program to extract some fields from MARA, i am getting an error 'Material number does not exist'.
I know that we can avoid this problem by changing the format type of the cell to 'text' in excel. I want to know if there is any other way to rectify this problem. I have to use an excel file for upload. Notepad will not do.
Please help me solve this problem. It is urgent.
Thanks and regards,
Swaminath

Hi
If it is comma delimited file (CSV format) you can directly read the whole file and into a table with one field.
Loop at that table.
Use split a comma into fields of your internal table.
endloop.
Sample code
move pcfile to v_file.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME                = v_file
      FILETYPE                = 'ASC'
      HAS_FIELD_SEPARATOR     = 'X'
    TABLES
      DATA_TAB                = in_rec
    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 ne 0.
    write:/5 'Error with PC file'.
  endif.
  loop at in_rec.
    if in_rec(4) ca number.
      split in_rec at p_del into
        itab-tcode  itab-tcodet
        itab-saknr
        itab-waers1 itab-waers2
        itab-amt1   itab-amt2
        itab-gl itab-kostl
        itab-prctr itab-obukrs
        itab-otcode itab-otcodet.
      if itab-amt1 = '0.00' or itab-amt1 = space.      "skip this line
        continue.
      endif.
      move-corresponding itab to fitab.
      append fitab.
      clear: itab, fitab.
     append itab.
    endif.
  endloop.

Similar Messages

  • How to create the Export Data and Import Data using flat file interface

    Hi,
    Request to let me know based on the requirement below on how to export and import data using flat file interface.....
    Please provide the steps involved for the same.......
    BW/BI - Recovery Process for SNP data. 
    For each SNP InfoProvider,
    create:
    1) Export Data:
    1.a)  Create an export data source, InfoPackage, comm structure, etc. necessary to create an ASCII fixed length flat file on the XI
    ctnhsappdata\iface\SCPI063\Out folder for each SNP InfoProvider. 
    1.b)  All fields in each InfoProvider should be exported and included in the flat file. 
    1.c)  A process chain should be created for each InfoProvider with a start event. 
    1.d)  If the file exists on the target drive it should be overwritten. 
    1.e)  The exported data file name should include the InfoProvider technical name.
    1.f)  Include APO Planning Version, Date of Planning Run, APO Location, Calendar Year/Month, Material and BW Plant as selection criteria.
    2) Import Data:
    2.a) Create a flat file source system InfoPackage, comm structure, etc. necessary to import ASCII fixed length flat files from the XI
    ctnhsappdata\iface\SCPI063\Out folder for each SNP InfoProvider.
    2.b)  All fields for each InfoProvider should be mapped and imported from the flat file.
    2.c)  A process chain should be created for each InfoProvider with a start event. 
    2.d)  The file should be archived in the
    ctnhsappdata\iface\SCPI063\Archive directory.  Each file name should have the date appended in YYYYMMDD format.  Each file should be deleted from the \Out directory after it is archived. 
    Thanks in advance.
    Tyson

    Here's some info on working with plists:
    http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Introduc tion/chapter1_section1.html
    They can be edited with any text editor. Xcode provides a graphical editor for them - make sure to use the .plist extension so Xcode will recognize it.

  • Steps to load the data by using flat file for hierarchies in BI 7.0

    Hi Gurus,
    steps to load the data by using flat file for hierarchies in BI 7.0

    hi ,
    u will get the steps int he following blog by Prakash Bagali
    Hierarchy Upload from Flat files
    regards,
    Rathy

  • Export Table to flat file and upload to FTP server for external vendor

    I have done some extensive searches on the forums and I think I have an idea but really need some help. Basically have a table that needs to be exported to a flat file and uploaded to a FTP server so that our vendor can get the data Monday-Saturday and automated by sysdate. This data is used to produce daily letters that go out to customers.
    After doing some searching I came across the UTL_FILE package and reading more into this right now but I am not sure if it is what I should be using to create the file.
    I am using TOAD right now and can see how to do it manually however really need the file to create itself and send automatically at 6 am Monday - Saturday with the date at the end of the file name making it a unique file for each day.
    Thanks in advance for all of your help.

    As Justin and others have mentioned I wrote [XUTL_FTP|http://www.chrispoole.co.uk/apps/xutlftp.htm] so you wont find it in the Oracle documentation. It's pure PL/SQL and uses UTL_TCP and implements an integrated PL/SQL FTP client / API. One of it's many overloaded procedures FTP's the contents of a refcursor straight to a FTP server of your choice, meaning no intervening file is required. Since it is pure PL/SQL, it is trivial to schedule using DBMS_JOB/DBMS_SCHEDULER.
    Any questions just ask.
    HTH Chris

  • How to load hierrarchies using dtp  using flat file  in bw  ineed clear ste

    how to load hierrarchies using dtp  using flat file  in bw  ineed clear steps

    Hi,
    If you want to load InfoObjects in the form of hierarchies, you have to activate the indicator with hierarchies for each of the relevant InfoObjects in the InfoObject maintenance. If necessary, you need to specify whether the whole hierarchy or the hierarchy structure is to be time-dependent, whether the hierarchy can contain intervals, whether additional node attributes are allowed (only when loading using a PSA), and which characteristics are allowed.
    1.Defining the source system from which you want to load data:
    Choose Source System Tree ® Root (Source System) ® Context menu (Right Mouse Button) ® Create.
    For a flat file, choose: File System, Manual Metadata; Data via File Interface.
    2.Defining the InfoSource for which you want to load data:
    Optional: Choose InfoSource Tree ®Root (InfoSources) ® Context Menu (Right Mouse Button) ® Create Application Component.
    Choose InfoSource Tree ® Your Application Component ® Context Menu (Right Mouse Button) ® Create InfoSource ® Direct Update
    Choose an InfoObject from the proposal list, and specify a name and a description.
    3.Assigning the source system to the InfoSource
    Choose InfoSource tree ® Your Application Component ® One of your InfoSources ® Context Menu (Right Mouse Button) ® Assign Source System. You are taken automatically to the transfer structure maintenance.
    The system automatically generates DataSources for the three different data types to which you can load data.
          Attributes
          Texts
          Hierarchies (if the InfoObject has access to hierarchies)
    The system automatically generates the transfer structure, the transfer rules, and the communication structure (for attributes and texts).
    4.Maintaining the transfer structure / transfer rules
    Choose the DataSource to be able to upload hierarchies.
    Idoc transfer method: The system automatically generates a proposal for the DataSource and the transfer structure. This consists of an entry for the InfoObject, for which hierarchies are loaded. With this transfer method, during loading, the structure is converted to the structure of the PSA, which affects performance.
    PSA transfer method: The transfer methods and the communication structure are also generated here. 
    5.Maintaining the hierarchy:
    Choose Hierarchy Maintenance, and specify a technical name and a description of the hierarchy.
    PSA Transfer Method: You have the option here to set the Remove Leaf Value and Node InfoObjects indicator. As a result, characteristic values are not transferred into the hierarchy fields NODENAME, LEAFFROM and LEAFTO as is normally the case, but in their own transfer structure fields.  This option allows you to load characteristic values having a length greater than 32 characters.
    Characteristic values with a length > 32 can be loaded into the PSA, but they cannot be updated in characteristics that have a length >32.
    The node names for pure text nodes remain restricted to 32 characters in the hierarchy (0HIER_NODE characteristic).
    The system automatically generates a table with the following hierarchy format (for sorted hierarchies without removed leaf values and node InfoObjects):
    Description
    Field Name
    Length
    Type
    Node ID
    NODEID
    8
    NUMC
    InfoObject name
    INFOOBJECT
    30
    CHAR
    Node name
    NODENAME
    32
    CHAR
    Catalog ID
    LINK
    1
    CHAR
    Parent node
    PARENTID
    8
    NUMC
    First subnode
    CHILDID
    8
    NUMC
    Next adjacent node
    NEXTID
    8
    NUMC
    Language key
    LANGU
    1
    CHAR
    Description - short
    TXTSH
    20
    CHAR
    Description - medium
    TXTMD
    40
    CHAR
    Description- long
    TXTLG
    60
    CHAR
    The system transfers the settings for the intervals and for time-dependency from the InfoObject maintenance. Depending on which settings you have defined in the InfoObject maintenance, further table fields can be generated from the system.
    The valid from and valid to field is filled if you select Total Hierarchy Time-dependent in the InfoObject maintenance. The time-dependent indicator is activated if you select the Hierarchy Nodes Time-dependent option in the InfoObject maintenance.
    6.Save your entries.
    Depending on which settings you defined in the InfoObject maintenance, additional fields can be generated from the system. Also note the detailed description for Structure of a Flat Hierarchy File for Loading via an IDoc and for Structure of a Flat Hierarchy File for Loading via a PSA.
    Also find the below blog for your reference...
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    You can load hierarchy using process chain...
    Find the below step by step procedure to load hierarchy using process chain...
    http://help.sap.com/saphelp_nw70/helpdata/EN/3d/320e3d89195c59e10000000a114084/frameset.htm
    Assign points if this helps u...
    Regards,
    KK.
    Edited by: koundinya karanam on Apr 8, 2008 1:08 PM
    Edited by: koundinya karanam on Apr 8, 2008 1:09 PM

  • Unable to update software or upload pics from SD card-how do I remove files from startup disk? Please help!

    Unable to update software or upload pics from SD card-how do I remove files from startup disk? Please help!

    Hello Smile_333
    The article below will assist with finding things and help increase the hard drive space for your computer. The best way is to have an external hard drive to copy things to if you do not want to delete and loose things.
    OS X Mountain Lion: Increase disk space
    http://support.apple.com/kb/PH10677
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Object reference not set to an instance of an object error when generating a schema using flat file schema wizard.

    I have a csv file that I need to generate a schema for. I am trying to generate a schema using flat file schema wizard but I keep getting "Object reference not set to an instance of an object." error when I am clicking on the Next button after
    specifying properties of the child elements on the wizard. At the end I get schema file generated but it contains an empty root record with no child elements.
    I thought may be this is because I didn't have my project checked out from the Visual SourceSafe db first but I tried again with the project checked out and got the same error.
    I also tried creating a brand new project and generating a schema for it but got the same error.
    I am not sure what is causing Null Reference exception to be thrown and there is nothing in the Windows event log that would tell me more about the problem.
    I am using Visual Studio 2008 for my BizTalk development.
    I would appreciate if some has any insides on this issue.

    Hi,
    To test your environment, create a new BizTalk project outside of source control.
    Create a simple csv file on the file system.
    Name,City,State
    Bob,New York,NY
    Use the Flat file schema Wizard to create the flat file schema from your simple csv instance.
    Validate the schema.
    Test the schema using your csv instance.
    This will help you determine if everything is ok with you environment.
    Thanks,
    William

  • How to use 'flat file extraction' option in Infospoke

    Hello Gurus,
    We are trying to extract the BW data using Infospoke to a 3rd party ETL tool (Datastage). Now in the current BW 3.5 release, the customer is on SP11 and we are not able to extract any data using a 3rd party system option in Infospoke. Due to the fact, we found out from SAP, that since we are getting an error (3rd party system is not set)in infospoke, we have to upgrade the SP level from 11 to either 16 or 17. The customer that we are dealing with is not going to do that until July - 2007.
    So now we have a second option to load the 'flat file' in BW App. server and FTP to Datastage. Is this something workable option?
    When using that option within Infospoke destination Tab, we can see two options. One is to use File option and load the data within the standard DIR HOME. I tried that but I can't see the file and the entire data within the standard directory. Can anyone explain why and what will be the procedure to follow?
    The second option is to use Logical file. I never done that before. Can anyone explain step by step process or provide the detail document and/or link?
    Since we are at the critical timeframe stage, I would appreciate if I can get the faster response from the Gurus.
    I will make sure to give 'reward points' to each and every helpful answer(s).
    thanks in advance,
    Maulesh

    Hi shashi,
    first, let me clarify one thing here! I am not saying '3rd party tool' as an option in infospoke. I know Infospoke provides only two options (DB table, and file). But when you use DB table option, you check mark on 3rd party destination and that's where you define an RFC destination for 3rd party tool. So when you execute an infospoke, it will start extracting data and load into the defined destination. Since we are on SP11 on BW 3.5 release, we are getting an error while executing an Infospoke using 'DB table option'. The error is like '3rd party destination is not set'. When I went to Marketplace and found an OSS note, I found out that we need an upgrade on SP level (upto 17).
       As I mentioned earlier, the client doesn't want to upgrade until next year, and we are at the critical timeframe stage, where we have to make a decision whether we hold this project until the SP upgrade happens or found alternate approach where we can extract the data from BW (somehow) and load into Teradata database via Datastage - BW Pack (3rd party ETL).
       So we might be able to use the second option in Infospoke destination, which is to use 'Flat file' load.
       Now when I use File option with App. server checked, the data loads into default Server and directory on BW. Which is DIR_HOME. I can see those file extracted and loaded into that directory under the transaction AL11. But I can't see any data. Do you think I have to request for an increase in size limit? If I see all the data, how can I FTP from the BW server? Do I have to work with SAP Basis or create a UNIX script?
       When I use Logical file name, I guess I have to follow what you have described on your response, correct? Can i use an existing Logical path and file name? Do you have a 'How to' document on creating YEAR and PER FM? Is it possible that Basis can do this work for us? What happens after we assign a logical Path and logical file name into the destination tab on Infospoke? What is the use of logical file versus file? Overall, I am looking for a process from extracting the data from Infospoke using either file or logical file, all the way to load into 3rd party database.
      looking forward for your response!
    thanks,
    Maulesh

  • Hi I am using Iframe with src="abc.mht" file. i want to view the mht file content in same window.please help.. Thanks in Advance

    Hi I am using Iframe with src="abc.mht" file. i want to view the mht file content in same window.please help..
    Thanks in Advance

    This is not a Java problem, this is a WEBBOT problem.
    I suggest that you research the topic in your FrontPage help files.
    Yes, we do know how to solve this problem using ordinary HTML and JSP. The sample code that you've posted implies that you are looking for an extremely different solution. To put it another way, it looks like you're logging onto the Federal Aviation Administration's forums and asking them how to go from Chicago to New York by train.
    But in any case, if you can't find the information in FrontPage, I'm 100% certain that if you went to www.microsoft.com and searched for FrontPage and downloads, and skipped the results that actually want you to download FrontPage, you'll get some sample code.

  • Loading Hierarchies using flat file

    Hi experts,
    I have requirement to load hierarchies using flat file.
    I have to create hier on Person Responsible, sub nodes are Sales Office, Project Definition, Project Type and Project Definition Description. I have file, i need to load into BW.
    I dont know much about hier loading, can you tell me what are the Attributes to be inserted and how to prepare the hier loading file which contains HIENM, VERSION, HCLASS, DATEFROM and DATETO.
    I dont know these fields are enough to load my hier.
    I have created one hier, when i try to activate it's giving error like ' no data exists'.
    Can anyone tell me how to prepare file to load into hierarchy?
    Thanks in advance,
    Venky

    Hi Venkatesh,
    There are several formats to load a hierarchy via file. The following two are the commonly used formats.
    1) Default
    Node ID                     NODEID
    InfoObject Name     INFOOBJECT
    Node Name     NODENAME
    Link Name     LINK
    HghrLvlNode     PARENTID
    Language Key     LANGU
    Description - Short     TXTSH
    Description - Medium     TXTMD
    Description - Long     TXTLG
    2) Sorted
    Node ID                     NODEID
    InfoObject Name     INFOOBJECT
    Node Name     NODENAME
    Link Name     LINK
    HghrLvlNode     PARENTID
    First Subnode     CHILDID
    Next Node Along     NEXTID
    Language Key     LANGU
    Description - Short     TXTSH
    Description - Medium     TXTMD
    Description - Long     TXTLG
    If Default format is used, the sequence of node IDs appeared in the flat file determines the structure of the hierarchy. Whereas the sorted hierarchy format defines the structure via PARENTID, CHILDID, NEXTID relationship.
    You make the selection in DataSource/Tran.Structure tab of InfoSource Page by clicking on the "Hier. Structure button.
    Good luck!
    Bill

  • My software is STUCK on "Retrieving current session status" What is this and how do I fix it? i am not able to convert any files at all!! Please help!

    My software is STUCK on "Retrieving current session status" What is this and how do I fix it? i am not able to convert any files at all!! Please help!

    Hi JulietaQ,
    In order to help you better.
    Please let me know which application or Service of Adobe you are using. If this is subscription i would request you to log-out and log-in back and let me know if that helps.
    ~Ajlan Huda

  • Just got my Mac air and i would like to make a file to store some web addresses for my new business with rodan and fields and I can't do it. Made the file but i cant copy and paste the web addresses in the file to save them. Please help and thank you.

    Just got my Mac air and i would like to make a file to store some web addresses for my new business with rodan and fields and I can't do it. Made the file but i cant copy and paste the web addresses in the file to save them. Please help and thank you.

    Yes - well you have to make the file in a word processing Application.
    You could use TextEdit (it's free) Pages (words only), or Numbers (data base) (they are part of iWorks - and may or may not be free (included) on your machine.  You could use MS Office (it is not free) You could use any Open source word processor that plays well with Office (NeoOffice, StarOffice) they are free.
    That's how you create content and copy/paste URLS. Then you save the file to the desktop. If you are going to make more than one file... you make a folder on the desktop and save, or drag the file(s) into it.
    You attach it to your e-mail client which will compress it and e-mail it. An excellent reference is to use Help, from the menu bar, also from inside any application. From your library or book store the OS X for Dummies has a lot of useful information (you don't read it cover to cover but look up chapters about what you'd like to do)
    You can also make appointments at your local Apple store for individualized help (if a store is nearby)

  • How to install windows 7 on my macbook pro mid 2009 using usb. right now aim using mavericks 10.9 can any one please help me. I tried to edit plist in boot camp but it went wrong please help me

    how to install windows 7 on my macbook pro mid 2009 using usb. right now iam using mavericks 10.9 can any one please help me. I tried to edit plist in boot camp but it went wrong please help me.
    Iam new to coding. please help me.

    try the solution posted by kunu here and report back
    https://discussions.apple.com/thread/5105056?tstart=0

  • How to use the LAN NetStream for peer transmission, please help, write a sample code

    How to use the LAN NetStream for peer transmission, please help, write a sample code

    No reply, I reply, Oh

  • Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.

    Hi, i have a A1186 Mac Pro 2008 Tower. Im running windows 7 64Bit on it. Im not sure about what version of bootcamp should i use to get the drivers. Someone please help me.

    Boot Camp support:
    http://www.apple.com/support/bootcamp/
    Boot Camp FAQ:
    http://support.apple.com/kb/HT5639?viewlocale=en_US

Maybe you are looking for

  • How do i update my old MacBook to the latest version?

    Hi! I have a really old MacBook from like 2008/2009 and I haven't used it for a long time, and now i need to update it because I can't download anything. Now i have mac os x 10.5.8 and I need the latest version. Please help me! How do I do?

  • Website Downloads Help

    On my website I am going to have a downloads section but I am not sure how I would connect a button to a file in my host directory. How would I connect a download button/text to a file that would then be able to be downloaded?

  • Restrictions passcode

    Is the restiction passcode different from the remote locking password on icloud for Iphone 4? As you gathered, I do not remember the restrictions passcode and cannot access my iphone, 7 attempts made already. To avoid losing my data, can i in itunes

  • Email as username and handle in profile not updated

    In my profile, my email is listed as my username (not an email address) so I changed my username into my email address in profile by clicking edit next to username. However the old username (non-email) is still kept on forums.oracle.com profile. The

  • Lately when I access Optum Rx it mbegins to load but I get firefox having problem loading page

    Lately when I access Optum Rx I log in and it begins to download the I receive message firefox having problem loading page, why?