Standardize a flat file format w.r.t OWB

Hi Pat,
or anyone,
Can u help me to standardize a flat file format with respect to OWB?
I have 15 financial source systems. The client agreed in giving the data in csv format. Now I need to standardize the feed file so that it would be easy for me handle it in OWB. Please note depending on my standardization the client would give me the data and in turn it would be easy for me to handle it OWB External Tables. The records size for a single feed file is 1 million. So my questions are
1.How should I standardize a date field in flat file?. Please note target date field is default date in Oracle.
2.How should I standardize an address field? I.e. normally here I have 3 address fields. But I want the output in 1 field. What is the best possible methodology to do this? Or can I handle this issue in OWB front.
3.How should I standardize a feed file name (generic)?
4.How should I standardize a feed file folder (generic)? Please note the folder will reside in UNIX environment. The concept is, there would be respective folders in UNIX and the feed files would automatically fall into these respective folders in a fortnight basis. So what should I do to achieve this? I know I have to write a shell script for the automatic process. If so how will I do this and schedule it.
5.And w.r.t above question, how will I tell OWB to go and fetch the files in those folders. I know it is done while mapping. But my question is Is that the only best way I can achieve it?
6.If I left anything related to feed file, please tell me?
Please note that based on my standardization, the client would extract the data and give it to me. So if I standardize the feed file which would be easy for me to handle it in OWB, then that would be a great success. And also note this is for a long run. Minimum 10 years.
Regards,
rem.

Good afternoon Rem,
It's all very theoretical indeed, talking about standards and all. I'll try to answer some of your questions according to my experiences.
@1, Usually we load flat files into external tables using varchar2-fields only, occasionally number fields; dates however are always loaded into varchar2's and then when reading the external table into the staging area they are converted to Oracle dates using a simple TO_DATE transformation.
@2, I don't think there's a real standard for that, it should simply meet YOUR needs, so when loading EXT into STG simply perform a transformation concatenating those 3 fields to form one.
@5, you have to register the location where you have defined your flat files, this should be some Unix location; after that the connector between EXT and STG will know what to do when running the mappings from EXT to STG (thus: no other action is needed to 'tell OWB' where to fetch data from flat files).
As far as I know there a no standards in naming conventions for files and folders, just go with what seems logical/practical in your situation.
Regards, Patrick

Similar Messages

  • New EDI Implementation - Flat File format for SPSI in eCommerce Gateway

    Hi,
    we are trying to setup EDI with a business partner, goal is to import a DELFOR message into Oracle Order Management. Plans are: translate the inbound message into the SPSI flat file format, load it through eCommerce Gateway / Release Management into Order Management.
    For this purpose I'd like to test to the import of a SPSI flat file into eCommerce Gateway / Release Management, however I have difficulties to get a proper flat file. Is there a way to generate example flat files somehow? I tried to generate my own flat file, based on the Oracle manuals, but how can I be sure that the format is correct (besides of running the import program)? Any advice on this?
    Or is there a better way, e.g. through XML files?
    Thanks in advance,
    David.

    Hi, thanks for the response.
    Yes I use that report already to get the details of the flat file. But what I am missing is for example which records are repeated, e.g. for every 4000 record, do I need one 0010 record, or can I put multiple 4000 records within one 0010 record?
    regards,
    David.

  • Flat file format - importing vs typing it out

    Hi.  I've heard there is a way to import the format (rather that typing it out in connection mgr) of a fixed width flat file.  What r the general steps or where is there a set of instructions online?  I generally have a txt doc with column
    names (lots of them) , widths etc that I would use for import and could easily transfer them to a spreadsheet if necessary.   So far the word import is bringing up a lot of unwanted subject matter in my web searches.   I am spending a lot
    of time typing out flat file formats in conn mgrs and am thinking it may be worth a look at ssis's ability to "import" a format.   We generally land our data in "untyped" staging tables 1st so ssis could assume everything is string.  
    I dont really want to read my records as one long string and parse them later.

    thx.   I suppose I can write and share with the community some general t-sql that generates the following but would like to know a couple of things. 
    First, is any old guid ok in each of the places where a guid is indicated?  I would generate a new one for each guid.
    Second, what is the locale id?
    Of course i would only paste the results in a pkg (dtsx file) that doesnt reference the cols (beyond the connection stuff) yet.
    What gotchtyas am I looking at if i try this with the intention of pasting the generated code over the top of what ssis already generated (inside the dtsx file) in a one column connector created the usual way?
    <DTS:ConnectionManagers>
    <DTS:ConnectionManager
    DTS:refId="Package.ConnectionManagers[Flat File Connection Manager]"
    DTS:CreationName="FLATFILE"
    DTS:Description="ZZZZZZ"
    DTS:DTSID="{some guid}"
    DTS:ObjectName="Flat File Connection Manager">
    <DTS:PropertyExpression
    DTS:Name="ConnectionString">@[User::fileName]</DTS:PropertyExpression>
    <DTS:ObjectData>
    <DTS:ConnectionManager
    DTS:Format="FixedWidth"
    DTS:LocaleID="1033"
    DTS:HeaderRowDelimiter="_x000D__x000A_"
    DTS:RowDelimiter=""
    DTS:TextQualifier="_x003C_none_x003E_"
    DTS:CodePage="1252"
    DTS:ConnectionString="c:...">
    <DTS:FlatFileColumns>
    <DTS:FlatFileColumn
    DTS:ColumnDelimiter=""
    DTS:ColumnWidth="2"
    DTS:MaximumWidth="2"
    DTS:DataType="129"
    DTS:ObjectName="XXXXX"
    DTS:DTSID="{some other guid}"
    DTS:CreationName="" />
    <DTS:FlatFileColumn
    DTS:ColumnDelimiter=""
    DTS:ColumnWidth="2"
    DTS:MaximumWidth="2"
    DTS:DataType="129"
    DTS:ObjectName="YYYYYY"
    DTS:DTSID="{some other guid}"
    DTS:CreationName="" />

  • PO Idoc in Flat File format

    Hi all,
    I am able to generate the PO Idoc in Flat file format using standrad FM IDOC_OUTPUT_ORDERS. but the Flat file appearing is not in a appropriate format.
    I'm looking to generate the Flat file in such a way that there will be only one line for each Idoc Segment.( with Line termination).
    How to Achieve this.
    Regards,
    S Anand

    Resolved.
    we can use CG3Y transaction.
    Regards,
    S Anand

  • Convert amount from flat file format to user format

    hi,
    how to convert amount from flat file format to user specific format.
    input:  1000.00
    output: 1.000,00 (user specific)
    thanks in advance

    move that value to a type WRBTR variable
    and use write statement.
    data v_wrbtr type wrbtr.
    data v_char(20).
    v_wrbtr = 1000.
    write v_wrbtr to v_char.
    v_char will contain the amount in user format.
    Prerequsite, go to SU3 transaction.
    Defaults tab, chose the decimal notation .
    Regards,
    Ravi

  • Flat file formats

    What are the flat files formats accepted for import and export in mdm?
    How MDM recognize the document type/mapping to perform of incoming file (file name, folder) ?
    What are the flat file format for export (delimited, structured, XML) ?
    Does MDM handle Header in a flat file (import and export) ?
    Does MDM handle several line definition in a flat file (import and export) ?

    Hi Joesph,
    Here are answers to your questions:
    <b>Ans 1--></b> As previously told by adhappan ,you can import data using import manager from the following formats:
    Access--Means From  microsoft access
    Excel -- From an excel file
    ODBC--this is generally used to import data from a  flat file.BY flat file i mean to say a tab comma seperated "csv " file or a ".txt "file.
    Port--to import data from a port .In mdm, port actually refers to a directrory
    XML--from an xml file
    XML Schema-- this is used when you try to import data from a file whosr structure you have predefined in console using an xsd file.
    <b>Ans 2--></b> we specify the file format while connecting to source by mentioning it in the <b>type</b> properties.and mapping is performed in the import manager in the map value tab.
    <b>Ans 3--></b>When you import or export a flat file then data in the first  line of file is considered as header.
    <b>Ans 4 --></b> As i previously told ,MDM will handle header.
    <b> Ans 5 --></b>MDM does not handle several line definition of header.
    Hope it will help you.<b> Please remark if it really helped you</b>.
    Thanks,
    <b>Shiv Prashant Dixit</b>

  • HOW MANY TYPES OF FLAT FILE FORMAT

    hi gurus......
    Basically there r 3 types of flat file format
    ASC
    DAT
    BIN
    i am correct or wrong???
    what is the difference between these formats?

    Hi,
    you are right.
    This is from the documentation available in GUI_UPLOAD func.module:
    'BIN'.
    The system reads a binary representation of the internal table from the
    file. The data is neither converted nor interpreted in this case.
    Usually, reasonable results are obtained only if the internal table
    consists of a single column of type 'X'.
    'DAT'
    The components of the internal table are filled from the file. If the
    table contains several columns, the entries in the file must be
    separated by tabs. No conversion exits are performed. eg: .TXT with tab delimited
    The following applies for the different data types:
    I or N or P or F
    The numbers must be formatted according to the decimal representation
    defined in the user settings.
    D
    The date must be formatted according to the date format defined in the
    user settings.
    T
    The time must be formatted as hh:mm:ss.
    'ASC'.
    The components of the internal table are filled from the file. Only
    data types with fixed length are allowed. The data must be contained
    in the file in its full length. eg: Like ·TXT or ·CSV files
    Anirban

  • Download report into a flat file format

    Hi Friends,
    I would like to know your thoughts on what is the best practice most of you using to download a report into a flat file(NOT csv).
    In my application business users want a report to be downloaded into their local desktop (just like a .csv) but into a flat file and they have their byte specific format.
    My concerns :
    1) Is there any straight method to download a report into a flatfile (like it is now for CSV) from Apex 3.1.2 ?
    2) If I write my own code using UTL_FILE, can I let the user to save them to their desired directory on their desktop ?
    Your thoughts would definitely help me in delivering a right solution to the users in this regard.
    Thanks a lot.
    Raj.

    Raj:
    You could create a 'Before Header' page process to create this 'flat file'. The code for the page process will be something similar to declare
    v_file_name   VARCHAR2 (2000) := 'fixedFieldsFile.txt';
    --- Client Record Format
    f1 char(20);
    f2 char(20);
    f3 char(20);
    ---- End format
    begin
    OWA_UTIL.mime_header ('application/txt', FALSE);
    htp.p('Content-Disposition:attachment;filename="'|| v_file_name|| '"');
    OWA_UTIL.http_header_close;
    for c1 in (select * from emp) loop                           ----- The report query
    f1:= c1.empno;f2:=c1.ename;f3:=c1.sal;
    htp.p(f1||f2||f3);
    end loop;
    apex_application.g_unrecoverable_error:=true;
    exception when others then
    null;
    end; Varad

  • Sender Idoc_AAE Adapter for flat file format

    I have been given to develop a Scenario where in  an Idoc in a flat file (.txt) format needs to be sent from ECC system to a Bank SFTP server . NO ESR objects are involved ,just pick and place .Kindly Explain the configuration on the Sender Idoc_AAE Adapter .

    Hi Srinath,
    Please refer the below blogs for IDOC_AAE configuration
    How to create and configure Sender Idoc AAE Scenario - PI 7.3
    refer the below blog for IDOC to file scenario (with IDOC_AAE)
    IDOC_AAE To File with all Configurations
    to convert IDOC XML to IDOC flat you need to create JCA in NWA. Please refer the below blog
    Converting IDoc XML to Flat File and Vice-Versa
    regards,
    Harish

  • Flat File Format Issue

    Hi All,
    I have to load a flat file of the type Text (Tab Delimited) (*.TXT) in BI. How can i do that.
    It is coming from an external system and hence i cannot have the format change. What should i do in
    my flat file data source to be able to upload it
    Thanks
    Rashmi.

    Hi Rashmi,
            There can be two formats of flat file uploading ...
    one is ascii which means fixed length format .... in which there is no need of delimitation .... according to fixed length each value will go into corresponding field...
    the other is the csv (comma seperate value) which the fields are seperated by a commaa...
    as u are saying the input file is tab delimited u need to change the file format into any of the above types before u load into bi...
    for if u are using a process chain u has to manually convert this file format and then load in the application server .
    for if u are loading manaully u can edit the file to this format and load from ur work station.......
    Regards
    vamsi
    Edited by: vamsi talluri on Feb 6, 2009 5:36 AM

  • Flat file format in Excel

    Hi all
    I have a 12 month Consumption excel file(jan -Dec)by location and by supply system. I want to load this as a flat file into BW.I know i have to save it in a csv format,but I dont know the structure for the excel file.
    Plz advice

    You can look at the datasource by opening up the transfr structure and clicking on the datasource tab. Here you will see the fields listed out. You can maintain the columns in the excel/csv file in the same sequence.
    Hope this helps...

  • Exporting Hierarchy in Flat File Format

    Hi All,
    I exporting hierarchy in local file from transaction code OB58 (Balance sheet Hierarchy and Profit & Loss Hiearchy) , KSH3 (Cost Center Hierarchy), KCH3 (Profit Center Hierarchy). But the hierarchy is commming as it is displayed at the R3 screen.
    I have to load these hierarchies in BW through flat file. Is there any method other that writing an ABAP program by which we can extract these hierarchies in Flat file loadable format.
    Thanks

    Perhap's it can help you
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb?overridelayout=true|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb?overridelayout=true]
    It's an ABAP program but it works well and you can load your flat file easily

  • Flat file format

    Hi all
    What is mean by ASCI format for the flat file
    any eg to show?
    Name | Age | Hobby | Contact
    john;23;soccer;123456
    do u mean by ASCI format above?

    gary,
    American Standard Code for Information Interchange (ASCII), generally pronounced ask-ee , is a character encoding based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that work with text. Most modern character encodings — which support many more characters — have a historical basis in ASCII.
    Work on ASCII began in 1960. The first edition of the standard was published in 1963,[1] a major revision in 1967, and the most recent update in 1986. It currently defines codes for 128 characters: 33 are non-printing, mostly obsolete control characters that affect how text is processed, and 95 are printable characters.
    Regards,
    Karthik

  • BDC for ME21N (Flat file format)

    Hello,
         I have to write a BDC for ME21N(stock transfer).... Someone pls give me the format of flat file... we need separate files for header and items or only one file is enough??? pls someone send me the format and code......
    my email id is [email protected]
    Thanks in advance...
    Regards,
    Maya.

    Hi
    see this and do accordingly
    REPORT zmm_bdcp_purchaseorderkb02
    NO STANDARD PAGE HEADING LINE-SIZE 255.
    Declaring internal tables *
    *-----Declaring line structure
    DATA : BEGIN OF it_dummy OCCURS 0,
    dummy(255) TYPE c,
    END OF it_dummy.
    *-----Internal table for line items
    DATA : BEGIN OF it_idata OCCURS 0,
    ematn(18), "Material Number.
    menge(13), "Qyantity.
    netpr(11), "Net Price.
    werks(4), "Plant.
    ebelp(5), "Item Number.
    END OF it_idata.
    *-----Deep structure for header data and line items
    DATA : BEGIN OF it_me21 OCCURS 0,
    lifnr(10), "Vendor A/c No.
    bsart(4), "A/c Type.
    bedat(8), "Date of creation of PO.
    ekorg(4), "Purchasing Organisation.
    ekgrp(3), "Purchasing Group.
    x_data LIKE TABLE OF it_idata,
    END OF it_me21.
    DATA : x_idata LIKE LINE OF it_idata.
    DATA : v_delimit VALUE ','.
    DATA : v_indx(3) TYPE n.
    DATA : v_fnam(30) TYPE c.
    DATA : v_count TYPE n.
    DATA : v_ne TYPE i.
    DATA : v_ns TYPE i.
    *include bdcrecx1.
    INCLUDE zmm_incl_purchaseorderkb01.
    Search help for file *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION.
    To upload the data into line structure *
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = p_file
    filetype = 'DAT'
    TABLES
    data_tab = it_dummy.
    Processing the data from line structure to internal tables *
    REFRESH:it_me21.
    CLEAR :it_me21.
    LOOP AT it_dummy.
    IF it_dummy-dummy+0(01) = 'H'.
    v_indx = v_indx + 1.
    CLEAR it_idata.
    REFRESH it_idata.
    CLEAR it_me21-x_data.
    REFRESH it_me21-x_data.
    SHIFT it_dummy.
    SPLIT it_dummy AT v_delimit INTO it_me21-lifnr
    it_me21-bsart
    it_me21-bedat
    it_me21-ekorg
    it_me21-ekgrp.
    APPEND it_me21.
    ELSEIF it_dummy-dummy+0(01) = 'L'.
    SHIFT it_dummy.
    SPLIT it_dummy AT v_delimit INTO it_idata-ematn
    it_idata-menge
    it_idata-netpr
    it_idata-werks
    it_idata-ebelp.
    APPEND it_idata TO it_me21-x_data.
    MODIFY it_me21 INDEX v_indx.
    ENDIF.
    ENDLOOP.
    To open the group *
    PERFORM open_group.
    To populate the bdcdata table for header data *
    LOOP AT it_me21.
    v_count = v_count + 1.
    REFRESH it_bdcdata.
    PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0100',
    ' ' 'BDC_CURSOR' 'EKKO-LIFNR',
    ' ' 'BDC_OKCODE' '/00',
    ' ' 'EKKO-LIFNR' it_me21-lifnr,
    ' ' 'RM06E-BSART' it_me21-bsart,
    ' ' 'RM06E-BEDAT' it_me21-bedat,
    ' ' 'EKKO-EKORG' it_me21-ekorg,
    ' ' 'EKKO-EKGRP' it_me21-ekgrp,
    ' ' 'RM06E-LPEIN' 'T'.
    PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
    ' ' 'BDC_CURSOR' 'RM06E-EBELP',
    ' ' 'BDC_OKCODE' '/00'.
    MOVE 1 TO v_indx.
    *-----To populate the bdcdata table for line item data
    LOOP AT it_me21-x_data INTO x_idata.
    CONCATENATE 'EKPO-EMATN(' v_indx ')' INTO v_fnam.
    PERFORM subr_bdc_table USING ' ' v_fnam x_idata-ematn.
    CONCATENATE 'EKPO-MENGE(' v_indx ')' INTO v_fnam.
    PERFORM subr_bdc_table USING ' ' v_fnam x_idata-menge.
    CONCATENATE 'EKPO-NETPR(' v_indx ')' INTO v_fnam.
    PERFORM subr_bdc_table USING ' ' v_fnam x_idata-netpr.
    CONCATENATE 'EKPO-WERKS(' v_indx ')' INTO v_fnam.
    PERFORM subr_bdc_table USING ' ' v_fnam x_idata-werks.
    v_indx = v_indx + 1.
    PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
    ' ' 'BDC_CURSOR' 'RM06E-EBELP',
    ' ' 'BDC_OKCODE' '/00'.
    ENDLOOP.
    PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
    ' ' 'BDC_CURSOR' 'RM06E-EBELP',
    ' ' 'BDC_OKCODE' '=BU'.
    PERFORM bdc_transaction USING 'ME21'.
    ENDLOOP.
    PERFORM close_group.
    End of selection event *
    END-OF-SELECTION.
    IF session NE 'X'.
    *-----To display the successful records
    WRITE :/10 text-001. "Sucess records
    WRITE :/10 SY-ULINE(20).
    SKIP.
    IF it_sucess IS INITIAL.
    WRITE :/ text-002.
    ELSE.
    WRITE :/ text-008, "Total number of Succesful records
    35 v_ns.
    SKIP.
    WRITE:/ text-003, "Vendor Number
    17 text-004, "Record number
    30 text-005. "Message
    ENDIF.
    LOOP AT it_sucess.
    WRITE:/4 it_sucess-lifnr,
    17 it_sucess-tabix CENTERED,
    30 it_sucess-sucess_rec.
    ENDLOOP.
    SKIP.
    *-----To display the erroneous records
    WRITE:/10 text-006. "Error Records
    WRITE:/10 SY-ULINE(17).
    SKIP.
    IF it_error IS INITIAL.
    WRITE:/ text-007. "No error records
    ELSE.
    WRITE:/ text-009, "Total number of erroneous records
    35 v_ne.
    SKIP.
    WRITE:/ text-003, "Vendor Number
    17 text-004, "Record number
    30 text-005. "Message
    ENDIF.
    LOOP AT it_error.
    WRITE:/4 it_error-lifnr,
    17 it_error-tabix CENTERED,
    30 it_error-error_rec.
    ENDLOOP.
    REFRESH it_sucess.
    REFRESH it_error.
    ENDIF.
    CODE IN INCLUDE.
    Include ZMM_INCL_PURCHASEORDERKB01
    DATA: it_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA: it_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA: E_GROUP_OPENED.
    *-----Internal table to store sucess records
    DATA:BEGIN OF it_sucess OCCURS 0,
    msgtyp(1) TYPE c,
    lifnr LIKE ekko-lifnr,
    tabix LIKE sy-tabix,
    sucess_rec(125),
    END OF it_sucess.
    DATA: g_mess(125) type c.
    *-----Internal table to store error records
    DATA:BEGIN OF it_error OCCURS 0,
    msgtyp(1) TYPE c,
    lifnr LIKE ekko-lifnr,
    tabix LIKE sy-tabix,
    error_rec(125),
    END OF it_error.
    Selection screen
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS session RADIOBUTTON GROUP ctu. "create session
    SELECTION-SCREEN COMMENT 3(20) text-s07 FOR FIELD session.
    SELECTION-SCREEN POSITION 45.
    PARAMETERS ctu RADIOBUTTON GROUP ctu. "call transaction
    SELECTION-SCREEN COMMENT 48(20) text-s08 FOR FIELD ctu.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(20) text-s01 FOR FIELD group.
    SELECTION-SCREEN POSITION 25.
    PARAMETERS group(12). "group name of session
    SELECTION-SCREEN COMMENT 48(20) text-s05 FOR FIELD ctumode.
    SELECTION-SCREEN POSITION 70.
    PARAMETERS ctumode LIKE ctu_params-dismode DEFAULT 'N'.
    "A: show all dynpros
    "E: show dynpro on error only
    "N: do not display dynpro
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 48(20) text-s06 FOR FIELD cupdate.
    SELECTION-SCREEN POSITION 70.
    PARAMETERS cupdate LIKE ctu_params-updmode DEFAULT 'L'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(20) text-s03 FOR FIELD keep.
    SELECTION-SCREEN POSITION 25.
    PARAMETERS: keep AS CHECKBOX. "' ' = delete session if finished
    "'X' = keep session if finished
    SELECTION-SCREEN COMMENT 48(20) text-s09 FOR FIELD e_group.
    SELECTION-SCREEN POSITION 70.
    PARAMETERS e_group(12). "group name of error-session
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 51(17) text-s03 FOR FIELD e_keep.
    SELECTION-SCREEN POSITION 70.
    PARAMETERS: e_keep AS CHECKBOX. "' ' = delete session if finished
    "'X' = keep session if finished
    SELECTION-SCREEN END OF LINE.
    PARAMETERS:p_file LIKE rlgrap-filename.
    at selection screen *
    AT SELECTION-SCREEN.
    group and user must be filled for create session
    IF SESSION = 'X' AND
    GROUP = SPACE. "OR USER = SPACE.
    MESSAGE E613(MS).
    ENDIF.
    create batchinput session *
    FORM OPEN_GROUP.
    IF SESSION = 'X'.
    SKIP.
    WRITE: /(20) 'Create group'(I01), GROUP.
    SKIP.
    *----open batchinput group
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    GROUP = GROUP
    USER = sy-uname.
    WRITE:/(30) 'BDC_OPEN_GROUP'(I02),
    (12) 'returncode:'(I05),
    SY-SUBRC.
    ENDIF.
    ENDFORM. "OPEN_GROUP
    end batchinput session *
    FORM CLOSE_GROUP.
    IF SESSION = 'X'.
    *------close batchinput group
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
    (12) 'returncode:'(I05),
    SY-SUBRC.
    ELSE.
    IF E_GROUP_OPENED = 'X'.
    CALL FUNCTION 'BDC_CLOSE_GROUP'.
    WRITE: /.
    WRITE: /(30) 'Fehlermappe wurde erzeugt'(I06).
    ENDIF.
    ENDIF.
    ENDFORM. "CLOSE_GROUP
    Start new transaction according to parameters *
    FORM BDC_TRANSACTION USING TCODE TYPE ANY.
    DATA: L_SUBRC LIKE SY-SUBRC.
    *------batch input session
    IF SESSION = 'X'.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = TCODE
    TABLES
    DYNPROTAB = it_BDCDATA.
    WRITE: / 'BDC_INSERT'(I03),
    TCODE,
    'returncode:'(I05),
    SY-SUBRC,
    'RECORD:',
    SY-INDEX.
    ELSE.
    REFRESH it_MESSTAB.
    CALL TRANSACTION TCODE USING it_BDCDATA
    MODE CTUMODE
    UPDATE CUPDATE
    MESSAGES INTO it_MESSTAB.
    L_SUBRC = SY-SUBRC.
    WRITE: / 'CALL_TRANSACTION',
    TCODE,
    'returncode:'(I05),
    L_SUBRC,
    'RECORD:',
    SY-INDEX.
    ENDIF.
    Message handling for Call Transaction *
    perform subr_mess_hand using g_mess.
    *-----Erzeugen fehlermappe
    IF L_SUBRC <> 0 AND E_GROUP <> SPACE.
    IF E_GROUP_OPENED = ' '.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    GROUP = E_GROUP
    USER = sy-uname
    KEEP = E_KEEP.
    E_GROUP_OPENED = 'X'.
    ENDIF.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = TCODE
    TABLES
    DYNPROTAB = it_BDCDATA.
    ENDIF.
    REFRESH it_BDCDATA.
    ENDFORM. "BDC_TRANSACTION
    Form subr_bdc_table *
    text
    -->P_0220 text *
    -->P_0221 text *
    -->P_0222 text *
    FORM subr_bdc_table USING VALUE(P_0220) TYPE ANY
    VALUE(P_0221) TYPE ANY
    VALUE(P_0222) TYPE ANY.
    CLEAR it_bdcdata.
    IF P_0220 = ' '.
    CLEAR it_bdcdata.
    it_bdcdata-fnam = P_0221.
    it_bdcdata-fval = P_0222.
    APPEND it_bdcdata.
    ELSE.
    it_bdcdata-dynbegin = P_0220.
    it_bdcdata-program = P_0221.
    it_bdcdata-dynpro = P_0222.
    APPEND it_bdcdata.
    ENDIF.
    ENDFORM. " subr_bdc_table
    Form subr_mess_hand *
    text *
    -->P_G_MESS text *
    FORM subr_mess_hand USING P_G_MESS TYPE ANY.
    LOOP AT IT_MESSTAB.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    ID = it_messtab-msgid
    LANG = it_messtab-msgspra
    NO = it_messtab-msgnr
    v1 = it_messtab-msgv1
    v2 = it_messtab-msgv2
    IMPORTING
    MSG = P_G_MESS
    EXCEPTIONS
    OTHERS = 0.
    CASE it_messtab-msgtyp.
    when 'E'.
    it_error-error_rec = P_G_MESS.
    it_error-lifnr = it_me21-lifnr.
    it_error-tabix = v_count.
    APPEND IT_ERROR.
    when 'S'.
    it_sucess-sucess_rec = P_G_MESS.
    it_sucess-lifnr = it_me21-lifnr.
    it_sucess-tabix = v_count.
    APPEND IT_SUCESS.
    endcase.
    ENDLOOP.
    Describe table it_sucess lines v_ns.
    Describe table it_error lines v_ne.
    ENDFORM. " subr_mess_hand
    Regards
    Anji

  • Flat files formats

    Hi,
    required format of flat files for Sales Orders conversion using standard Bapi by COB.
    Kindly help me .
    Help is appreciated .
    Regards,
    Chowdary
    Moderator message : Search for available information. Thread locked.
    Edited by: Vinod Kumar on Jul 7, 2011 12:17 PM

    Hi,
    How to implement the following logic in OWB.
    LOAD DATA
    INFILE 'myfile.txt'
    BADFILE 'myfile.bad'
    DISCARDFILE 'myfile.dsc'
    APPEND
    Into TABLE_Awhen (1:1) = 'A'
    (Col1 Position(1:1) CHAR,
    Col2 Position(2:5) CHAR)
    Into TABLE_Bwhen (1:1) = 'B'
    (Col1 Position(1:1) CHAR,
    Col2 Position(2:20) EXTERNAL INTEGER)
    Into TABLE_C
    when (1:1) = 'C'
    (Col1 Position(1:1) CHAR,
    Col2 Position(2:20) EXTERNAL INTEGER)
    I am using 10g version of OWB.I tried using the splitter operator.
    I am getting the following error when i use the splitter.
    An invalid combination of operators prevents the generation of code in a single implementation language (PL/SQL code, or SQL*Loader code, or ABAP code). For example, you may have included a SQL*Loader only operator such as the Data Generator in a mapping with a PL/SQL implementation type. If you designed the mapping to generate PL/SQL code, an invalid combination or sequence of operators prevents the generation of PL/SQL code in any of the operating modes(set based, row based, row based target only). If the mapping contains an operator that generates only PL/SQL output, all downstream dataflow operators must also be implementable by PL/SQL. You can use SQL operators in such a mapping only after loading the PL/SQL output to a target. Detail is as follows:
    PL/SQL set based operating mode: Operator trailer_source_txt does not support SQL generation.
    PL/SQL row based operating mode: Operator trailer_source_txt does not support SQL and PL/SQL generation.
    PL/SQL row based (target only) operating mode: Operator trailer_source_txt does not support SQL and PL/SQL generation.
    Both SQL and PL/SQL handlers are not supported by trailer_source_txt as output
    SQL*Loader: Operator SPLIT does not support SQL*Loader generation.
    ABAP: Operator trailer_source_txt does not support ABAP generation.
    Thanks in advance,
    VInay

Maybe you are looking for