Reading Flat File in Inbound and Converting it to a Idoc

Hi
We are stuck with a situation where in we get a ASN file from Mainframe to XI . XI just reroutes it to SAP and puts the file on Application server. Now R/3 has to read that ASN File and has to split it according to the Invoices and create Idocs for PO's as per the invoice Numbers. (We have a program which splits the incoming file into different Files depending on the Invoices)
Now My doubt here is how can i get a Idoc triggered after the File has been read and split in the R/3.
I checked Transaction WE16 , Prog. RSEINB00  but couldnt get a understanding .
Please suggest.
regards
Vikas Chaudhary

Hi Shiva,
Thanks for a response .
But as per my Functional Consultant ; PI's Role should be limited only to reroute the file and store it on Application Server .
R/3 Picks up that file and then splits it based on the Invoice Number; and again stores it in the application server.
Then R/3 Should Pick it up again one by one and convert to Idocs .
ASN to be splitted into Diff. Invoices . Once Splitted. Each Invoice Creates a PO . Once a PO is created Goods Reciept should be done. And after the Goods Reciept is done Service Entry Sheet needs to be created too.
A Query Again : I donn think this can be done via One Message Type. I am also lookin out for using  one msg. type for creating a PO and other activities can be done by extending a existing msg. type.
Regards
Vikas Chaudhary

Similar Messages

  • Read .csv file to XI and convert to IDOC

    Hi XI  Gurus,
    We have a requirement at work where we need to import .csv files to XI ehich then XI converts it to xml and posts an IDOC to SAP. I have tried creating this in XI with File Adapter with File Content Conversion.
    I gave all the things required for File Content Conversion but still my .csv file is not being picked up and read by XI. Iam not sure why this is happening but can anayone please help me with this.
    Also please do let me know if anyone has a tutorial related to this scenario.
    Thanks,
    Mayuresh.

    Hi All,
    I tried checking the error via Run Time Workbench (RWB) and going to Communication Channel Monitoring. It shows that there are some errors in the Communication Channel but when i go inside  it does not open an error window for me containing the error details.
    Just wanted to explain my file structure and the settings i have done in the 'File Content Conversion' of the 'File Adapter' so that you guys can tell me where i am wrong:
    Message Type: VENDOR_MT
    VENDOR_MT
        VendorNumber
        LastName
        SearchTerm
        Currency
      Address
          Street
          City
          Zip
          Country
    I am using IDOC receiver at the other end (CREMAS.CREMAS03).
    CSV File Structure: (Sample)
    34567, Reed, Jon, AUD, Smith Street, Melbourne, 3066, AU
    The settings that i have used in the File Adapter (Content Conversion tab) are:
    RecordSet Structure: VendorNumber, LastName, SearchTerm, Currency, Street, City, Zip, Country
    RecordSet Sequence: Ascending
    ignoreRecordSetName: true
    Vendor_MT.fieldNames: VendorNumber, LastName, SearchTerm, Currency
    Vendor_MT.keyFieldValue: 01
    Vendor_MT.fieldSeperator: ','
    Vendor_MT.endSeperator: nl
    Address.fieldNames: Street, City, Zip, Country
    Address.keyFieldValue: 02
    Address.fieldSeperator: ','
    Address.endSeperator: nl
    Please do let me know if the communicatioon channel settings i have made are correct. Also let me know if i am missing some major setting.
    Thanks,
    Mayuresh.

  • How to read flat file and convert to xml throught OSB

    Hi ,
    Can somebody help how to read flat file and convert to xml in OSB.
    appreciate ur help.
    Thanks & Regards ,
    Siva K Divi

    if you're using the oepe with osb plugin (will be installed when you install the osb locally) and then in your osb project > rightmouseclick > new > MFL.
    that's it
    maybe you're trying to create it within an oepe installation which doesnt have the osb plugin ?

  • Using Lightroom 4 w/ Windows 7.  Recently started shooting w/ Sony camera .arw files.  Lightroom cannot read the files.  Loaded Adobe converter program onto the computer and this program cannot read the files either.  Any suggestions?

    Using Lightroom 4 w/ Windows 7.  Recently started shooting w/ Sony camera that shoots .arw files.  Lightroom cannot read the files.  Loaded Adobe converter program onto the computer and this program cannot read the files either.  Any suggestions?

    Thnx again for the reply.  The version of Lightroom I have is 4.0  (working w/Windows 7)  This computer and all media files are kept off-line After doing more research, I downloaded DNG Converter 7.1This loaded into a .zip folder, which I am planning to install into the off-line computer andrun.  Where does this folder go?
    And will this set up work with my version of Lightroom?
    What a pain.  Makes me wanna go back to shooting .nef files for all stills
    Thnx

  • Reading flat files with variable names in SSIS

    I have a ssis package that reads a flat file from a network drive (using a flat file connection manager) and loads the data into sql server tables. I have this working on a fixed file name, however in reality the file name will not be the
    same from run to run.      Essentially, I need to check a folder each day and if there is a file there with a certain prefix (for example, 'datafile'), I need to process this file(s). In other words, if there is a file in the folder
    called datafilexyz, my process needs to read it in and process it.    If there are files named datafileabc, datafiledef, and testfile123, I need to read in and process the datafileabc and datafiledef flat files.    
    I'm not sure how to make this work.     I haven't had any SSIS training, just what I can find on the internet and looking at existing SSIS packages (I haven't found any that do what I'm trying to do here) so I'm kind of lost.   
    Any help is appreciated.  

    this is working well.    How can I, after loading each flat file, move the flat file to an archive folder?    I'm trying to use a file system task, but doing something wrong.    I created and reference
    an archive folder connection manager in the destination connection, and reference the original folder connection manager for the source connection, but get 'sourcepath is not valid on operation movefile'.    I think a file system task is what
    is needed (within the foreach loop after the data load for each flat file), but I'm not doing something correctly.
    Sounds fine except for one thing. Did you assign the filename variable to connection string property of the source file connection manager used by file system task?
    Also it should be existing file option you should choose for
    source connection and existing folder for destination.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Check flat file column list and column types

    Hi guys!
    Is there any "easy" way to check if the source flat file column names and column types correspond to target datastore column name and types ?
    Regards,
    PsmakR

    Hi,
    There is a way that I already used some time to validate if the data is the one expected into target.
    Conditions:
    1) The file source must have all columns as "String"
    2) All mapping for the analysed columns must be done at "staging area"
    How I do it: (oracle way)
    1) create a database function (by ODI procedure) like:
    create or replace function F$_DATATYPE (pData in varchar2, pDatatype in varchar2, pFormat in varchar2)
    return varchar2 as
    vDate date;
    vNumber number;
    BEGIN
    if pDatatype = 'D' then /* Date */
    vDate := to_date(pData, pFormat);
    elsif pDatatype = 'N' then /* Number */
    if pFormat is null then
    vNumber := to_number(pData);
    else
    vNumber := to_number(pData, pFormat);
    end if;
    end if;
    return 'OK';
    EXCEPTION
    When OTHERS then
    return 'KO';
    end F$_DATATYPE ;
    3) Now you can create a constraint to each source column that you wish to validate data like:
    'OK' = F$_DATATYPE(my_source_column, 'D', 'ddmmyyyy hh24:mi:ss' ) /* to a date column as example */
    4) drag and drop the source datasource (table from model) into package and a E$ table with all errors will be created.
    Does it help you?

  • Read from file, compare string and return a part

    Hello, is there a reasonable good way to read text file containing information, and if string comparison is successfull, return a nother part of the string.
    What i have done so far:
    set file_name to (path to desktop as text) & "filename.txt"
    set F to open for access tiedosto with write permission
    set file_information to (read F)
    close access F
    (i will be moving this to Application Support/Appname/ when i figure it out).
    The data in the file is in following format
    12234567890Name1
    98765432123Name2
    92347928347Name3
    What im stuck now is:
    I need to compare each line the 10 numbers with search string, if match is found, the name part should be returned.
    Any idea's?

    You already read in the text file, so you need to put the data thru a repeat loop:
    repeat with name_part in paragraphs of file_information
    -- ((character 1 thru 10 of name_part) as string) is the first 10 digits of name part
    if ((character 1 thru 10 of name_part) as string) is search_string then return name_part
    end

  • File Adapter - Reading 2 files from sender and one file to receiver

    All - I am looking for a best solution for reading two files from sender and generating one file to the receiver.
    Here is the scenario
    Sender file s - A is a master file. B is a detail file; B will have a one to many records for each record of File A.. that is the relation ship between 2 files..  I am looking for a better solution to
    Example
    Input:
    File A will have a record like "summary1 ABC 1234"
    File B will have a record like "Detailfor Summary1 CDF 8679"
    Output:
    File C shall have a record "consolidatedofSummary&Detail ABC 1234 8679"
    1) read records of master row and detail row from these 2 files
    2) do the mapping to the receiver output format which it is creating for records with some harcoded values and based on the values from master and detail rows of sender file
    if I can accomblish reading sender files and do the mapping to the receiver , assume that mapping to the receiver format would not be cumbersome.
    please help me...
    Thanks

    Hi Gopal,
    Ur approach to the interface is perfect.... Go ahead.
    For selecting multiple files in source use Advanced Selection for files.. and specify the directory paths and also the file name shema...
    This will fetch the 2 files into the integration engine... then u map the 2 source files to one target file(2:1 mapping).
    Specify accordingly the receiver side FCC and test it end to end...
    If u face any prblm post here... some1 will help u out..
    Babu

  • Read a Word/Excel doc and convert to PDF

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java
    Thanks,
    Satya

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

  • Flat File Load Issue - Cannot convert character sets for one or more charac

    We have recently upgraded our production BW system to SPS 17 (BW SP19)
    and we have issues loading flat files (contain Chinese, Japanese and
    Korean characters) which worked fine before the upgrade. The Asian
    languages appear as invalid characters (garbled) as we can see in PSA. The Character Set
    Settings was previously set as Default Setting and it worked fine until
    the upgrade abd we referred to note 1130965 and with the code page 1100
    the load went through (without the Cannot convert character sets for one or more characters error) however the Asian language characters will appear
    as invalid characters. We tried all the code pages suggested in the note e.g.
    4102, 4103 etc on the info packages but it did not work. Note that the
    flat files are encoded in UTF-8.

    I checked lower case option for all IO
    When i checked the PSA failed log no of records processed is "0 of 0" my question is with out processing single record system is througing this error message.
    When i use same file loading from local workstation no error message
    I am thinking when  I FTP the file from AS/400 to BI Application Server(Linex) some invalid characters are adding but how can we track that invalid char?
    Gurus please share your thoughts on this I will assign full points.
    Thanks,

  • Read flat file into IDOC

    Hello All,
    I have a file in application server, now I need to convert this file into IDOC format and save the records in SAP database. Can any one provide us the steps to do this. I would like to know how to create a port for file type to read the flat file.
    Thank you,

    Hi,
    Create a Z program in se38 and in that you will have to make use of OPEN DATASET, READ DATASET and CLOSE DATASET statements to read the fiel from the application server.
    IDOC is just an intermediate document with some structure.
    It does not have a capability to read a file by itself.
    The file had to be explicitely read from the application server making use of the above statements and then pass the data to the idoc structure.
    For more help do F1 on these statements.
    Regards,
    Ankur Parab

  • Problem Reading Flat File from Application server

    Hi All,
    I want to upload a Flat File which is having a Line Length of 3000.
    While uploading it to Application server , only upto 555 length it is getting uploaded .
    i am using the code :
    DATA: BEGIN OF TB_DATA OCCURS 0,
            LINE(3000),
          END OF TB_DATA.
    *----Uploading the flat file from the Local drive using FM "UPLOAD".
    OPEN DATASET TB_FILENAM-DATA FOR OUTPUT IN TEXT MODE." ENCODING DEFAULT.
    IF SY-SUBRC NE 0.
      WRITE:/ 'Unable to open file:', TB_FILENAM-DATA.
    ELSE.
      LOOP AT TB_DATA.
        TRANSFER TB_DATA TO TB_FILENAM-DATA.
      ENDLOOP.
    ENDIF.
    CLOSE DATASET TB_FILENAM-DATA.
    What could be the problem?
    Could it be due to any Configuration Problem?
    Waiting for your replies.
    Thanks and Regards.
    Suki

    Your code looks OK, but you may have touble displaying the full width. Try:
    WRITE: /001 TB_FILENAM-DATA+555.
    (And don't forget to append your ITAB after each read.)
    Rob

  • To read flat file from a unix server

    We need to read a flat file from a Unix server, where our Database is located.
    The location gets created correctly.
    But while we are trying to import files from the location in Design Center , we get an error that "directory does not exists", although the directory has all the permissions.
    Can someone please suggest how should we create the location so as it can read the files.
    Please Reply ASAP......

    We have started Design Center on a local machine(Windows Machine) with uaer as repository owner of the server,
    In the design center we can not sample the file till we import it,
    can you please tell how to sampe the file without importing it.
    Also a location pointing to server location gets easily created on the design center and the file module points to that location only, but when we try to import the file through that location, it says directory does not exists, although oracle user has all the read write permissions on the directory......
    Please help!

  • Reading XML file using BAPI and then uploading that xml file data into SAP

    I am getting a xml file from Java server. I need to take
    data from this file using BAPI and need to upload into SAP using SAP.
    Please tell me how to read XML files using BAPI's.

    <b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
    <b>SDIXML_DOM_TO_XML</b>  Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
    <b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
    <b>SDIXML_DOM_TO_DATA</b>
    data: it_table like t001 occurs 0.
    data: l_dom      TYPE REF TO IF_IXML_ELEMENT,
          m_document TYPE REF TO IF_IXML_DOCUMENT,
          g_ixml     TYPE REF TO IF_IXML,
          w_string   TYPE XSTRING,
          w_size     TYPE I,
          w_result   TYPE I,
          w_line     TYPE STRING,
          it_xml     TYPE DCXMLLINES,
          s_xml      like line of it_xml,
          w_rc       like sy-subrc.
    start-of-selection.
      select * from t001 into table it_table.
    end-of-selection.
    initialize iXML-Framework          ****
      write: / 'initialiazing iXML:'.
      class cl_ixml definition load.
      g_ixml = cl_ixml=>create( ).
      check not g_ixml is initial.
      write: 'ok'.
    create DOM from SAP data           ****
      write: / 'creating iXML doc:'.
      m_document = g_ixml->create_document( ).
      check not m_document is initial.
      write: 'ok'.
      write: / 'converting DATA TO DOM 1:'.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          NAME               = 'IT_TABLE'
          DATAOBJECT         = it_table[]
        IMPORTING
          DATA_AS_DOM        = l_dom
        CHANGING
          DOCUMENT           = m_document
        EXCEPTIONS
          ILLEGAL_NAME       = 1
          OTHERS             = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
      check not l_dom is initial.
      write: / 'appending DOM to iXML doc:'.
      w_rc = m_document->append_child( new_child = l_dom ).
      if w_rc is initial.  write  'ok'.
      else.                write: 'Err =', w_rc.
      endif.
    visualize iXML (DOM)               ****
      write: / 'displaying DOM:'.
      CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
        EXPORTING
          DOCUMENT          = m_document
        EXCEPTIONS
          NO_DOCUMENT       = 1
          OTHERS            = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
    convert DOM to XML doc (table)     ****
      write: / 'converting DOM TO XML:'.
      CALL FUNCTION 'SDIXML_DOM_TO_XML'
        EXPORTING
          DOCUMENT            = m_document
        PRETTY_PRINT        = ' '
        IMPORTING
          XML_AS_STRING       = w_string
          SIZE                = w_size
        TABLES
          XML_AS_TABLE        = it_xml
        EXCEPTIONS
          NO_DOCUMENT         = 1
          OTHERS              = 2.
      if sy-subrc = 0.   write  'ok'.
      else.              write: 'Err =', sy-subrc.
      endif.
      write: / 'XML as string of size:', w_size, / w_string.
      describe table it_xml lines w_result.
      write: / 'XML as table of', w_result, 'lines:'..
      loop at it_xml into s_xml.
        write s_xml.
      endloop.
      write: / 'end of processing'.
    end of code
    Hope this will be useful.
    regards
    vinod

  • Is it possible to read flat file .CSV place in Client Machine in network?

    Hi All,
    I want or read the flat file in the client machine place in network through external table.
    I have created an directory called DATALOADNW for client machine path as \\velmurugand\temp
    When i tried to read an flat file iam getting the below error
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04001: error opening file \\velmurugand\temp\Locfile.csv
    ORA-06512: at "SYS.ORACLE_LOADER", line 52
    ORA-06512: at "SRIRAM.LIGHTINGEVENT1", line 68
    ORA-06512: at line 1
    Please can any one help me i have shared and given full permission to access the .CSV file.

    velu wrote:
    I want or read the flat file in the client machine place in network through external table.You can't. External Tables only work when the flat file (and directory) are on the database server.
    Please can any one help me i have shared and given full permission to access the .CSV file.Move the file to the database server.
    Or use your client application (whatever it is) to read in the file.

Maybe you are looking for

  • Accordion click to open and close bar

    Is there a way to click the bar and have the accordion close it? IOW, I'm looking for a way to close all bars once a bar is open. Thanks in advance.

  • Parental controls suddenly activated - without us ...

    Hi there, BT parental controls have suddenly been activated without us asking for it. I noticed it first when trying to access Facebook. I then found out my own website is being blocked (despite no suspicious content!) and as a result also my e-mail.

  • How to get method documentation?

    Hi, I use DOCU_GET to read the class documentation:     CALL FUNCTION 'DOCU_GET'       EXPORTING     extend_except                = 'X'         id                           = 'CL'         langu                        = sy-langu         object        

  • Various transparency issues with conky.

    So, I have some ring graphs for a bunch of things, they are all semi-transparent and they look pretty darn good, but the text I use is unreadable because of my background having multiple colors. Well, after reading the conky config settings page I de

  • Putting PDFs into Kiosk mode on iPad

    Can you put an iPad into Kiosk mode (disable of screen menu's etc.) while viewing a PDF? We have a product catalogue that we'd like to display on our iPad at an Exhibition... the iPad stand will disable the home button, but a PDF will still display s