Idoc Structure From Flat FIle

Hi,
I have two queries.
1.I need to import idoc structure from excel file not from sap, is it possible ?
2 what are the detalied steps to implement following SAP note for getting processed file name at runtime.
Thanks & Regards
Tuhin
Symptom
You want to access the name of a file sent through a File Adapter Sender channel from a custom developed XI module.
Other terms
XI 3.0, XI30, File Adapter, Module Processor, Module Development, Modules
Reason and Prerequisites
The functionality described in this note requires SP 9 or higher of the component XI ADAPTER FRAMEWORK CORE 3.0.
Solution
The File Adapter passes the name of the processed file to the module processor. This information is available in a Hashtable object accessible as as supplemental module data under the name "module.parameters" within the module's 'process' method.
For further information, please take a look at the example code below:
public ModuleData process(ModuleContext mc, ModuleData md) throws
  ModuleException
  Hashtable mp       = (Hashtable)
                         md.getSupplementalData("module.parameters");
  String    fileName = null;
  if (mp != null)
    fileName = (String) mp.get("FileName");

Hi Tuhin,
<i>
1. .I need to import idoc structure from excel file not from sap, is it possible ?</i>
Yes and No; If the structure in the Excel sheet is defined  in XSD format (XML schema) then it should be possible to import it assuming you are using XI 3.0. In 2.0 this is not possible.
Not sure if in XI 3.0 you are allowed to import Excel files straight forward into XI.
<i>2 what are the detalied steps to implement following SAP note for getting processed file name at runtime.</i>
I'm not quite sure but this looks to me like you have to implement this within a Java custom function/mapping...
The data (in this case the filename) is encapsulated in a Hashtable object available during runtime.
Cheers,
Rob.

Similar Messages

  • IDOC creation from flat file.

    Hello Friends.
    I need to create a custom program for posting goods receipts for a purchase order. 
    I think  a custom program needed to achieve this task because i need to do mappings prior to create an IDOC. Now using a flat file what are the function modules or steps involved. can any one of you able to help me on this.
    Thanks

    Sorry, I'm trying to remember the name of the function module I used....I had a similar situation...I had a flat file which I processed and constructed an IDOC which I then saved as an incoming IDOC using the FM....  Because we had our settings (standard SAP process code, standard SAP FM IDOC processor, etc.) set to automatically fire off the IDOC processing, the result was that I read the file, saved the IDOC and SAP then immediately grabbed and posted the IDOC.  I will do a little search for the FM I used to create the IDOC in my own system and get back to you if you think that would be helpful.  Sorry for my memory lapse....

  • Idoc data in flat file structure

    Dear Experts,
             We have  idoc data in flat file structure. We need to fetch it using ftp and map it to an idoc.
    please tell me how to proceed .
    Thanks,
    Aju

    Hi,
    For flat file you need to use the File content conversion parameters.
    Refer the blog,
    SAP Network Blog: How to process flat files with multiple documents like POs, SOs etc. in a File to IDoc scenario
    How to process flat files with multiple documents like POs, SOs etc. in a File to IDoc scenario
    Thanks
    Swarup

  • IDoc as a flat file...

    I want to read a flat file that is an IDoc and post it as a XML after necessary conversion...So i wanted to know what are the feasible ways to read the flat file thats an IDoc?

    Your flat file is of fixed lenght format or tab delimited I believe. Get the flat file data into an internal table. Study the IDOC structure in transaction WE30. & according populate the idoc segemnts from the internal table value..
    For ABAP to XML conversion..Create XSLT & the extraction program..
    Create XSLT:
    In transaction SE80 browse menu Workbench -> Edit Object. In the popup window enter XSLT Program name (e.g. ZXSLT) and click on create button.
    Enter the following code into the editor..
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <!xsl:output encoding="utf-8" indent="yes"/>
    <xsl:template match="D2CXML">
    <PurchaseOrders>
    <xsl:apply-templates/>
    </PurchaseOrders>
    </xsl:template>
    <xsl:template match="item">
    <PONO>
    <xsl:attribute name="no">
    <xsl:value-of select="EBELN"/>
    </xsl:attribute>
    <PORDNO>
    <xsl:apply-templates select="EBELN"/>
    </PORDNO>
    <Vendor>
    <xsl:apply-templates select="LIFNR"/>
    </Vendor>
    <PurchaseOrg>
    <xsl:apply-templates select="EKORG"/>
    </PurchaseOrg>
    <PurchaseGrp>
    <xsl:apply-templates select="EKGRP"/>
    </PurchaseGrp>
    <xsl:apply-templates select="X-MLSTRUCT"/>
    </PONO>
    </xsl:template>
    <xsl:template match="X-MLSTRUCT">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="X-MLSTRUCT/item">
    <Product>
    <ItemNo>
    <xsl:apply-templates select="EBELP"/>
    </ItemNo>
    <Material>
    <xsl:apply-templates select="MATNR"/>

  • How to upload  schedule line from flat files to sap file

    dear all,
    i want to upload the schedule lines from flat files to sap schedulle lines
    but the flat files have 15 schedule lines and the data is as per date
    so how to upload that and the fields available in flat files are more than the sap screen
    we are having more than 6 items
    and 15scedule lines its abt 90data to be upload
    for one customer in every 15 day
    so how to do this
    is there any direct use in functional side
    with out the help of any abap
    but my user will do it
    so he need a permanent solution
    with regards
    subrat

    Hi Subrat ,
    u can upload the data either ( Master /Transaction) data with the help of lsmw. for that all u need to do is go through the lsmw and do it. in that u can go Batch input recording/ BAPI/ IDOC any of that. here i am sending the LSMW Notes go through it and do the work.
    once u create the LSMW project then u can ask the data from user or u can explain the user about the program and can run the flat file to upload the data.
    if u require LSMW material Just send me blank mail from u. my mail id is [email protected]
    Reward if Helpful.
    Regards,
    Praveen Kumar.D

  • Error while loading table from flat file (.csv)

    I have a flat file which i am loading into a Target Table in Oracle Warehouse Builder. It uses SQL Loader Internally to load the data from flat file, I am facing an issue. Please find the following error ( This is an extract from the error log generated)
    SQL*Loader-500: Unable to open file (D:\MY CURRENT PROJECTS\GEIP-IHSS-Santa Clara\CDI-OWB\Source_Systems\Acquisition.csv)
    SQL*Loader-552: insufficient privilege to open file
    SQL*Loader-509: System error: The data is invalid.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    I believe that this is related to SQL * Loader error.
    ACtually the flat file resides in my system ( D:\MY CURRENT PROJECTS\GEIP-IHSS-Santa Clara\CDI-OWB\Source_Systems\Acquisition.csv). I am connecting to a oracle server.
    Please suggest
    Is it required that i need to place the flat file in Oracle Server System ??
    Regards,
    Ashoka BL

    Hi
    I am getting an error as well which is similar to that described above except that I get
    SQL*Loader-500: Unable to open file (/u21/oracle/owb_staging/WHITEST/source_depot/Durham_Inventory_Labels.csv)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    The difference is that Ashoka was getting
    SQL*Loader-552: insufficient privilege to open file
    and I get
    SQL*Loader-553: file not found
    The initial thought is that the file does not exist in the directory specified or I have spelt the filename incorrectly it but this has been checked and double checked. The unix directory also has permission to read and write.
    Also in the error message is
    Control File: C:\u21\oracle\owb_staging\WHITEST\source_depot\INV_LOAD_LABEL_INVENTORY.ctl
    Character Set WE8MSWIN1252 specified for all input.
    Data File: /u21/oracle/owb_staging/WHITEST/source_depot/Durham_Inventory_Labels.csv
    Bad File: C:\u21\oracle\owb_staging\WHITEST\source_depot\Durham_Inventory_Labels.bad
    As can be seen from the above it seems to be trying to create the ctl and bad file on my c drive instead of on the server in the same directory as the .csv file. The location is registered to the server directory /u21/oracle/owb_staging/WHITEST/source_depot
    I am at a lost as this works fine in development and I have just promoted all the development work to a systest environment using OMBPlus.
    The directory structure in development is the same as systest except that the data file is /u21/oracle/owb_staging/WHITED/source_depot/Durham_Inventory_Labels.csv and everything works fine - .ctl and .bad created in the same directory and the data sucessfully loads into a oracle table.
    Have I missed a setting in OWB during the promotion to systest or is there something wrong in the way the repository in the systest database is setup?
    The systest and development databases are on the same box.
    Any help would be much appreciated
    Thanks
    Edwin

  • Data Source creation for Master Data from Flat File to BW

    Hi,
    I need to upload Master Data from Flat File. Can anybody tell step by step right from begining of creation of DataSource up to Loading into Master Data InfoObject.
    can any body have Document.
    Regards,
    Chakri.

    Hi,
    This is the procedure.
    1. Create m-data with or without attributes.
    2. Create infosource .
        a) with flexible update
             or
        b) with direct update
    3. Create transfer rules and assign tyhe names of m-data and attribute in "Transfer rules" tab and transfer them to communication structure.
    4. Create the flat-file with same stucture as communication structure.
    5. if chosen direct update then create infopackage and assign the name of flat-file and schedule it.
    6. if chosen flexible update the create update rule with assigning name of the infosource and the schedule it by creating infopackage.
    Hope this helps. If still have prob then let me know.
    Follow this link also.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    Assign points if helpful.
    Vinod.

  • TCODE TO DOWNLOAD IDOC INTO A FLAT FILE

    Hi All,
       Please let me know if there is any tcode to download IDOC into a flat file..
    Regards,
    Kaveri

    try with we60 where you should have links to download the idoc type.
    Please check this:
    1. How to Download a Hierarchy to a Flat File
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    2. How To Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 Version 1.10
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    run the report RSEOUT00 with the idoc number, flat xml file will be generated at the location user/sap/XI/SYS/global/idoc_file
    Please rewrds if found help ful

  • Loading transaction data from flat file to SNP order series objects

    Hi,
    I am an BW developer and i need to provide data to my SNP team.
    Can you please let me know more about <b>loading transaction data (sales order, purchase order, etc.,) from external systems into order based SNP objects/structure</b>. there is a 3rd party tool called webconnect that gets data from external systems and can give data in flat file or in database tables what ever required format we want.
    I know we can use BAPI's, but dont know how. can you please send any <b>sample ABAP program code that calls BAPI to read flat file and write to SNP order series objects</b>.
    Please let me know ASAP, how to get data from flat file into SNP order based objects, with options and I will be very grateful.
    thanks in advance
    Rahul

    Hi,
    Please go through the following links:
    https://forums.sdn.sap.com/click.jspa?searchID=6094493&messageID=4180456
    https://forums.sdn.sap.com/click.jspa?searchID=6094493&messageID=4040057
    https://forums.sdn.sap.com/click.jspa?searchID=6094493&messageID=3832922
    https://forums.sdn.sap.com/click.jspa?searchID=6094493&messageID=4067999
    Hope this helps...
    Regards,
    Habeeb
    Assign points if helpful..:)

  • Facing Problem in IDOC to EDI FLAT File Scenario

    Hi,
    I am working on a scenario IDOC to EDI FLAT File. For this I have used ABAP mapping.
    The problem i am facing is that the EDI FILE contains the segment name as E1EDK01 for eg. while I need the name as per the latest segment definiton released. I have also tried this using File port and it gives the required segment names in file.  But we dont have to use File ports. Please suggest me if something is missing in PI Abap stack ?? Why I am not getting the segments name as per latest segment definition mainatined in R3.
    Thanks
    Neha

    Hi Neha,
                   Please check the segment name in sxmb_moni. Is this showing new value or the old value?
    If SXMB_MONI shows old value then the source SAP (R/3) system which is sending the idoc may not have released the segment after changing the name. You need to ensure that the idoc segment has been released properly. Then re-import the iodc into PI server again. Finally delete entry of the iodc structure in idx2 transaction, no need to re-import the idoc structute again in idx2, since once you run the scenario the metadata automatically gets imported.
    regards
    Anupam

  • Help Required regding: Validation on Data Loading from Flat File

    Hi Experts,
    I need u r help in the following issue.
    I need to validated the transactional data loading to the GL Cube from Flat file,
    1) The transactional data to the Cube to be loaded <b>only if master data</b> record exists for the <b>“0GL_ACCOUNT”</b> info object.
    2) If the master data record does not exits then the record need to be skipped from the loading and after the loading  the system should throw a message saying that these many records have been skipped (if there are any skipped records.).
    I would really appriciate u r help and suggestions on solving this issue.
    Regds
    Hari

    Hi, write a <b>start routine</b> in transfer rules like this.
      DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
            l_s_errorlog TYPE rssm_s_errorlog_int,
            <b>l_s_glaccount type /BI0/PGLACCOUNT</b>,
            new_datapak type tab_transtru.
           refresh new_datapak.
           loop at datapak into l_s_datapak_line.
           select single * from /BI0/PGLACCOUNT into l_s_glaccount
             where CHRT_ACCTS eq l_s_datapak_line-<b>field name in transfer structure/datsource for CHRT_ACCTS</b>
    and GL_ACCOUNT eq l_s_datapak_line-<b>field name in transfer structure/datsource for GL_ACCOUNT</b>
    and OBJVERS eq 'A'.
           if sy-subrc eq 0.
             append l_s_datapak_line to new_datapak.
           endif.
           endloop.
           datapak = new_datapak.
           if datapak[] is initial.
    abort <> 0 means skip whole data package !!!
             ABORT = 4.
           else.
             ABORT = 0.
           endif.
    i have already some modifications but U can slightly change it to suit your need.
    regards
    Emil

  • How to upload the BP master details in huge amount from flat file to CRM database

    Hi,
    Could you any body please help me initially the best method to upload Business partner data from flat file and if possible with any sample code available?
    Basically I am an ABAP consultant. In ERP I used to do BDC or lsmw  in generally?
    This is a mission critical thing for me.

    Hi Chitturi,
    I did not come across the scenario for custom include fields from BAPI of partner creation. But if the fields are not appearing in the import/tables structure fields then you probably need to update the corresponding DB Table for those fields separately,else BAPI will update the same. You will get partner guid and partner number from export parameters of the BAPI.
    Regards,
    Dipesh
    Message was edited by: Joaquin Fornas

  • What are the advantages of idoc compare to flat file. how data is secure

    what are the advantages of idoc compare to flat file. how data is secure in idocs compare to flat file

    Hi Ramana,
    In simple words, Main advantage with idoc over flat file is security....
    I will explain you some scenario here U got a flat file with all the data...Now u r having the flat file if you want u can modify the data in it, or somehow any one can modify the data in it  if they were able to access this file. That means u maintained the file in the presentation server
    One level of higher security to the above level is maintaining the flat file in application server, at point also even though lot of people r not having the access to that file, super user who is  having  the access may modify the data or delete the data from it rite....
    so in both of those levels u don't have 100% security...
    So there come to the picture of idocs, Idocs simply data carriers, those r generated by a program but not manually...data will be divided into number of segments based upon ur program. So manually its not so easy to modify the data in these idocs. If any changes to be made in the data then u have to modify the data in the application and then u have to update the idoc or you have to generate the new idoc with that corresponding data. so in this case not even super user can manipulate the data directly in the idoc....
    I think u got my point what I mean to say.....
    If you find it useful mark the points
    ~~Guduri

  • MBGMCR02 inbound posting from Flat file

    hello Friends ,
    i am posting MBMCR02 Inbound idoc for oil materils .
    it is giving an error status 51 "Material does not exists or not active "
    i am trying to post in WE 19 and through my program also .
    it is an inbound idoc program processed from flat file .
    i am trying to post the goods receipts against PO.
    can any one suggest any solution.
    thanks
    Anant

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • Error when uploading data from Flat file

    I am uplading data from Flat file.
    When I am uploading it gives an error
    An error occurred in record 1 during execution of conversion exit CONVERSION_EXIT_CUNIT_INPUT for field UNIT.
    Can any one help.
    Thanx in Advance.
    Regards,
    Pradeep.

    Hi Pradeep,
    Refer this link:
    CONVERSION_EXIT_CUNIT_INPUT error in flat file load
    Re: Error in Flat files upload
    Also try this - In the transfer structure check the checkbox fo UNIT and retry the load. Hopefully it should be fine.
    Bye
    Dinesh

Maybe you are looking for