File adapter:  Receiver File Content Conversion problem.. XML to CSV..!!

Hi,
I am facing some problem in FCC for Receiver adapter. It has to convert from XML to CSV File.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:PaymentFull_Target xmlns:ns0="http://sdn.com/Payment">
- <RECORDSET>
- <Header>
  <LineItem>1</LineItem>
  <SaleNumber>102</SaleNumber>
  <TransNumber>105</TransNumber>
  <Store>1326</Store>
  <variant>Z6</variant>
  <TransType>NEW</TransType>
  <Adjustm_Type />
</Header>
- <Header>
  <LineItem>2</LineItem>
  <SaleNumber>102</SaleNumber>
  <TransNumber>105</TransNumber>
  <Store>1326</Store>
  <variant>Z6</variant>
  <TransType>NEW</TransType>
  <Adjustm_Type />
</Header>
- <Header>
  <LineItem>3</LineItem>
  <SaleNumber>102</SaleNumber>
  <TransNumber>105</TransNumber>
  <Store>1326</Store>
  <variant>Z6</variant>
  <TransType>NEW</TransType>
  <Adjustm_Type />
</Header>
</RECORDSET>
</ns0:PaymentFull_Target>
Output File is coming only with lineitem values , remaining fields are not coming.
*1,2,3*
FCC Used...
RecordSet Structure -- Header
Header.fieldNames -
LineItem,SaleNumber,TransNumber,Store,variant,TransType,Adjustm_Type
Header.fieldSeparator-----   ,
Header.endSeparator-----    'nl'
Did I miss anything.. any idea whats going wrong?
Thanks
Deepthi

Hi Deepthi,
Mention the occurrence of header in Recordset
You specify like this:
Recordset: Header, *
Header.fieldSeparator : u2018Field Separatoru2019
-->For FCC on Receiver side you donu2019t have to mention the field names.
-->The u2018endSeparatoru2019 parameter needs to given for substructure only
Check this links:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Rgds,
Akhila

Similar Messages

  • Problem with reciver file adapter in the content conversion.

    I have starnge situation where the fileds in the file created after the content conversion are center aligned.
    Can someone let me know how to make it right aligned?
    For eg, i have a field with Char(6) in the file it looks as follows:
    1.23 ->    | 1.23 |
    10.23 ->  |10.23 |
    100.23-> |100.23|
    I want it to be like this :
    1.23 ->    |  1.23|
    10.23 ->  | 10.23|
    100.23-> |100.23|
    Please let me know ASAP as its a critical issue for the customer.
    Warm Regards,
    Nilesh Kumar

    Hi Nilesh,
    if You are using file content conversion on Sender Adapter, then do you java mapping between your two interfaces(sender and receiver)
    use java.text methods for formatting the values according to your requirement.
    first check the java API 1.4.2....
    with in that check java.text.* methods
    Also there will be lot of examples availble on internet on this. Check online.
    Also check this link this will definitely solve issue
    [http://www.iro.umontreal.ca/~vaucher/Java/tutorials/Formatting.html]
    Sample code on this link
       double x = 1.0 / 7;
       for (int n = 1; n<5; n++)
          System.out.println( "1/7 : "  + format( x, n, -6)
                                        + format( x, n, 10));
    Thanks
    Gujjeti
    Edited by: Praveen Gujjeti on Apr 16, 2008 6:16 AM

  • Problem in file content conversion from XML to CSV

    Hi Experts,
    I am finding problem in file content conversion. I need to convert the following XML file into CSV file:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_CROSS_REF xmlns:ns0="urn:dabur:idoc2file:pos">
          <Update_type>2</Update_type>
          <PLU>00000000</PLU>
          <Cross_ref_PLU>7777777</Cross_ref_PLU>
          <Capture_PLU />
          <Package_size />
          <Package_desc />
      </ns0:MT_CROSS_REF>
    The output file data has to be like:
    2,00000000,7777777,,,,
    The problem I am facing is while specifying the content conversion parameters in communication channel i dont know what recordset structure i should mention as all the records are directly under root. If I mention recordset structure as "ns0:MT_CROSS_REF" and parameters as
    ns0:MT_CROSS_REF.fieldSeparator   ,
    ns0:MT_CROSS_REF.endSeparator    'nl'
    i get error in communication channel monitoring and no file is posted.
    Please help me as to what correct parameter i should mention in my case.
    Thanks,
    Regards,
    Yash

    Hi Chirag,
    I cannot change the xml file as it comes after mapping idoc to a message type. How can I add ROOT in the xml? My message type is like MT_CROSS_REF and it has those 6 fields as in the XML (Update_type, PLU etc.). I do the mapping of these fields from a IDOC and get the XML.
    I hope you got my point.
    Thanks,
    Yash

  • Receiver File Adapter Content Conversion Problem.

    Hi All,
    I am getting in receiver file adapter due to content conversion setting. Problem is that all the fields coming in file adapter are optional. In content conversion , i have specified fieldfixedlengths. So whenever any optional field is not present , it fails . How should we handle it? is there any option to declare fields as optional, I know that is the there for sender adapter. But no. of fields is also very large, so putting each and every field as optional is very time consuming.
    What should i do?
    Ranjeet Singh.

    Hi Daniele,
    Instead of using the standard funciton , i created a UDF for handling this situation.
    My logic is UDF is like
       //write your code here
    int Size = Integer.parseInt(Truncate_Size);
    String Return_Value = "";
         if  (!("".equals(Input)) )
              if  (Input.length() > Size )
                   Return_Value = Input.substring(0,Size);
              else
                   Return_Value = Input.substring(0, Input.length());
         else
              for(int i = 0; i< Size ; i++)
              Return_Value = Return_Value + " " ;
    return Return_Value;
    SO in this case also , it should be able to handle empy source element. But it is not working.

  • File-Sender: Probl. with Content conversion - Read whole line in singleTag

    Hello,
    I have a flat file that i read with the sender file adapter.
    After content conversion I get not the result i wished to have...
    The source flat file looks for example like this:
    ABC;DEF;GHIJ
    KLM;NOP;Q
    RSTU;VW
    After the Content Conversion I would like to have this result:
    <Recordset>
         <Data>
              <Row>ABC;DEF;GHIJ
               <Row>KLM;NOP;Q
              <Row>RSTU;VW
              <……>
    What sounds very similar but didn’t work for me yesterday….
    I defined a data type that looked like this:
    DT_TEST (Complex Type)
         Recordset (0..unbounded)
              Data (1)
                   Row (type string / 0..unbounded)
    During the file content conversion I just did this:
    Recordsetname: Recordset
    Recordset structure: Data, 1
    Data.fieldNames = Row
    Data.fieldSeparator = ‘nl’
    This was also described in blog:
    /people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
    But my result is always like this:
    <Recordset>
         <Data>
              <Row>ABC;DEF;GHIJ
         </Data>
    </Recordset>
    <Recordset>
         <Data>
              <Row> KLM;NOP;Q
         </Data>
    </Recordset>
    <Recordset>
         <Data>
              <Row> RSTU;VW
         </Data>
    </Recordset>
    ….And not like I wished….
    Can anybody help me…?
    Greetings
    Tobias

    Hi,
    I just gone thru the blog and as per the structure defined I have no idea how this works this way.
    But if you modify the structure to
    RecordSet - occurs 0-1
    Data - occurs 0-n
    Row - occurs 0-1
    And in the Content conversion mentions Data,* instead of Data,1.
    In this case you will be getting a output like
    <Data>
      <Row>ddf,sdfsd,sdf</Row>
    </Data>
    <Data>
      <Row>fff,sdfsd,sdf</Row>
    </Data>
    You can achieve this but I don't have any idea how to generate that kind of output with the Structure and the conversion parameter mentioned in the blog.
    Thanks,
    Prakash

  • Error in Receiver File adapter using File content Conversion

    Hi,
    I am getting the following error in the receiver file adapter.
    Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
    I am using the below parameters for FCC:
    Recordset Structure - statement
    statement.endSeparator - 'nl'
    statement.fieldSeparator - '0X09'
    statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
    ignoreRecordsetName - true
    Please let me know where i am going wrong.
    Thanks,
    Aparna

    Hi Aparna,
    I feel the problem in your content conversion parameters is with
    statement.fieldNames and ignoreRecordsetName
    When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
    [http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
    Hope this helps !!
    Regards,
    Amit

  • File Adapter - File Content Conversion to XML last element missing

    I'm using the SAP File Adapter with File Content Conversion to convert | (pipe) delimited records into XML.
    When the last field is blank, I would expect that an empty node gets created, however, the node doesn't get created at all.
    For example given these settings...
    Record.fieldSeparator = |
    Record.endSeparator = 'nl'
    Record.fieldNames = FIELD1,FIELD2,FIELD3
    Using this three record file as my data...
    |123|XYZ
    ABC||XYZ
    ABC|123|
    When converted to XML, this is what the recordset XML structure looks like...
    <Recordset>
    <Record>
    <FIELD1 />
    <FIELD2>123</FIELD2>
    <FIELD3>XYZ</FIELD3>
    </Record>
    <Record>
    <FIELD1>ABC</FIELD1>
    <FIELD2 />
    <FIELD3>XYZ</FIELD3>
    </Record>
    <Record>
    <FIELD1>ABC</FIELD1>
    <FIELD2>123</FIELD2>
    </Record>
    </Recordset>
    Notice that the last record is missing the "FIELD3" element.
    Edited by: William Krick on Jun 17, 2011 4:49 PM

    Giuseppe Agnello wrote:
    > Sorry, there was a typo in the parameter name.
    > Word fields should start with capital F.
    > Try with Record.missingLastFields, with value "add"
    >
    > http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    >
    > Similar issue was resolved with same parameter in this thread:
    > Sender file adapter with FCC not creating last field
    That did the trick.  It was a typo.  Thanks Giuseppe.
    I'm willing to bet that this parameter was added to fix the parsing bug without breaking existing users that had already worked around the original bug.   You shouldn't really have to special case the last field.

  • Reciever File Content conversion problem

    Hi,
    i am converting idoc into txt file
    in sxmb_moni,the payload of target xml is,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:HRPayroll_014_MT xmlns:ns0="http://XXXX.com/xi/:XXX">
    <Infotype014>
         <infotype>001400</infotype>
         <zfty>400</zfty>
         <zicnum>111111</zicnum>
         <begda>20070428</begda>
         <lgart>4000</lgart>
         <betrg>0.00</betrg>
         <anzhl>99.00</anzhl>
    </Infotype014>
    </ns0:HRPayroll_014_MT>
    in File adapter i did like this-
    Infotype014.fileldNames       infotype,zfty,zicnum,begda,lgart,betrg,anzhl
    Infotype014.fieldFixedlenghts       6,3,7,8,4,13,12
    Infotype014.processConfiguration       FromConfiguration
    Infotype014.endSeparator       'nl'
    and in RunTime Workbench
    i am getting like this
    <b>Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
    Parameter 'Infotye014.fieldFixedLengths' or 'Infotye014.fieldSeparator' is missing</b>.
    Channel has not been correctly initialized and cannot process messages
    please guide me ..how to declare in field Content conversion Prameters.
    i dont require column names.fields are fixed lenghts.
    regards
    Jagan

    Hi amitanshu,
    Thanks for your response..
    i given only  fieldFixedLenghts
    the auditlog is
    Time Stamp Status Description
    2007-05-10 15:15:58 Success Message successfully received by messaging system. Profile: XI URL: http://saps020:50100/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    2007-05-10 15:15:58 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    2007-05-10 15:15:58 Success Message successfully put into the queue.
    2007-05-10 15:15:58 Success The message was successfully retrieved from the receive queue.
    2007-05-10 15:15:58 Success The message status set to DLNG.
    2007-05-10 15:15:58 Success Delivering to channel: FILE_HRP_RECEIVER_HR_PAYROLL014_CC
    2007-05-10 15:15:58 Success MP: entering
    2007-05-10 15:15:58 Success MP: processing local module localejbs/CallSapAdapter
    2007-05-10 15:15:58 Success File adapter receiver: processing started; QoS required: ExactlyOnce
    2007-05-10 15:15:58 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
    Time Stamp Status Description
    2007-05-10 15:15:58 Error Exception caught by adapter framework: Channel has not been correctly initialized and cannot process messages
    2007-05-10 15:15:58 Error File adapter receiver channel FILE_HRP_RECEIVER_HR_PAYROLL014_CC is not initialized. Unable to proceed: null
    2007-05-10 15:15:58 Success Acknowledgement sent successfully for type: SystemErrorAck
    2007-05-10 15:15:58 Success Acknowledgement creation triggered for type: SystemErrorAck
    2007-05-10 15:15:58 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages.
    2007-05-10 15:15:58 Success The asynchronous message was successfully scheduled to be delivered at Thu May 10 15:20:58 EEST 2007.
    2007-05-10 15:15:58 Success The message status set to WAIT.
    my adaper is in Active status only
    please guide me
    regards
    Jagan

  • How to debug file content conversion problems?

    Hi,
    I'm trying to debug a file content conversion problem.  I'm mapping a few nodes in an IDOC to a file of fixed length fields.  I'm using the "<Node A>.fieldFixedLengths", "<Node B>.fieldFixedLengths", "<Node C>.fieldFixedLengths", etc. parameters to specify the fixed length records.
    However, a certain node (for e.g. Node B) is causing a problem and if it is present in the IDOC, the output file does not get created.  Upon checking the XI monitor, I notice that the file gets mapped correctly and thus the problem lies when the file adapter does the file content conversion.  How do I debug this because there is no descriptive error in the XI log?  If this node is not present, the file gets generated fine.
    Thanks,
    Basant Gupta

    Hi,
    If your SXMB_MONI shows, success status, then go to RWB->Message Monitoring->Message display tool and then check Audit log for the analysis,
    So it wil help you debug the situation.
    If there is no error, then check RWB->Component Monitoring->Adapter Monitoring for you file communciation channel..
    /people/michal.krawczyk2/blog/2005/01/02/simple-adapter-and-message-monitoring
    Regards,
    Moorthy

  • Problem in file adapter @ receiver end

    Hi ,
    I am using file adapter @ receiver end using content conversion.
    Using field separator as 'nl'.
    When i open file in Hex mode it's showing the field separator as 2 Cariage returns(CR) & 1 line feed(LF).
    But the requirement is only 1 CR n 1 LF .
    Appriciate ur help..
    Regards,
    Kishore

    Hi
    I tried giving like this,
    Datarow.fieldFixedLengths : 15,15,15,15,10,10,10,10
    Datarow.endSeparator      : '0x0A' or '0x0D'
    but da result is same...2 CR n 1 LF..
    even if i dont give endseparator then also same thing is happening..
    Regards
    Kishore

  • File Adapter receiver channel : change encoding attribut in xml file

    Hi,
    How can I change the XML encoding attribut
    from:
    <?xml version="1.0" encoding="UFT-8"?>
    to:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    in my File Adapter, receiver channel ?

    Hi,
    plz chk the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    &#9679;      Select the File Type of the document:
    &#9675;       Binary
    &#9675;       Text
    Under File Encoding, specify a code page.
    The default setting is to use the system code page that is specific to the configuration of the installed operating system.
    The content of the message is converted to the corresponding code page before the message is saved as a file.
    Permitted values for the code page are the existing Charsets of the Java runtime. According to the SUN specification for the Java runtime, at least the following standard character sets must be supported:
    Regards

  • A problem with the File adapter receiver

    Hi people,
    In the Integration Monitoring the system represent this problem:
    File adapter receiver channel Mainframe_FA_StructureAch_CC_RC is not initialized. Unable to proceed: null
    Any body can help me!!
    Thanks!!

    Hi ,
    Just check is it Activated ? Go to RWB->Adapter Monitoring
    Check the status there ..
    To more- Go to service market place to view the Adapter Monitoring PDF
    https://websmp103.sap-ag.de/~sapdownload/011000358700002757652005E/HowtoMintorAF.pdf
    Hope this helps.
    Regards,
    Moorthy

  • How to use File Adapter Receiver to write attachments

    Hi,
    i have a scenario, in which our own XInotes adapter sends an XIMessage from an IBM Lotus Notes database into XI. This XIMessage contains an XML document as application main document and several PDF files as additional attachments 
    On the receiver side, i must use a File Adapter to write both the XML documents and the PDF attachments into a directory.
    The problem is i don't know how to use the file adapter receiver to write the attachments. In the Channel Monitoring, i can see that all PDF files are transferred to the file receiver. But the file adapter writes only the XML document into the directory.
    I've also tried the AF_Modules/PayloadSwapBean, but it can only swap one PDF file into the application payload. And the file name must be hard coded in the module configuration as swap.KeyName.
    Could anyone give me any ideas?
    thanks a lot in advance
    Xiang

    hi,
    receiver file adapters do not supprt attachments.
    Only File Sender adapter is capable of handling attachments not the receiver.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
    Configuring the sender FILE adapter
    The sender file adapter is configured to pick the normal payload (file1.xml), which is specified in the File
    access parameters, and the additional image file (file1.jpg) that is to be sent as an attachment is configured
    under the Additional File(s) as shown in the screenshot below. The file type would still remain binary.
    Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the
    MessageTransformBean and the PayloadSwapBean to help us is transforming the content to jpeg format
    and also change the file extension.
    The PayloadSwapBean module is used to replace the application payload of the XI message that holds the
    data with another payload which is appended to the message as an attachment. In our case, the payload
    would be file1.xml whereas the attachment would be file1.jpg
    The swap module is denoted in our scenario with the module key ‘swap’. It has two parameters from the
    MIME header.
    regards,
    pradeep.

  • File adapter receiver channel is not initialized.

    Hi
    iam wrking idoc-file scenario, as per the requirement i have created 4datatypes  4 mapping in IR with 4 communaction chanles in ID. the scenarios is working fine with 3 mappings.but in 4 the scenario
    the file genaraing properly , i have cheked in SXMB_moni payload but it is not creating in destination system
    in runtimeworkbench->message-monitaring-> adpater
    i have find the below issues
    1) File adapter receiver channel CC_DDPWCS_US_TO_101 is not initialized. Unable to proceed: null  Error 2) Exception caught by adapter framework: File Adapter configuration not initialized:
    3) Error Delivery of the message to the application using connection AFW failed, due to: File Adapter configuration not initialized:.
    please tell me how can i reslove the issue
    thanks
    niru

    Hi
    i have checked the content convertion and changed as below
    the structure is
    Row.fieldNamesTrans_Id,Order,Item,Product_Id,Product_desc,Lot_nr,Ship_via,Exp_qty,Carousel_loc,compart,Destination,Label
    Row.fieldSeparator     ,
    Row.fieldFixedType     char
    Row.endSeparator     'nl'
    Row.addHeaderLine     4
    Row.headerlineTrans_Id,Order,Item,Product_Id,Product_desc,Lot_nr,Ship_via,Exp_qty,Carousel_loc,compart,Destination,Label
    even though iam facing the issue. iam wondering  "_i have used in the similar structure for other 3 mappings in same scenario those are working perfect "_ but based on condition if 4 th mapping is executed iam facing the problem
    error message in RWB/Adapeters
    File adapter receiver channel CC_DDPWCS_US_TO_101 is not initialized. Unable to proceed: null
    Error Exception caught by adapter framework: File Adapter configuration not initialized:
    Error Delivery of the message to the application using connection AFW failed, due to: File Adapter configuration not initialized:.
    please help if any of you face the similar situation , i struck-up long ago here
    regards
    niru

  • File adapter @ receiver end using fieldFixedLengths

    Hi ,
    I am using file adapter @ receiver end using content conversion.
    Using field separator as 'nl'.
    When i open file in Hex mode it's showing the field separator as 2 Cariage returns(CR) & 1 line feed(LF).
    But the requirement is only 1 CR n 1 LF .                                                                                I tried giving like this,
    Datarow.fieldFixedLengths : 15,15,15,15,10,10,10,10
    Datarow.endSeparator : '0x0A' or '0x0D'
    but da result is same...2 CR n 1 LF..
    even if i dont give endseparator then also same thing is happening..
    regards,
    Kishore

    Hi Kishore,
    Try using fieldseparator directly, instead of working around with fixedFieldlength.
    cheers,
    Prashanth

Maybe you are looking for

  • Open Interface for Approved Supplier Lists and Sourcing Rules

    Hi All, Is there an open interface or an API available for Appeoved Supplier Lists and Sourcing Rules. Thanks and Regards, MPH

  • IPad Video App Subtitles Glitch

    The Video app on the iPad seems to have an issue or two with soft subtitles. First, the Video player disregards the size settings, or for some reason scales them down, so a subtitle track that's set to be 60 pixels high on a 640x480 video will clearl

  • What capacity do I have?

    Hi I want to sell my Apple TV fist generation but I can't remember ifit is a 40 gig or a 160 gig. I cant plug it in so is there any way of telling from the outside or markings what the capacity is?

  • Using tar command to copy faster

    Hi, I want to copy the apps directories and subdirectories to another location on same machine for cloning purpose. I know this can be achieved using tar command. Will you pls send me the tar command to archive and copy at the same time using pipe "|

  • Assign string into variable

    Hi All! I''ve created global and lоcal variable with type - string How can I assign the value into variable in BR? I tried [Var_1] = "qwe"; or [Var_1] = @CONCATENATE (String_1, String_2) it doesn't work Regards Sasha