Skip to Content
0

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

Nov 10, 2016 at 03:27 PM

91

avatar image
Former Member

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)
10 |10000 characters needed characters left 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.

0
* Please Login or Register to Answer, Follow or Comment.

10 Answers

Evgeniy Kolmakov Nov 11, 2016 at 06:15 AM
0

Hi Prabhakar!

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

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

And please share your FCC configuration.

Regards, Evgeniy.

0
Evgeniy Kolmakov Nov 11, 2016 at 06:49 AM
0

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.

Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Evgeniy,

I agree with that one i chaned my file structure like this.

source message structure is 1.1. and Target message stracture is 0..unbound. But my message is in Scheduled state in message mapping level.

when i checked message log I got this error.

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.

But i used only 1.1 mapping in my message mapping level.

Thanks and Regards,

s.k.prabhakar.

hy2h3.png (5.0 kB)
0

Hi Prabhakar!

You should take your payload and check it in message mapping.

Regards,Evgeniy.

0
Former Member
Evgeniy Kolmakov

Hi Evgeniy,

I took my input payload and i test in message mapping it showing this below error. and fields all are in RED state.

How can i resolve this error. whre i need to check to resolve it.

Thanks and Regards,

s.k.prabhakar.

0ht5v.png (8.9 kB)
0

Please provide your current payload and source XML structure from message mapping.

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

Hi Evgeniy,

This is my input pay load from message monitoring.

<?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>
<emp_det>
<emp_id>102</emp_id>
<department>ABAP</department>
<designation>Developer</designation>
<salary>100</salary>
<experiance>4</experiance>
</emp_det>
<emp_det>
<emp_id>103</emp_id>
<department>PI</department>
<designation>Developer</designation>
<salary>300</salary>
<experiance>4</experiance>
</emp_det>
<emp_det>
<emp_id>104</emp_id>
<department>HR</department>
<designation>HR</designation>
<salary>400</salary>
<experiance>4</experiance>
</emp_det>
<emp_det>
<emp_id>105</emp_id>
<department>PI</department>
<designation>Developer</designation>
<salary>500</salary>
<experiance>4</experiance>
</emp_det>

This is my source structure in message mapping

Thanks and regards,

s.k.prabhakar.

xi2bd.png (7.1 kB)
0

Wouldn't you please switch to test tab in message mapping and take screenshot of message source view. I mean, xml view.

Regards,Evgeniy.

0
Show more comments
avatar image
Former Member Nov 11, 2016 at 06:41 AM
0

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.


kolwn.png (7.9 kB)
t2mat.png (3.5 kB)
Share
10 |10000 characters needed characters left characters exceeded
Raghuraman S Nov 13, 2016 at 08:34 AM
0

Hello Prabhkar,

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Raghuraman,

please help me to fix issue because i am working on it from 4 days.

I took soure emp_det is 0.unbound. But my incoming payload coming like this.all fileds data came into one emp_id field.

<?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 PI Developer 100 4</emp_id>
</emp_det>
<emp_det>
<emp_id>102 ABAP Developer 100 4</emp_id>
</emp_det>
<emp_det>
<emp_id>103 PI Developer 300 4</emp_id>
</emp_det>

please tell me how can i fix this issue soon.because i am trying to do this one more than 4 days.

please help to fix this error ASAP.

Thanks and Best Regards,

s.k.prabhakar.

0

Hello Prabhakar,

Change like below in FCC and try.

Recordset Structure emp_det,*

0
Former Member
Raghuraman S

Hello Raghuraman,

This is my FCC sender channel.

Thanks,

s.k.prabhakar.

johdr.png (8.4 kB)
rbuvt.png (2.8 kB)
0
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)
0
Raghuraman S Nov 14, 2016 at 06:11 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left 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.

0
Raghuraman S Nov 14, 2016 at 06:29 AM
0

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Raghuramn,

my file having Tab delimited so i used Tab delimited in my sender channel configuration.

This is my text input file.

Thanks,

s.k.prabhakar.

k5mhu.png (7.3 kB)
0
Former Member

Hello Raguraman,

when i test my text file in message mapping level. it showing content is not allowed in prolog.

Thanks,

s.k.prabhakar.

scypj.png (18.0 kB)
kyggz.png (4.5 kB)
0

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.

0
Raghuraman S Nov 14, 2016 at 06:45 AM
0

Hello Prabhakar,

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

Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Raghuraman,

i used for tab separator. i copy paste the tab space from note pad and paste it there.like this.

This tab space i spaste in sender channel.

Thanks,

s.k.prabhakar.

e0d5j.png (2.4 kB)
0

This is wrong,Please check my above comment

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.

0
Former Member
Raghuraman S

Hello Raghuraman,

I put 0x09 as field separator but still all data coming into emp_id field only.

<?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 PI Developer 100 4</emp_id>
</emp_det>
<emp_det>
<emp_id>102 ABAP Developer 100 4</emp_id>
</emp_det>

Regards,

s.k.prabhakar.

huptc.png (20.8 kB)
0

Hello Prabhakar,

Put with quotes

'0x09'

0
Former Member
Raghuraman S

Hello Raghuraman,

still no luck all fields date come into empi_id only.

<?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 PI Developer 100 4</emp_id>
</emp_det>.

can i delete all those objects and recreate it.

Thanks,

s.k.prabhakar.

0

yes and post the complete FCC and mapping,the new udpated one.

0
Show more comments
Raghuraman S Nov 14, 2016 at 09:31 AM
0

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.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Raghuraman,

like this only you saying Right.

here e10738_payload_msg_input is my message Type.

emp_det is sub elemnet of message type. i tested with this in this case all fields data coming into one field.only.

Thanks,

s.k.prabhakar.

ji5ph.png (7.7 kB)
0

Hello Prabhkar,

In the mapping tab go to signature tab and change the occurence to 0-1 or 1-1 the messages node will disappear.

and use '\t' or '0x09',this is required for FCC to convert Tab de-limited file to XML.

0
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.

0
Evgeniy Kolmakov Nov 14, 2016 at 09:21 AM
0

Hi Prabhakar!

Try to set '\t' as field separator.

Regards, Evgeniy.

Show 15 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Evgeniy,

why '\t'.what is the use of it.

I gave '\t' as field separator but all fields date coming into onlt one field. like this

<emp_det>
<emp_id>103 PI Developer 300 4</emp_id>
</emp_det>

Thanks,

s.k.prabhakar.

0

It's another code for tab delimeter used in java, for example.

But I guess your FC works now.

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

Hello Evgeniy,

My fcc working fine but i get error at mapping level.

.IllegalInstanceException; 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.

why this error coming i am not able to understand.

Thanks,

s.k.prabhakar.

0
Former Member

Hi Evgeniy,

My .xml view having messages and message1 nodes automatically generated by sap.

But in my incoming payload these message and messages not coming is it any difference in that one.

This is my .xml view in mapping level.

This is my incoming payload from monitoring.

<?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>

could you please help me i am not able to solve issue.

Thanks,

s.k.prabhakar.

0

Prabhakar check my comments

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.

1
Former Member
Raghuraman S

yes Raghuraman i put message type is 0.1 one.it working all fields data coming properly

But this error not resolve.

Thanks,

s.k.prabhakar.

d5ri5.png (18.6 kB)
0

Prabhkar,

Check your operation mapping occurrence also,Messages node still exists?

Can you please post mapping screenshots.

0
Former Member
Raghuraman S

Hello raghuraman,

emp_det i put as 0.unbound so that's why messages nodes coming right.only i put my message type is i put as 0.1.

This is my operation mapping.

This is my message mapping.

all fields one to one mapping only.

thanks and best Regards,

s.k.prabhakar.

lsbl4.png (21.9 kB)
yibxv.png (18.2 kB)
0

Hello Prabhkar,

Still message node exists,Why can you make the occurence to 0 -1.it will work.

0
Show more comments

Remove mapping for Messages and Message1 and check.

Regards, Evgeniy.

0
Show more comments

Check your operation mapping as well. It should have the same cardinality as set in message mapping.

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

yes Evgeniy i make my message type in operation mapping also 0.1.

My scenario is Based on Department The payload should be spilt to particular department.

Thanks,

s.k.prabhakar.

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

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello Prabhakar,

You need to do multi level mapping in your case.

Get the data in one mapping and do the transfomration in the other.

Kindly close the thread.

0
Former Member
Raghuraman S

Hello Raghuram,

sure i will close the thread,

Thanks and Regards,

s.k.prabhakar.

0

Glad that your issue got resolved. :)

0