Two formats in same flat file

Hi,
I have a mapping where I extract the data from certain tables into a flat file. This works perfectly.
Now the requirement is to add a row at the end with some other details like number of rows, date, etc. The format is different.
So I tried creating a second file operator and putting it in the same mapping. But OWB wouldn't allow that as I got -
VLD-2359: The following targets have identical file names and locations specified as configuration parameters: ORDER_NUMBER_FILE_1,ORDER_DATE_FILE_1. This will cause errors trying to write to the target file. Configure the mapping to correct this error.
Someone must've done this before. What problems did you encounter?
Thanks

Hi
As the error suggest, it might just not be possible to do this straight in OWB. I am not saying it isn't possible, but I at least don't know of a way to achieve this. An easy work-around would be to have your second mapping just write to a second file, which would actually be the same file on the OS lever (i.e. use symbolic links in Unix. perhaps a shortcut in Windows works as well). It's not the clean way of doing it all in OWB, but it should work fine.
Another way would be to add a third mapping after these initial two that read in the two target files as simply single field files (one long row) and write the both out in to the final target.
Borkur

Similar Messages

  • Different formats of the flat file for the same target

    In our deployment, we use plugin code to extract the csv files in the required format. The customers are on same version of datamart, but they are on different versions of source database - from 3.x to 4.5 depending on which version of application they are using. In 4.0, we introduced a new column email in the user table in the source database. Accordingly, plugin will add the field in the csv file. But not all the customers will get the upgraded version of plugin at the same time. So ETL code needs to decide which data flow to process depending on the format of the csv file to load data to the same target table. I made the email field in the target table nullable but it still expects the same format of the csv file with delimiter for null value.
    Need help to achieve this. Can I read the structure of the flat file in DS or get the count of delimiters so that I can use a conditional to use different data flow based on the format of the flat files.
    Can I make the email column in the flat file optional?
    Thanks much in advance.

    You can add an email column that maps to null in a query transform for the source that does not contain this column. 
    Or else you can define two different file formats that map to the same file.  One with the column and one without

  • DOWNLOAD CHEQUE FORMAT INTO A FLAT FILE

    hi,
       i have a requirement to download cheque format into  a flat file.
    as shown below. can any one guide me in this.
                                    Check No.   Date      Payment Amt
                                     1200175681  16/05/07           229.26  CAD
      Pay     TWO HUNDRED TWENTY NINE & 26/100*************************** CANADIAN D
      To The  MINISTER OF FINANCE
      Order   BARRIE SMALL CLAIMS COURT
      Of      114 WORSLEY STREET
              BARRIE ON L4M 1M1                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      BARRIESMCC                     1200175681   16/05/07
      Payee
      MINISTER OF FINANCE
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 BARRIESMCC02MAY                          0.00 CAD           229.26
                                                                                    Check No.   Date      Payment Amt
                                     1200175682  16/05/07           149.96  CAD
      Pay     ONE HUNDRED FORTY NINE & 96/100**************************** CANADIAN D
      To The  BELLEVILLE ONTARIO HRDC
      Order   REMITTANCES
      Of      PO BOX 6767
              MATANE QC G4W 4T1                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      BELLEVONHR                     1200175682   16/05/07
      Payee
      BELLEVILLE ONTARIO HRDC
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 HRDCQC09MAY07                            0.00 CAD           149.96
                                                                                    Check No.   Date      Payment Amt
                                     1200175683  16/05/07         1,590.00  CAD
      Pay     ONE THOUSAND FIVE HUNDRED NINETY & 00/100****************** CANADIAN D
      To The  CANADIAN ENERGY EFFICIENCY
      Order   ALLIANCE
      Of      2800 SKYMARK AVENUE
              MISSISSAUGA ON L4W 5A6             ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      CANENERGEF   02                1200175683   16/05/07
      Payee
      CANADIAN ENERGY EFFICIENCY
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      11/05/07 2117                                     0.00 CAD         1,590.00
                                                                                    Check No.   Date      Payment Amt
                                     1200175684  16/05/07         8,701.83  CAD
      Pay     EIGHT THOUSAND SEVEN HUNDRED ONE & 83/100****************** CANADIAN D
      To The  CITY OF HAMILTON
      Order   ACCOUNTS RECEIVABLE
      Of      120 KING ST WEST
              SUITE 900, STANDARD LIFE BLDG      ______________________________
              HAMILTON ON L8P 4V2
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      CITYHAMIL    01                1200175684   16/05/07
      Payee
      CITY OF HAMILTON
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      12/04/07 112949                                   0.00 CAD         8,701.83
                                                                                    Check No.   Date      Payment Amt
                                     1200175685  16/05/07        23,104.38  CAD
      Pay     TWENTY THREE THOUSAND ONE HUNDRED FOUR & 38/100************ CANADIAN D
      To The  MINISTRY OF COMMUNITY AND
      Order   SOCIAL SERVICES,  DIRECTOR
      Of      FAMILY RESPONSIBILITY OFFICE
              PO BOX 2204  STATION P             ______________________________
              TORONTO ON M5S 3E9
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      FAMILYREOF                     1200175685   16/05/07
      Payee
      MINISTRY OF COMMUNITY AND
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 FRO02MAY07                               0.00 CAD        23,104.38
                                                                                    Check No.   Date      Payment Amt
                                     1200175686  16/05/07           553.85  CAD
      Pay     FIVE HUNDRED FIFTY THREE & 85/100************************** CANADIAN D
      To The  HAROLD MCQUAKER ENTERPRISES
      Order   LTD
      Of      BOX 538
              EMO ON P0W 1E0                     ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      HAROLDMCEN                     1200175686   16/05/07
      Payee
      HAROLD MCQUAKER ENTERPRISES
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      17/03/07 121                                      0.00 CAD           553.85
                                                                                    Check No.   Date      Payment Amt
                                     1200175687  16/05/07       428,684.44  CAD
      Pay     **********428,684.44************************************* CANADIAN D
      To The  MERIDIAN CREDIT UNION
      Order   STE 160 S
      Of      483 BAY ST
              TORONTO ON M5G 2E1                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      HEPCOEDRUN   12                1200175687   16/05/07
      Payee
      MERIDIAN CREDIT UNION
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 MERIDIEN02MAY07                          0.00 CAD       428,684.44
                                                                                    Check No.   Date      Payment Amt
                                     1200175688  16/05/07         7,319.15  CAD
      Pay     SEVEN THOUSAND THREE HUNDRED NINETEEN & 15/100************* CANADIAN D
      To The  HYDRO ONE EMPLOYEES AND
      Order   PENSIONERS CHARITY TRUST
      Of      483 BAY STREET 14TH FL
              NORTH TOWER                        ______________________________
              TORONTO ON M5G 2P5
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      HYDROONEEP                     1200175688   16/05/07
      Payee
      HYDRO ONE EMPLOYEES AND
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 CHARITY02MAY07                           0.00 CAD         7,319.15
                                                                                    Check No.   Date      Payment Amt
                                     1200175689  16/05/07           357.97  CAD
      Pay     THREE HUNDRED FIFTY SEVEN & 97/100************************* CANADIAN D
      To The  MINISTER OF FINANCE
      Order   KENORA SMALL CLAIMS COURT
      Of      216 WATER STREET
              KENORA ON P9N 1S4                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      KENORASMCC                     1200175689   16/05/07
      Payee
      MINISTER OF FINANCE
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 KENORASMCC09MAY                          0.00 CAD           357.97
                                                                                    Check No.   Date      Payment Amt
                                     1200175690  16/05/07           692.41  CAD
      Pay     SIX HUNDRED NINETY TWO & 41/100**************************** CANADIAN D
      To The  MURRAY, WALTER
      Order   .
      Of      1721 CEDAR LANE
              BRACEBRIDGE ON P1L 1W9             ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      MURRAYWALT                     1200175690   16/05/07
      Payee
      MURRAY, WALTER
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      09/05/07 EXS2007710                               0.00 CAD           692.41
                                                                                    Check No.   Date      Payment Amt
                                     1200175691  16/05/07         2,437.44  CAD
      Pay     TWO THOUSAND FOUR HUNDRED THIRTY SEVEN & 44/100************ CANADIAN D
      To The  PACE, ROBERT
      Order   .
      Of      5121 SACKVILLE ST, 7TH FLOOR
              HALIFAX NS B3J 1K1                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      PACEROBERT                     1200175691   16/05/07
      Payee
      PACE, ROBERT
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      09/05/07 EXS200711                                0.00 CAD         2,437.44
                                                                                    Check No.   Date      Payment Amt
                                     1200175692  16/05/07         2,718.35  CAD
      Pay     TWO THOUSAND SEVEN HUNDRED EIGHTEEN & 35/100*************** CANADIAN D
      To The  RECEIVER GENERAL FOR CANADA
      Order   CANADA CUSTOMS REVENUE AGENCY
      Of      875 HERON RD
              OTTAWA ON K1A 1B1                  ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      RECEIVEGEN                     1200175692   16/05/07
      Payee
      RECEIVER GENERAL FOR CANADA
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 CRABNW02MAY07                            0.00 CAD         2,718.35
                                                                                    Check No.   Date      Payment Amt
                                     1200175693  16/05/07         7,688.00  CAD
      Pay     SEVEN THOUSAND SIX HUNDRED EIGHTY EIGHT & 00/100*********** CANADIAN D
      To The  RECEIVER GENERAL FOR CANADA
      Order   INDIAN & NORTHERN AFFAIRS
      Of      100 ANEMKI DRIVE
              RR #4                              ______________________________
              THUNDER BAY ON P7J 1A5
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      RECEIVGECA   77                1200175693   16/05/07
      Payee
      RECEIVER GENERAL FOR CANADA
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      14/05/07 P2107132007                              0.00 CAD         7,688.00
                                                                                    Check No.   Date      Payment Amt
                                     1200175694  16/05/07         4,155.20  CAD
      Pay     FOUR THOUSAND ONE HUNDRED FIFTY FIVE & 20/100************** CANADIAN D
      To The  REUTERS CANADA LIMITED
      Order   CANADA
      Of      PO BOX 1519, STATION A
              TORONTO ON M5W 3N9                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      REUTERINSV                     1200175694   16/05/07
      Payee
      REUTERS CANADA LIMITED
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      01/04/07 ICA807040667                             0.00 CAD         4,155.20
                                                                                    Check No.   Date      Payment Amt
                                     1200175695  16/05/07         4,155.20  CAD
      Pay     FOUR THOUSAND ONE HUNDRED FIFTY FIVE & 20/100************** CANADIAN D
      To The  REUTERS CANADA LIMITED
      Order   CANADA
      Of      PO BOX 1519, STATION A
              TORONTO ON M5W 3N9                 ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      REUTERINSV                     1200175695   16/05/07
      Payee
      REUTERS CANADA LIMITED
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      01/05/07 ICA807050645                             0.00 CAD         4,155.20
                                                                                    Check No.   Date      Payment Amt
                                     1200175696  16/05/07        10,000.00  CAD
      Pay     TEN THOUSAND & 00/100************************************** CANADIAN D
      To The  WATERLOO REGIONAL CHILDRENS
      Order   MUSEUM
      Of      10 KING ST W
              KITCHENER ON N2G 1A3               ______________________________
                                                         Authorized Signature
      Vendor ID        Personnel ID  Check No.    Date
      WATERLRECM                     1200175696   16/05/07
      Payee
      WATERLOO REGIONAL CHILDRENS
        Date     Invoice No.   PO/Cntrct Rel  Discount/Wthld Cur  Payment Amount
      29/11/06 2006050034                               0.00 CAD        10,000.00

    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

  • Diifferent java apllications write to the same flat file database

    I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file?
    They should be able to write whenever they want.

    JavaFunda wrote:
    I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file?I guess my question would be: is it a file or a database (as in an RDB)?
    I think EJP's post was aimed at syncing writes to files (and he'll definitely tell me if I'm wrong : )), but it may be redundant if, in fact, your output is going to a database.
    Also, Java has some quite sophisticated logging applications (I believe log4j is quite popular; but there are others), which may serve your needs.
    Winston

  • ASCII format while loading flat files.

    Hi,
    Please tell me, if i want to load a flat file of
    ASCII format instead of CSV, what shoud be the format of
    the ASCII file is it text document or something else?
    please send me a sample file.
    and what will be the values for this? and are these mandatory?
    1) Separator for Thousands
    2) Character Used for Decimal Point
    3) Currency conversion for External systems

    Hi Gopi,
    Thanks for the suggestions.
    I have one more doubt.
    well i was trying with a sample flat file which contains
    two infoobjects--
    1. empid(key figure) 2.empname(characteristic)
    i created infosource cube everything is fine and when i try to create a infopackage---i mention file name of ACII
    keeping this option. ASCII file which is in a text format
    and i am seperating the data jus by a place.
    when i do preview, instead of getting 2 columns with diff values , i am geting both column values in a single column.
    what should i do for this?
    how to get values in separate columns?
    Thanks,
    Vijaya.

  • Create multiple external tables from same flat file ?

    using oracle 10g
    currently create many external tables like so..
    CREATE TABLE "XT_UNITS"
    "Q1_2012" VARCHAR2(25 BYTE),
    "Q2_2012" VARCHAR2(25 BYTE),
    "Q3_2012" VARCHAR2(25 BYTE),
    "Q4_2012" VARCHAR2(25 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "XE_FILES" ACCESS PARAMETERS ( records delimited BY newline
    skip 1 fields terminated BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES
    ARE NULL ) LOCATION ( 'xtunits.csv' ))
    is there any way I can use 1 flat file (csv) to populate many external tables ?
    maybe by section ?

    Jay wrote:
    using oracle 10g
    currently create many external tables like so..
    CREATE TABLE "XT_UNITS"
    "Q1_2012" VARCHAR2(25 BYTE),
    "Q2_2012" VARCHAR2(25 BYTE),
    "Q3_2012" VARCHAR2(25 BYTE),
    "Q4_2012" VARCHAR2(25 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "XE_FILES" ACCESS PARAMETERS ( records delimited BY newline
    skip 1 fields terminated BY ',' OPTIONALLY ENCLOSED BY '"' MISSING FIELD VALUES
    ARE NULL ) LOCATION ( 'xtunits.csv' ))
    is there any way I can use 1 flat file (csv) to populate many external tables ?
    maybe by section ?Not a logical question.
    An external table definition relates to one or more files.
    You could probably create multiple externable table definitions to access the same file(s), but you may end up with some operating system file locking issues if you're not careful, and to be honest why would you need to do that?

  • Date format problem in Flat file extraction

    My flat file is send date like this  DD/MM/YYYY  HH:MM:SS  how can i extract date and time to my ODS. i need date if posible time in seperate object
    how can i create my info object and how to map it.
    Thanks
    Babu

    Hi,
    create a routine and use the statement convert timestamp. Check out the F1-help for details of the statement.
    Siggi

  • Getting correct field length when creating formats for delimited flat files

    Using Data Services 3.2 to pull in tsv and Excel source files.
    When creating a new format for each file, DS tries to intelligently set the field size for each column. However, it seems to sample only a portion of the file. The end result is that it often determines too short a length for a field.
    Is there a way to force it to scan an entire file before it sets the field length? Or alternatively, how to get it to at least throw an error instead of silently truncating my data?

    I am not aware of any way to force DS to scan the whole file, or to log a warning when it truncates.  The field sizes DS sets by using a sample of the data is only really to give you a starting point, you need to try and determine the maximum possible lengths preferably from someone who understands the source of the data or through profiling.  But the profiling method will obviously only be based on the data you have at the time of profiling, new data added to the source later could exceed the field lengths.  The way I prefer to handle this is to set all the field lengths to longer than expected, eg. varchar(999) and then use a validation transform immediately after reading the file to check for any fields that exceed the maximum allowed for the target system and send these to an error file/table.

  • Loading masterdata and transaction data from same flat file

    hi all,
    how can i load master data and transaction data from the same flatfile at a time.

    I am afraid it is possible.
    Go thru this Uploading Master & Transaction Data together from Flat File

  • 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

  • IDOC to Flat File and XML ( Need both the Output)

    Hi ,
    My Scenario is IDOC to File .
    I need o/p in 2 format . ie,    1) Flat File 2 ) XML file
    I have a plan to go with Interface determination , 2 IM and what shd be the condition ?
    or Else  2 Receiver detmination  but condition ?
    How to slove this ?
    Need the Output from Idoc in 2 format ( Flat file and XML file )
    Any Blog , Thread ...Tips...etc
    Regards,
    Jude

    Hi Jude,
    Do like this:
    1. Create two inbound Service Interface (with the same target Message Type)
    2. Create separate Operation mapping with the above service interfaces as target (with the same source service interface)
    3. Create Interface Determination and include these two operation mapping (without any condition)
    4. Create 2 receiver agreement (with two separate communication channel) for each of the target service Inetrface. In one channel use content conversion and the other one will give you normal XML output
    Regards
    Suraj

  • What is the best way to load and convert data from a flat file?

    Hi,
    I want to load data from a flat file, convert dates, numbers and some fields with custom logic (e.g. 0,1 into N,Y) to the correct format.
    The rows where all to_number, to_date and custom conversions succeed should go into table STG_OK. If some conversion fails (due to an illegal format in the flat file), those rows (where the conversion raises some exception) should go into table STG_ERR.
    What is the best and easiest way to archive this?
    Thanks,
    Carsten.

    Hi,
    thanks for your answers so far!
    I gave them a thought and came up with two different alternatives:
    Alternative 1
    I load the data from the flat file into a staging table using sqlldr. I convert the data to the target format using sqlldr expressions.
    The columns of the staging table have the target format (date, number).
    The rows that cannot be loaded go into a bad file. I manually load the data from the bad file (without any conversion) into the error table.
    Alternative 2
    The columns of the staging table are all of type varchar2 regardless of the target format.
    I define data rules for all columns that require a later conversion.
    I load the data from the flat file into the staging table using external table or sqlldr without any data conversion.
    The rows that cannot be loaded go automatically into the error table.
    When I read the data from the staging table, I can safely convert it since it is already checked by the rules.
    What I dislike in alternative 1 is that I manually have to create a second file and a second mapping (ok, I can automate this using OMB*Plus).
    Further, I would prefer using expressions in the mapping for converting the data.
    What I dislike in alternative 2 is that I have to create a data rule and a conversion expression and then keep the data rule and the conversion expression in sync (in case of changes of the file format).
    I also would prefer to have the data in the staging table in the target format. Well, I might load it into a second staging table with columns having the target format. But that's another mapping and a lot of i/o.
    As far as I know I need the data quality option for using data rules, is that true?
    Is there another alternative without any of these drawbacks?
    Otherwise I think I will go for alternative 1.
    Thanks,
    Carsten.

  • J2SE XML to Flat File Content Conversion

    Hi
    I've currently got a scenario which sends a flat file to the integration server, it gets mapped and sent to a receiver adapter on a deployed j2se engine.
    I'm now trying to convert the xi-xml structured file to a flat file again on the j2se side (the same flat file format it originally had).
    My original flat file looks like this -
    477
    477=AA1
    My xml file looks like this -
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ResultMessage xmlns:ns0="urn:xxxx-com:a_test_j2se_filetofile">
    <Item>
              <field1>477</field1>
    </Item>
    <Item>
              <field1>477</field1>
              <field2>AA1</field2>
    </Item>
    </ns0:ResultMessage>
    I am using these content conversion parameters:
    xml.addHeaderLine=0
    xml.fieldSeparator==
    xml.endSeparator='nl'
    I get this error on the integration engine (sxmb_moni):
    Error while sending by HTTP (error code: 500, error text: Internal Server Error:java.lang.NullPointerException) (See attachment HTMLError for details)
    and the j2se adpater log says this:
    17:16:32 (4120): Message "13b9d644-54c9-4ffb-0c40-db4c14458d77" of type "application/xml", kind "B" received
    17:16:32 (4124): Parsing XML message
    17:16:32 (4131): ERROR: Message processing failed with "java.lang.NullPointerException"
    What am i missing?

    So, now... I did a test configuration in XI and sent your test-payload...it worked.
    The J2SE adapter configuration:
    File adapter java class
    classname=com.sap.aii.messaging.adapter.ModuleXMB2File
    version=30
    mode=XMB2FILEWITHCONVERSION
    #Adress for XMB endpoint -
    XI.httpPort=8111
    XI.httpService=/file/receiver
    #File Adapter specific parameters -
    file.createDir=1
    file.targetDir=c:/transfer/inbound
    file.targetFilename=xmboutput.txt
    #file.writeMode=append
    #file.writeMode=overwrite
    file.writeMode=addCounter
    file.counterMode=immediately
    #file.counterMode=afterFirst
    file.counterSeparator=_
    file.counterFormat=00000
    file.counterStep=1
    #File Content Conversion specific parameters -
    xml.addHeaderLine=0
    xml.fieldSeparator==
    xml.endSeparator='nl'
    And here the configuration of the receiver communication channel in the integration directory:
    Adapter Type: XI
    Receiver
    Transport-Protocol: HTTP 1.0
    Message-Protocol: XI 3.0
    Adapter-Engine: Integration Server
    Adressing-Type: URL Address
    Target Host: <yourJ2SEip>
    Service Number: 8111
    Path Prefix:http://<yourJ2SEip>:8111/file/receiver
    Authentication Data
    Logon data for non-SAP systems
    User
    Password
    That's it... sent your payload and got the wished result:
    477
    477=AA1
    Regards,
    Heinrich

  • B1i Truncating space characters in elements from RegEx flat file SLD

    Task:
    I'm importing from a fixed-width file that's specifically 94 characters wide consisting of multiple columns.  My only concern at this point is the number of lines and their width.  I have to pad the block out to a specific number of lines, and all existing lines in my source file already fill all 94 characters.  Multiple headers and footers exist in the same flat file, so defining the format explicitly based on column width in RegEx will add significant time to the project (though it's not necessarily impossible).
    This file ends lines with a single LF character (no CR), which apparently is too much for TXT and CSV formats to handle (the entire file comes in as one line).  So I turned to Regex, where I can split the document on arbitrary characters like LFs.
    I've recorded a message and the lines look something like this:
    "ABB CCCCCCCCC DDDDDDDDDEEEEEEFFFFGHHHIIJKKKKKK KKKK K KKKKK    KKKKKK KKKK K KKKKK    LLLLLLLL"
    and column L is occasionally blank (just spaces).  This is one of the row formats present in the file.  Most of the columns use spaces as fill characters and are left justified.
    Tag definition looks like this:
    <tagDefinition xmlns="urn:com.sap.b1i.bizprocessor:pltdefinition" regex="\n" schemaName="" tagName="line" matchSplit="S" stackSize="10000" DOTALL="true" MULTILINE="false">
    </tagDefinition>
    Problems:
    With a recorded test messsage, the lines build properly:
    <Payload Role="S" intype="rgx_ruledoc">
    <bfa:io xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="rgx" schemaName="">
      <line xmlns="">ABB CCCCCCCCC DDDDDDDDDEEEEEEFFFFGHHHIIJKKKKKK KKKK K KKKKK    KKKKKK KKKK K KKKKK            </line>
    </bfa:io>
    </Payload>
    But by the time it reaches my first XSL Transformation atom, I receive the data in this form:
    <Payload Role="S" intype="rgx_ruledoc">
    <bfa:io xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="rgx" schemaName="">
      <line xmlns="">ABB CCCCCCCCC DDDDDDDDDEEEEEEFFFFGHHHIIJKKKKKK KKKK K KKKKK KKKKKK KKKK K KKKKK </line>
    </bfa:io>
    </Payload>
    In other words, I'm missing 3 spaces from within the middle of K and 11 from the end of the example line.  Multiple lines are affected by this.  I've built the Regex import portion properly, judging by the test message.  But the data I build is not the data I'm given.  And the truncation seems to be happening somewhere outside my control.
    Questions:
    1. Is there a way to specify that all spaces are non-breaking in the input/output format descriptors?
    2. Is there a way I can specify that B1i doesn't modify the data before handing it to me?
    3. Is there an easier/more correct way to do this?
    Also possibly 4. Can you specify line endings in TXT/CSV imports?

    As far as I've found, there's no way to specify that B1i doesn't normalize spaces for you in an input Msg.  I ended up splitting the incoming message line to its individual columns using the Regex format descriptor.  That way, I was able to track the integrity of each component of the message.
    However, when writing out to the same file format using the TXT file type, B1i is inserting commas between the columns, despite:
    1. Being TXT format, which shouldn't use delimiters.
    2. Having the delimiter field empty.  It correctly ignores this field, even if it does insert a delimiter.
    3. Specifying no delimiter explicitly using <FileOut type="file_full">/<Control><deli>.
    It seems odd that the included means for writing raw text would mangle the output message so.
    Has anyone successfully written data to a TXT file with no delimiter?

  • IDoc - XI - IDoc Flat File

    Hi Everyone:
    We have a situation where we need to process an outbound IDoc through XI and create a flat IDoc file on a file server.
    Everything works fine, but when file is created; it's in XML format.  I have done the configuration in SXMB_ADM, so that it won't convert the IDoc to XML, but it still does i.e. segments and fields tags are added before and after the values.  For example,
    <Z1JBRS SEGMENT="1">
    <CTEUSR>SOMEUSER</CTEUSR>
    <CTEDTE>20000906</CTEDTE>
    <CHEUSR>No User</CHEUSR>
    <CHEDTE>00000000</CHEDTE>
    <CHETME>000000</CHETME>
    </Z1JBRS>
    All I want is to create the same flat file that will get created if I use the "rfcexec"/"startrfc" criteria from SAP, which transfers the file to EDI Sub-System.  Has anyone come across this situation?  Any information / direction / suggestion will be appreciated.
    Thanks,
    JB

    Hi,
    If it Idoc is passing thru XI, then it will convert into xml as XI can understand xml format.,
    So if you want to get flat file, you need to convert xml into flat structure,. For this you need to use option of "File Content Conversion" in File Reciever Communication channel. If so, you need to configure content conversion for this.
    Refer this guide-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Regards,
    Moorthy

Maybe you are looking for