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

Similar Messages

  • Upload flat file (Content Conversion Parameters)

    Hello,
    I am still trying to upload a flat text file to XI. Its a non separator file.
    Here the error message from the XI adaper engine:
    Sender Adapter v1508 for Party '', Service 'IXI_FileSystem_CSV':
    Configured at 15:36:12 2005-08-03
    Initialization error: Conversion initialization failed with java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: <b>
    Mandatory parameter 'CONTROL.keyFieldValue': no value found</b>
    Here all my settings:
    Message protocol: File Content Conversion
    Document name: CMA_FILEINPUT1
    Document namespace: http://www.xyz/ogsd
    Recordset name: RECORD
    Recordset structure: CONTROL,1,SEGMENT,*
    <b>Key Field Name: SEGMENT.DUMMYKEY</b>
    Key Field Type: String (cs) -> default
    Fields:
    CONTROL.fieldNames:TABNAM,MANDT,DOCNUM,DOCREL,....
    CONTROL.fieldFixedLengths:10,3,16,4,2,1,1,...
    SEGMENT.fieldNames:DUMMYKEY,DUMMY,LOCATIONID,...
    SEGMENT.fieldFixedLengths:12,51,10,18,4,10,
    SEGMENT.keyFieldValue:E2BPBULOCM03 (string that occurs in the first field DUMMYKEY of SEGMENT)
    The message type looks like this:
    CMA_MSGTYP1                1:1
      RECORD                   1:1
        CONTROL                1:1
          TABNAM
          MANDT...
        SEGMENT                0:unbounded
          DUMMYKEY
          DUMMY
          LOCATIONID...
    Why do i get that error message? How to fill Key field name correctly? In my opinion i dont need key fields for CONTROL because of the occurence of one.
    Any idea?

    Thanks to all. So "Key Field Name" is just symbolic?
    Here are my new settings:
    Message protocol: File Content Conversion
    Document name: CMA_FILEINPUT1
    Document namespace: http://www.xyz.de/ogsd
    Recordset name: RECORD
    Recordset structure: CONTROL,1,SEGMENT,*
    <b>Key Field Name: KF</b>
    Key Field Type: String (cs) -> default
    Fields:
    CONTROL.fieldNames:TABNAM,MANDT,DOCNUM,DOCREL,....
    CONTROL.fieldFixedLengths:10,3,16,4,2,1,1,...
    SEGMENT.fieldNames:DUMMYKEY,DUMMY,LOCATIONID,...
    SEGMENT.fieldFixedLengths:12,51,10,18,4,10,
    <b>SEGMENT.keyFieldValue:E2BPBULOCM03 (from DUMMYKEY)
    CONTROL.keyFieldValue: HRETZU (from TABNAM) </b>
    Both key fields are the first entries in the substructures.
    Now this error is coming up:
    Sender Adapter v1508 for Party '', Service 'IXI_FileSystem_CSV':
    Configured at 16:41:24 2005-08-03
    Last message processing started 16:41:24 2005-08-03, Error: Conversion of complete file content to XML format failed around position 0 with java.lang.Exception: ERROR converting document line no. 2 according to structure 'SEGMENT':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this
    last retry interval started 16:41:24 2005-08-03
    length 30,000 secs
    What is that for a new parameter(lastFieldsOptional)?

  • EDI Flat file Content Conversion

    Hi Experts,
    I have got a question on File Content Conversion, Please have  look the following structure, is it possible with FCC or what is the best possible solution for this, which is very big favour to me.
    Some information about this structure,
    This is EDI message in flat file structure, each segment has got 700 characters as a row, LIN item is repeating many times,
    ST ,XQ , N1 , DTM, LIN, P04, N9,ZA , ZA ,ZA , etc are segments, LIN item is repeating, at the end CTT is last segment. Again from ST segment to CTT segment comes 3 more times.
    ST 0000001     4444444
    XQ H            20100531
    N1 xxxxxxxx                            u 00000
    N4 aaaaaaaa, kk                  xx87654
    DTM600                                                        20100531
    LIN           CB224790                        HH002720033676                  PP00027200336760                ZZ0
    P0400001000000000         000000000  000000000  000000000000000000000000
    N9 VN0000000594
    ZA QA238.00000000000CT         LJXX
    ZA QN1.0000000000000CT         LJXX
    ZA QO000000000000000CT         LJXX
    ZA QP210.00000000000CT         LJXX
    ZA QS61.000000000000CT         LJXX
    ZA QW208.00000000000CT         LJXX
    LIN           CB320275                        SS004330033052                  PP00043300330521                ZZ0
    P0400001000000000         000000000  000000000  000000000000000000000000
    N9 VN0000000594
    ZA QA36.000000000000CT         LJXX
    ZA QN1.0000000000000CT         LJXX
    ZA QO000000000000000CT         LJXX
    ZA QP120.00000000000CT         LJXX
    ZA QS8.0000000000000CT         LJXX
    ZA QW36.000000000000CT         LJXX
    CTT00005300000000000000000000  00000000
    ST 0000001     4444444
    XQ H            20100531
    N1 xxxxxxxx                            u 00000
    N4 aaaaaaaa, kk                  xx87654
    DTM600                                                        20100531
    LIN           CB224790                        HH002720033676                  PP00027200336760                ZZ0
    P0400001000000000         000000000  000000000  000000000000000000000000
    N9 VN0000000594
    ZA QA238.00000000000CT         LJXX
    ZA QN1.0000000000000CT         LJXX
    ZA QO000000000000000CT         LJXX
    ZA QP210.00000000000CT         LJXX
    ZA QS61.000000000000CT         LJXX
    ZA QW208.00000000000CT         LJXX
    LIN           CB320275                        SS004330033052                  PP00043300330521                ZZ0
    P0400001000000000         000000000  000000000  000000000000000000000000
    N9 VN0000000594
    ZA QA36.000000000000CT         LJXX
    ZA QN1.0000000000000CT         LJXX
    ZA QO000000000000000CT         LJXX
    ZA QP120.00000000000CT         LJXX
    ZA QS8.0000000000000CT         LJXX
    ZA QW36.000000000000CT         LJXX
    CTT00005300000000000000000000  00000000
    Please I am really requesting you get appropriate answer and quick response please
    Thanks in Advance
    Regards
    Sandya

    Hi Suresh, Raj,
    Thanks for quick reply, but we haven't got Seeburger Adapter in our landscape. Please one small clarification please this message looks to me, we can do with FCC, but i need some experties from you guys.
    1. ST segment comes in one line with 700 characters - has got 5 fields 1..1 cardinolity
    2. XO segment comes in another line with same length 700 ch,  but 8 fields different lengths 1..1 cardinality
    10 LIN segment comes in another line 700 characters, but 0..n
    Can't we take structure as follows:
    Header     --    0..n
        SegID  ---    1..1
        field 2 -
        1..1
        field 3 -
        1..1
        field 4 -
        1..1
        field 5 ---      1..1
        Row2   -
       1..1
           SegID -
       1..1
           field2  -
       1..1
        Row6    -
        1..n  (for LIN segment)
           SegID ---   1..1
           field 2  ---  1...1
    Please can you give me your experties please??
    Regards
    Sandya

  • Sender File Adapter: Flat file content conversion to "multileveled" XML

    Hi all,
    I would like to do following conversion with file adapter:
    - Input flat file schema:
    A...
    B,,,
    C:::
    - Desired XML form:
    <mesage>
      <A>
        <B>
          <C>:::</C>
        </B>
      </A>
    </message
    >
    All found examples (internet or XI documentation) do offer only "flat" XML option:
    <mesage>
      <A>...</A>
      <B>,,,</B>
      <C>:::</C>
    </message>
    Does anybody have an idea ?
    Thanx and regards
    Jurica

    File Adapters content conversion does not supprot such a nested strucutre currently.
    The only format supported is the one shown in ths link,
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Either write a module that will do this conversion or Change the datatye for the source to the format shown in help.sap.
    Regards
    Bhavesh

  • Flat file content conversion repeating fields

    Hello,
       I have a flat file where the first three fields are fixed; the rest of the file line is made up of 1 .. n analysis characteristic results. The name of the field (Result) is always the same, but I never know how many results I will have on one line. Could anyone tell me how I might define this in content conversion ? Thanks in advance.
    Peter DOUGHERTY.

    Sorry,
       Of course ... here it is
    10059514     22/09/08 8:29:02     20,2     0     0     0     0,30     0     133     0     0     0     0     0     0     0     0     0     0     0     
    The first field is the Id of the sample
    Second field Date
    Third field Time
    The 4th ... 21st fields a (varying) number of results (here there are 18, but there could be any number from 1 upwards)
    Hope it is clearer
    Thanks
    Peter

  • XML file conversion after sender file content conversion

    Hi,
    I have issue refarding file content conversion.
    My input structure is
    <MT_RCICrecords>
    <TRNH>
      <RCIC>
        <RECH>
        <RECL>
      <RCIC>
    <TRNH>
    Afetr sender File content conversion (csv to xml) it produces xml file as below (since file conversion does not support 3rd level of hierarchy)
    <TRNH>
    <RECH>
    </RECH>
    <RECL>
    </RECL>
    </TRNH>
    It does not recognize RCIC.
    Now i am trying to map this to IDOC and getting error as
    'MT_RCICRecords tag found instead of IDOC BEGIN ='.
    CAn anyone suggest me how to chaage this xml output after File content conversion to add RCIC tag in xml file?
    I am new to XI so please give me some sample code to.
    Thanks.
    Yashpal
    Its urgent!

    My problem is xml generated from content conversion is like below
    <MT_RCICrecords>
    <TRNH></TRNH>
    <RECH></RECH>
    <RECL></RECL>
    <TRLR></TRLR>
    </MT_RCICrecords>
    and i want it to be
    <MT_RCICrecords>
    <TRNH></TRNH>
    <RCIC>
    <RECH></RECH>
    <RECL></RECL>
    </RCIC>
    <TRLR></TRLR>
    </MT_RCICrecords>
    which is not happening
    My input message structure is
    MT_RCICrecords
    TRNH
    RCIC
    RECH
    RECL
    i hope it is clear now
    TRLR

  • Hi Question about Sender File Content Conversion

    Hi All,
    I have a flat file i need convert that flat file to the below XML format using File content Conversion, can anybody help me on this with example File content Convertion parameters
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_FileSend xmlns:ns0="http://test">
       <Recordset>
          <Contact>
             <Name>ABC</Name>
             <Number>123</Number>
             <Address>
                <HouseNumber>246789</HouseNumber>
                <StreetNumber>100</StreetNumber>
                <Phone>
                   <Mobile>90000000</Mobile>
                   <LandLine>12345678</LandLine>
                </Phone>
             </Address>
             <Email>
                <Office></Office>
                <Personal></Personal>
             </Email>
          </Contact>
       </Recordset>
    </ns0:MT_FileSend>

    Hi Sudheer reddy,
            Good question.
    File content conversion parameters are:
    1) Doccument Name: Doccument name is nothing but message type name for file side: MT_FileSend
    2) Doccument Namespace: mention the name space for the message type.
    3) Doccument Offset: for which row and which coloumn doccument has to be write.
    4) recordset name: mention the record set name: Recordset
    5) Recordset Namespace: if the namespace is different for message type name space mention name space or otherwise it is blank.
    6) Recordset Structure: Mention the structure name
    7) Recordset Sequence: mention the sequence of the recordset Ascending or Decending
    8) Recordset permessage: Would define no of record sets per message.
    9) Key-field name: to query to the doccument
    10) Key field type: string(Case-senstive)
    fieldValues
    fieldSeparator
    endSeparator
    Note: pls check in SDN about file content conversions it so many blogs are available, u can easily understand.
    Regards,
    Sateesh

  • File Contente Conversion w/o keyFieldValue

    Hi folks,
    Iu2019ve the following flat file for my sender file adapter:
    HD00287u2026
    12332341999933459
    41324321453213242
    TR
    HD00288u2026
    12332341999933459u2026
    41324321453213242u2026
    15332341999933459u2026
    41325421453213242u2026
    TR
    Where HD is the header key field and TR the trailer key field; however for the body lines I donu2019t have any key field to match each body line.
    Is it anyway to convert this flat file in XML with the File Content Conversion of file adapter? Iu2019ve been searching and I think the standard parameters donu2019t fulfill this requirement, I must have a key field, but maybe Iu2019m wrongu2026 maybe you know some workaround.
    My second approach would be an ejb module to include u201CBDu201D key on each line without HD or TR. Afterwards, the standard module converts the flat file in a XML with the configuration of the file content conversion.
    Let me know if it is possible to do it with file content conversion. No problem with ejb, but I donu2019t want to create an enhancement if the standard fulfill the requirement.
    Thanks in advance,
    Ricardo.

    Hi
      I think the blog 1825, can be used to try out something in ur scenario..
    you have Header and Trailer.. so thats standard..
    for rest of the lines, you can create a structure like hbatch in the blog
    like below (define this 10 times)
    --<htbatch0>         (Zero to unbounded)
    <key0>
    <Value0>
    --<htbatch1>   (Zero to unbounded)
    <key1>
    <Value1>
    for all 10 digits (say 0,1,2...9) specifying the first digit to be the Key (as like blog)
    by doing this, the first digit is considered as Key and all similar lines are grouped
    Not sure, how the FCC behaves, but I expect..
    that all the data will be converted into the above structure, but sorted based on starting digit
    all lines starting with 0 in first set of groups <hbatch0>
    all lines starting with 1 in next set of groups and so on..
    If this works, the next thing is that your sequence of your data would be re-arranged (sorted)
    Regards
    Vishnu

  • File Content Conversion - Error in keyfield Value

    Hello experts,
    I am doing file content conversion for a file to file scenario. The input file is a csv file which is converted to xml using the file content conversion. The key field of input file is used for implementing conversion.
    While testing the FCC, I noticed that if the keyfield value is wrong for a record in the file, the record is ignored altogether without throwing any errors or warnings. Is there any way to notify if any records have been ignored as a result of incorrect keyfield value??
    Thanks in advance!
    RR

    There seems to be NO way to handle it in FCC.
    File Content Conversion - Key Field Value
    u can think of work arounds by handling it in mapping....
    -santosh.

  • File content conversion only 100 characters read from source..

    Hi,
    In my case I have a sender channel with file content conversion set as follows;
    Recordset structure : Record, 1
    sequence: ascending
    Key field type : String (case sensitive)
    record.fieldseparator : 'nl'
    record.fieldnames : Data
    ignorerecordsetname: true
    Idea is in ECC, when a custom program is run, it reads the shipment data and builds an xml file with data in various nodes like;
    <shipmentId>6767667</shipmentId>
    <DelvText>hjysks sag fhdososlhfiof </DelvText>
    Now all this data is converted to a single string entry under tag called <Data> and passed on to the third party system by PI using above conversion.
    And the resulting file will have all the data like this;
    - <Record>
      <Data><?xml version="1.0" encoding="UTF-8"?></Data>
      </Record>
    - <Record>
      <Data><ShipmentId>6767667</ShiomentId>.........</Data>
    It so happens that the data that is populated in the <DelvText> by the program is lost during conversion. I get only first 100 characters in the resulting above mentioned XML after the file content conversion happens. rest of the string is lost. I can see all other data perfect except for this long text.
    This is the data I enter in the delivery's header text  under shipment instruction field. I debugged the program and see that the entire text is indeed filled but gets lost after the file conversion happens !!
    What can be the reason ?
    thnks

    Stefan, I appreciate your concern, thanks. But this is an already working interface and I cannot change it and can only assist with minor data mapping changes and troubleshooting such issues.
    Scenario is simple, ECC has to send shipment data to third party via PI.
    The shipment data has to be sent as an XML file with a single <Data> tag as I showed to you earlier.
    It is so weird that when I type my delivery text less than 100 characters I can see that in full text in my XML file but only when the text is more than 100 characters, the XML has only 100 characters and it is passed to the third party like that and so third party is consdering this as incomplete info.
    Would help if you can think and let me kjow what may create this kind of an  issue or if you can point me where to look for issues.
    thnks

  • XML to flat file conversion using file content conversion in reciever CC

    Hi,
    Iam working on Idoc to File scenario.
    Iam having a problem in the communication channel of reciever.
    Iam using File content conversion in Reciever Adapter.
    My xml format is asfollows:--
    - <Header>
      <FILLER1>KTP</FILLER1>
      <YEAR_IDOC>YEAR 2006</YEAR_IDOC>
      <FILLER2>FIRSTWEEKNUMBER</FILLER2>
      <WEEK_IDOC>51</WEEK_IDOC>
      <FILLER3>NUMBER WEEKS 26</FILLER3>
      <PLANT_CODE>FACTORYM019</PLANT_CODE>
      </Header>
    - <Record>
      <First_material>731000</First_material>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0001.9</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0020.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <First_quantity>0018.0</First_quantity>
      <First_quantity>0000.0</First_quantity>
      <Second_material />
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0011.0</Second_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0049.0</Second_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Seond_quantity>000000</Seond_quantity>
      <Second_quantity>0067.0</Second_quantity>
      <Third_material />
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>0008.0</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      <Third_quantity>000000</Third_quantity>
      </Record>
    The file format should be as follows:--
    KTP   YEAR 2006 FIRSTWEEKNUMBER 51   NUMBER WEEKS 26  FACTORYM019
    731000  0000.0 0001.9 0000.0 0000.0 0020.0 0000.0 0000.0 0000.0 0018.0 0000.0
            0000.0 0011.0 0000.0 0000.0 0000.0 0000.0 0049.0 0000.0 0000.0 0067.0
            0000.0 0000.0 0000.0 0008.0 0000.0 0000.0  
    Could some one help me in resolving this issue.
    Regards
    Praveen

    Hi Praven,
    couldn't you simply modify your target DATA type so it will be easier to handle?
    For example something like:
    <Header>
    </Header>
    <Record>
    <Material>
    <Number>..</Number>
    <quantity>..</quantity>
    <quantity>..</quantity>
    </Material>
    In this way file content conversion will be easier (easy)!
    Regards,
    Sergio

  • File Content Conversion Generate Incomplete XML

    Dear Expert,
    I am doing the File Content Conversion ...
    Process in sender file adapter is working fine. However, when I check in the receiver folder, the XML file is incomplete after 4 records ...
    The Flat File structure :
    20100120;SAPQL0;0000000013380325
    20100120;SAPQL0;0000000013380332
    20100120;SAPQL0;0000000013380333
    20100120;SAPQL0;0000000013380334
    20100120;SAPQL0;0000000013380337
    20100120;SAPQL0;0000000013380338
    20100120;SAPQL0;0000000013380402
    20100120;SAPQL0;0000000013391225
    20100120;SAPQL0;0000000013394988
    20100120;SAPQL0;0000000013416842
    20100120;SAPQL0;0000000013420424
    20100120;SAPQL0;0000000013420616
    20100120;SAPQL0;0000000013420621
    20100120;SAPQL0;0000000013420624
    20100120;SAPQL0;0000000013420627
    The XML result was truncated(incomplete) :
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_EDIFILE_LOG xmlns:ns0="http://zasp.edi.siemens.com/zedi/contentconversion">
    <Record>
      <EDIFILE>
        <credate>20100120</credate>
        <port>SAPQL0</port>
        <idocnumber>0000000013380325</idocnumber>
      </EDIFILE>
      <EDIFILE>
        <credate>20100120</credate>
        <port>SAPQL0</port>
        <idocnumber>0000000013380332</idocnumber>
       </EDIFILE>
       <EDIFILE>
        <credate>20100120</credate>
        <port>SAPQL0</port>
        <idocnumber>0000000013380333</idocnumber>
       </EDIFILE>
       <EDIFILE>
        <credate>20100120</credate>
        <port>SAPQL0</port>
        <idocnumber>0000000013380334</idocnumber>
       </EDIFI
    Please kindly suggest, which area should I check and correct...
    Thank you very much expert.
    Best Regards,
    Y

    Dear All,
    I believe that the file adapter has finished writing the file. Not sure, How to check whether the adapter is still working or not since from the SXMB_MONI, I see the mssage processing has been completed.
    Further information
    The data type structure :
    1. DT_EDIFILE_LOG     
    1.1         Record --> occurence 1               
    1.1.1      EDIFILE --> occurence 1..unbounded
    1.1.1.1   credate --> occurence 1
    1.1.1.2   port  --> occurence 1
    1.1.1.3   idocnumber --> occurence 1
    In content conversion parameters :
    Recordset Name : Record
    Recordset Structure : EDIFILE,*
    Thank you very much for your suggestion.
    Best Regards,
    Y
    Edited by: Yonisiwa on Jan 22, 2010 3:34 PM

  • Urgent, Help on conversion: xml to flat file

    Dear experts,
    Here is the scenario, XML FILE ->XI-> JMS
    In JMS recevier side, we use localejbs/AF_Modules/MessageTransformBean to convert xml to flat file.
    Transform.Class: com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType: text/plain;charset=utf-8
    xml.conversionType: SimpleXML2Plain
    xml.fieldFixedLengths: 5,20,5,8
    When input source xml file contents are non-unicode, it works fine.
    But when the contents contain unicode characters such as Chinese word,  it works but with wrong length in the output flat file. It seems xi treat one Chinese word length is 1. Actually, one chinese word should take 2 bytes.
    My question is how to make XI handle unicode characters  with correct lengths while conversing to flat file.
    Thanks in advance.

    Jai Shankar
    Thanks for your response.
    I am already using the standard adapter modules provided by SAP:
    localejbs/AF_Modules/MessageTransformBean
    Transform.Class: com.sap.aii.messaging.adapter.Conversion
    My input file's encoding is UTF-8
    "You need to change the encoding scheme according to your input file" , do you mean change the output file's encoding or else?
    I can't find the article you mentioned: "Encoding schemes in XI", Would you please give me the link?
    Thanks a lot.

  • IDOC to flat File----Problem in File Content Conversion at receiver

    hi experts,
    I am doing a IDOC to flat file secnario.
    My requirment is IDOCXI-Flat file
    Format of flat file is like:--
    Every segment in the IDOC will be converted into a single line of file(without any delimiter). So number of lines in flat file will be equal to number of segments in IDOC.
    I am facing problem in File Content conversion. 
    Please help me out..
    Thanks
    Jaideep

    Check this doc...
    [How To...Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a]

  • Problem in file content conversion, file 2 xml scenario

    Hi,
    Could some one help me in finding out the error in my file to xml scenario, please do consider the following things what I did for this scenario.
    1.My sender file structure is flat file with , seperated 4 fields. On receiver end expecting xml file.
    2.Did file content conversion at sender file adapter and given parameters as follows.
         Document name             : MT_FileInput
         DocumentnameSpace     : http://file/praveenworkshop
         Recordset Name             : DT_Record
         Recordset Structure        : DT_Row,*
         KeyfieldType                   : String( default)
        DT_Row.fieldnames          : FirstName,LastName,City,PostCode
        DT_Row.fieldSeparator      : ,
        DT_Row.processConfiguration: FromConfiguration
        Dt_Row.endSeparator       : 'nl'
    3. I did check in Adapter Monitor that Both Sender and receiver adapter are showing green and It was showing  'Adapter is up and running: But no messages processed'
    4. I did check the SXMB_MONI which was showing " Scheduled for Outbound processing"
    5. In SXMB_MONI outbound processing payload was picking up the file and also inbound processing showing the same.
    6. my source folder and destination folder are very simple c:/praveenfiles/input and c:/praveenfiles/output
        files are source file praveen.txt and destination file praveenOP.xml
    Please help me in finding out the error to see the output file in my output folder.

    Hi Praveen,
    Hope these bloga are useful to you..
    File content conversion sites
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
    Thanks,
    Satya

Maybe you are looking for

  • How can I buy an unlock iPhone4S in USA during my trip?

    I an not sure whether this post should be in this community or not. I will have a trip to USA next week. It's cheaper and more convenient to buy an iPhone in America and I wanna get one during my trip. My friend said it is not 100% sure that you can

  • Quicktime and itunes will not open - buffer overrun in quicktime

    I cannot open Itunes. It says it needs quicktime. quicktime will not open. says buffer overrun. reinstalled both itunes and quicktime. both used to run prior to updates. Help.

  • Problem with NFL Network Surround Audio

    Hi, Except for the first game of the season, NFL Network is not being sent to my Motorola HD QUIP 71001 in Dolly Surround sound. It is connected to my Kenwood receiver via optical cable. All the other channels on FiOS behave correctly, but it seems l

  • How to use a excel sheet as a database.

    Using JSP i have to use a Excel sheet as a database.ie, i have to store and fetch data into or from a Excel Sheet and execute SQL Queries. Is it possible? If possible please give a sample code for that if anybody have the sample code.

  • Cast in oops

    what is cast? what is narrowing cast?what is widening  cast?what is ME? plz explai me with good examples.