cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with XI FCC--II

Former Member
0 Kudos

HI!

I am working on File(source.csv)->Xi->File(Target.csv) Scenario.

In my Source File i have 4 fields which are mapped to the target file which contains 2 additional fields with constant values mapped. So, I should get 6 fields at receiver end.

<b>Source structure</b>

CharacterName

Lowerlimit

Upperlimit

Targetvalue

<b>Target Structure</b>

CharacterName

Lowerlimit

Upperlimit

Targetvalue

Plant (constant value -1000)

Status (Constant value - Released)

FCC parameters at sender adapter:

Document Name : file_rece

RecordSet Name :Record

Recordset Structure : main,1

In parameters:

main.fieldNames:CharacterName,Lowerlimit,Upperlimit ,Targetvalue

main.fieldSeparator: ,

Receiving Adapter:

Recordset Structure : main

main.fieldSeparator :,

main,endSeparator : 'nl'

Now, I am getting only 4 fields of sender file in my Target file structure not the additional fields which have been mapped as constant.

---I gone through some previous posts but cant able to resolve it.

Regards

Parth

<b></b><b></b>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi! Bhavesh

I tried the mapping by copying my incoming payload in IR and got the following error:

"Cannot produce target element /ns0:bps_file_send/Characteristics. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Cannot produce target element /ns0:bps_file_send/Characteristics. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd"

Former Member
0 Kudos

Partha,

The mapping error says "It can not produce the node"Characteristics". Check the mpping for the Characteristics node. Also you have not given this node in your receiver structure... Check this...

Regards,

Jai Shankar.

Former Member
0 Kudos

Hi,

1) Did you check the mapping alone in the test tab. Is it working?

2) If the above thing works then copy the payload from moni and copy in to test tab and check for error.

You said it has not worked .Now compare both the payloads, the one from the first case and the one from second and find out the difference ?

Regards,

Sudheer.

Former Member
0 Kudos

In real, its "characterstics" in my target str. i typed that wrong as character name. My charactername of source str is mapped to characterstics of target str.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

When you copied the payload, did you remove the <b>"-"</b>.

Can you give us the source and target XML and mapping?

Regards,

Bhavesh

Former Member
0 Kudos

hi sudheer!

my mapping is working fine in first case as you mentioned.

i am getting the above said error when i copy the incoming payload of moni into IR.

Former Member
0 Kudos

Partha,

Is it a one to one mapping? Does your source or target structure contain any hierarchies? Pls post us the XML format of your source and target structures(not the XSD)....

Regards,

Jai Shankar.

Former Member
0 Kudos

Hi,

Now compare both the payloads and find out what is wrong with your second payload when compared to first. That will solve your problem.

Regards,

Sudheer.

Former Member
0 Kudos

Hi!Jai

<b>Source Xml</b>

<?xml version="1.0" encoding="UTF-8"?>

<ns0:bps_file_rece xmlns:ns0="http:
bps_file">

<CharacterName>q</CharacterName>

<Lowerlimit>w</Lowerlimit>

<Upperlimit>e</Upperlimit>

<Targetvalue>r</Targetvalue>

</ns0:bps_file_rece>

<b>Target Xml</b>

<?xml version="1.0" encoding="UTF-8"?>

<ns0:bps_file_send xmlns:ns0="http:
bps_file">

<Plant>1000</Plant>

<Characteristics>q</Characteristics>

<Validfrom>2006/11/17</Validfrom>

<Presetindicator>3000</Presetindicator>

<Indicator>X</Indicator>

<Status>Released</Status>

<Shorttext>wwe</Shorttext>

<Searchfield>we</Searchfield>

<Lowerlimit>w</Lowerlimit>

<Upperlimit>e</Upperlimit>

<Targetvalue>r</Targetvalue>

</ns0:bps_file_send>

Former Member
0 Kudos

Hi!Jai

<b>Source Xml</b>

<?xml version="1.0" encoding="UTF-8"?>

<ns0:bps_file_rece xmlns:ns0="http:
bps_file">

<CharacterName>q</CharacterName>

<Lowerlimit>w</Lowerlimit>

<Upperlimit>e</Upperlimit>

<Targetvalue>r</Targetvalue>

</ns0:bps_file_rece>

<b>Target Xml</b>

<?xml version="1.0" encoding="UTF-8"?>

<ns0:bps_file_send xmlns:ns0="http:
bps_file">

<Plant>1000</Plant>

<Characteristics>q</Characteristics>

<Validfrom>2006/11/17</Validfrom>

<Presetindicator>3000</Presetindicator>

<Indicator>X</Indicator>

<Status>Released</Status>

<Shorttext>wwe</Shorttext>

<Searchfield>we</Searchfield>

<Lowerlimit>w</Lowerlimit>

<Upperlimit>e</Upperlimit>

<Targetvalue>r</Targetvalue>

</ns0:bps_file_send>

Former Member
0 Kudos

Partha,

Just noticed one thing from your previos thread... You have created all the nodes as <b>attributes</b> in your source.... Why is it so??? If you need to convert a flat file from text to xml declare them as <b>elements</b> and not as attributes

Regards,

Jai Shankar

Former Member
0 Kudos

If you have them as attributes in source, the xml would be some thing like thiis

<?xml version="1.0" encoding="UTF-8"?>

<ns0:bsu_source CharacterName="q" TargetValue="w" LowerLimit="e" UpperLimit="r" xmlns:ns0="http:
bSU1"/>

Regards,

Jai Shankar.

Former Member
0 Kudos

Hi!Jai

Thanks for your responce. I already changed my nodes to <b>element</b> type.

But still i am facing same issue

Former Member
0 Kudos

Hi,

Can you please mention the parameter you configured in reciever adpater for file content conversion.

Thanks,

Tuhin

Former Member
0 Kudos

hi! Tuhin

These are the parameters of Receiver Adapter

Recordset Structure : record,main

record.fieldSeparator: 'nl'

main.fieldSeparator: ,

main.endSeparator: 'nl'

Former Member
0 Kudos

hi Partha,

can you just try to mention all field names in Receiver Adapter.

And they should be case sensitive.

Thanks,

Tuhin

Former Member
0 Kudos

Hi! Tuhin

I tried that tooo ... But still the same prblm persist.

Former Member
0 Kudos

HI,

Ok one more thing to check just try to crete xml instead of CSV file.

and post that xml here.

Thanks,

Tuhin

Former Member
0 Kudos

Thanks Tuhin for your replies...

If i am using FCC at receiver adapter and change the extension of file from csv to xml then its showing me error :

<b>The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

-


Invalid at the top level of the document. Error processing resource 'file://nwxi/NW/File/target/TargetFile20061117-122800-7...

Diameter,5.98,6.05,6

^</b>

But if i use File protocol instead of using FCC at receiver side then i am getting following xml code in my CSV file:

<b><?xml version="1.0" encoding="utf-8"?>

<ns:bps_file_rece xmlns:ns="http:
bps_file">

<record>

" <main>"

" <CharacterName>Diameter</CharacterName>"

" <Lowerlimit>5.98</Lowerlimit>"

" <Upperlimit>6.05</Upperlimit>"

" <Targetvalue>6</Targetvalue>"

" </main>"

</record>

<record>

" <main>"

" <CharacterName>Flatness</CharacterName>"

" <Lowerlimit>0.032</Lowerlimit>"

" <Upperlimit>0.038</Upperlimit>"

" <Targetvalue>0.03</Targetvalue>"

" </main>"

</record>

<record>

" <main>"

" <CharacterName>Procity</CharacterName>"

" <Lowerlimit>4.02</Lowerlimit>"

" <Upperlimit>4.08</Upperlimit>"

" <Targetvalue>4</Targetvalue>"

" </main>"

</record>

<record>

" <main>"

" <CharacterName>Hardness</CharacterName>"

" <Lowerlimit>54</Lowerlimit>"

" <Upperlimit>57</Upperlimit>"

" <Targetvalue>55</Targetvalue>"

" </main>"

</record>

<record>

" <main>"

" <CharacterName>Weight</CharacterName>"

" <Lowerlimit>9</Lowerlimit>"

" <Upperlimit>12</Upperlimit>"

" <Targetvalue>10</Targetvalue>"

" </main>"

</record>

</ns:bps_file_rece></b>

Former Member
0 Kudos

Hi Partha,

Message was edited by:

Sachin Dhingra

Former Member
0 Kudos

Simple thing your xml is not formatted your target structure is wrong.

please remove doublequotes from elements name in data type.

Thanks,

Tuhin

Shabarish_Nair
Active Contributor
0 Kudos

make a small editing to your target DT. Remove the node record.

So let the XML look like;

<?xml version="1.0" encoding="utf-8"?>

<ns:bps_file_rece xmlns:ns="http:
bps_file">

" <main>"

" <CharacterName>Diameter</CharacterName>"

" <Lowerlimit>5.98</Lowerlimit>"

" <Upperlimit>6.05</Upperlimit>"

" <Targetvalue>6</Targetvalue>"

" </main>"

" <main>"

" <CharacterName>Procity</CharacterName>"

" <Lowerlimit>4.02</Lowerlimit>"

" <Upperlimit>4.08</Upperlimit>"

" <Targetvalue>4</Targetvalue>"

" </main>"

... etc etc ...

Note : no quotes req. !!

then in FCC use

main,1

and then

main.fieldSeparator ,

main.endSeparator 'nl'

former_member184619
Active Contributor
0 Kudos

Hi Partha,

U just check the structure of ur receiver file.

and have a look at these.

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

and this

Regards

Sachin

Former Member
0 Kudos

There are no double quotes in my data type..

Former Member
0 Kudos

Do a simple test instead of .csv and create .xml file through receiver adapter and try to open with IE if it is having error in opening file that means you have done something wrong in datatype.

Former Member
0 Kudos

Partha,

Have you inserted the <main> node in your src data tye? If not do that.

Also in your target data type, there should be a main node...

Your source xml should look like this...

<?xml version="1.0" encoding="utf-8"?>

<ns:bps_file_rece xmlns:ns="http:
bps_file">

<main>

<CharacterName>Diameter</CharacterName>

<Lowerlimit>5.98</Lowerlimit>

<Upperlimit>6.05</Upperlimit>

<Targetvalue>6</Targetvalue>

</main>

<main>

<CharacterName>Procity</CharacterName>

<Lowerlimit>4.02</Lowerlimit>

<Upperlimit>4.08</Upperlimit>

<Targetvalue>4</Targetvalue>

</main>

</ns:bps_file_rece>

Also your source FCC parameters are

RecordSet Structure main,*

main.fieldNames CharacterName,Lowerlimit,Upperlimit,Targetvalue

main.fieldSeparator ,

main.endSeparator 'nl'

ignoreRecordsetName true

Regards,

Jai Shankar

Former Member
0 Kudos

Yeah it showing the error.....

can you provide more inputs on this ......

Former Member
0 Kudos

when you test the scenario in message mapping you should get respose like as below.

<?xml version="1.0" encoding="UTF-8"?>

<ns1:BAPI_BUS2002_ACT_GETDATA xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><I_NETWORK_NUMBER>jk</I_NETWORK_NUMBER></ns1:BAPI_BUS2002_ACT_GETDATA>

can you paste your response?

Former Member
0 Kudos

Hi Tuhin

Mapping testing is successful i am getting the XML structure as we required but still at receiver side i am getting only 4 fields.

Structure of my resulted xml after mapping test:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:bps_file_send xmlns:ns0="http:
bps_file">

<main>

<Plant>1000</Plant>

<Characteristics>Diameter</Characteristics>

<Validfrom>2006/11/17</Validfrom>

<Presetindicator>2000</Presetindicator>

<Indicator>X</Indicator>

<Status>Released</Status>

<Shorttext>Diameter</Shorttext>

<Searchfield>Diameter</Searchfield>

<Lowerlimit>5.98</Lowerlimit>

<Upperlimit>6.05</Upperlimit>

<Targetvalue>6</Targetvalue>

</main>.....................

Answers (3)

Answers (3)

Former Member
0 Kudos

Solved the Issued .....

The mistake was in ID-interface determination. I had not specified the interface mapping.....

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Check your mapping output.

Does it contain the constant fields created?

Also test your mapping by copying your incoming payload into your test tab of IR.Refer this blog for how to do the same,

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Regards,

Bhavesh

former_member184619
Active Contributor
0 Kudos

Hi Partha,

Just go through these links

/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

hope this will help.

Regards

Sachin