Skip to Content
avatar image
Former Member

file content conversion palin to xml but in file only i got first record among 15 records

Hello All,

I am creating FCC plain to xml format. Input is a text file with tab delimited. And output file should be xml file.
My input file having 15 records but i got only first record in output file.

This is my input file with tab delimited.

This is my output payload.

i got only first record from 15 records.i put Recordset per message in sender channel is" * ".

Please Help Me.

Regards,

s.k.prabhakar.


qnti3.png (6.7 kB)
cmees.png (7.4 kB)
mfosw.png (7.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hello All,

    I got above fcc file to xml error. my input file having 15 records but in output file only i got one record.Any changes is required in sender communication channel.

    Please i need help.

    Thanks,

    s.k.prabhakar.

  • Get RSS Feed

10 Answers

  • Nov 11, 2016 at 06:15 AM

    Hi Prabhakar!

    Did you set "Recordset structure" parameter as "emp_det,*"?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 11, 2016 at 06:49 AM

    Hi Prabhakar!

    So that's why you get only one row in your xml. You should set it to * to get all rows from your file.

    I guess that you use nested structure with repeating parent node, something like this:

    <emp>
    <emp_det>
    </emp_det>
    </emp>
    ...
    <emp>
    ...
    </emp>

    Right?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Evgeniy Kolmakov

      Hi Evgeniy,

      This my .xml view in test tab in message mapping

      <?xml version="1.0" encoding="UTF-8"?>
      http://sap.com/xi/XI/SplitAndMerge">
      <ns0:Message1>
      <ns1:e10738_payload_msg_input xmlns:ns1="http://e10738_payload_msg_spilt_task">
      <emp_det>
      <emp_id/>
      <department/>
      <designation/>
      <salary/>
      <experiance/>
      </emp_det>
      </ns1:e10738_payload_msg_input>
      </ns0:Message1>
      </ns0:Messages>

      But in incoming payload i did not get " Messages and Message1" Nodes.

      i got incoming payload like this

      <?xml version="1.0" encoding="utf-8"?>
      <ns:e10738_payload_msg_input xmlns:ns="http://e10738_payload_msg_spilt_task">
      <emp_det>
      <emp_id>101</emp_id>
      <department>PI</department>
      <designation>Developer</designation>
      <salary>100</salary>
      <experiance>4</experiance>
      </emp_det>

      I am not getting messages node and messages1 nodes.

      Thanks and Best Regards,

      s.k.prabhakar.

  • avatar image
    Former Member
    Nov 11, 2016 at 06:41 AM

    Hai Evgeniy,

    Thanks for your Reply,

    i set "Recordset structure" parameter as "emp_det,1. because my target structure is 1:1.

    This is my sender channel fcc configuration,

    Thanks and Regards,

    s.k.prabhakar.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 13, 2016 at 08:34 AM

    Hello Prabhkar,

    Instead of making the source structure occurence 0-unbounded you should change the emp_det as 0-unbounded.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raghuraman S

      Hello Raguramn,

      This is my source and Traget structures in mapping level.

      This error i got at message mapping level.

      MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_e10738_op_payload_mapping_; Details: com.sap.aii.mappingtool.tf7. IllegalInstanceException; Cannot create target element /ns0:e10738_payload_msg_onutput/emp_det/department. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one.

      I am using ICO in ID configuration.

      Thanks,

      s.k.prabhakar.

      hvzdt.png (16.0 kB)
  • Nov 14, 2016 at 06:11 AM

    Hello Prabhakar,

    This seems to be missing value for department field.

    Can you get the XML formed after FCC in the channel and check in mapping.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hello Raghuraman,

      I got xml format in monitoring level and message mapping level.

      <?xml version="1.0" encoding="utf-8"?>
      <ns:e10738_payload_msg_input xmlns:ns="http://e10738_payload_msg_spilt_task">
      <emp_det>
      <emp_id>1 ABAP DEV 20 4</emp_id>
      </emp_det>
      <emp_det>
      <emp_id>2 PI DEV 40 6</emp_id>
      </emp_det>
      </ns:e10738_payload_msg_input>.

      Thanks,

      s.k.prabhakar.

  • Nov 14, 2016 at 06:29 AM

    Hello Prabhakar,

    Except emp_Id no other fields are generated,tats why this error.

    check on the below points.

    1.File has the correct contents.

    2.If space is the field separator use 0x20 or '0x20' for field separator in the FCC.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Prabhakar,

      You cant test the file directly like this,Since its not XML.

      Check your FCC field separator and assign tab value,it should be '0x09'.

      The problem now is all the values are populated in a single emp_id field.

  • Nov 14, 2016 at 06:45 AM

    Hello Prabhakar,

    But as per the FCC screenshot,the field separator is empty.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raghuraman S

      Hello Raghuraman,

      Now its came all fields data.

      <?xml version="1.0" encoding="utf-8"?>
      <ns:e10738_payload_msg_input xmlns:ns="http://e10738_payload_msg_spilt_task">
      <emp_det>
      <emp_id>101</emp_id>
      <department>PI</department>
      <designation>Developer</designation>
      <salary>100</salary>
      <experiance>4</experiance>
      </emp_det>

      But the error is same.

      Cannot create target element /ns0:Messages. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one

      This is my .xml view in message mapping.But in incomng payload messages and message1 nodes not coming only from message Type it coming. so check it once na my .xml and incoming payload structures.

      Thanks,

      s.k.prabhakar.

      jmk1o.png (9.8 kB)
  • Nov 14, 2016 at 09:31 AM

    Hello Prabhakar,

    Since your Emp data is getting created multiple times i.e 0-n no need to change the occurrence in the mapping,change to 0-1 occurrence in the signature tab of mapping,so that the messages node will be removed.it will work.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Raghuraman,

      sorry it working data into all fields.if gave 0.1 in signature tab, sorry for previous comment.

      But error is same. cannot create target element values missing in queue context.

      Thanks,

      s.k.prabhakar.

  • Nov 14, 2016 at 09:21 AM

    Hi Prabhakar!

    Try to set '\t' as field separator.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raghuraman S

      hello Raghuraman,

      Thank you very much to spend your valuble time now its working fine.

      But how can i spilt payload based on department tell me.

      Thanks and Best Regards,

      s.k.prabhakar.

  • avatar image
    Former Member
    Nov 14, 2016 at 11:13 AM

    Hurry..........its working fine

    Hello Raghuraman and Evgeniy Thank you very much,

    It working fine Thanks A lot to spend your valuble and precious time.

    But how can i map to spilt payload based on department at message mapping level.

    Thanks and Best Regards,

    s.k.prabhakar

    Add comment
    10|10000 characters needed characters exceeded