on 11-17-2006 7:25 AM
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>
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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>
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>
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>
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'
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
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?
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>.....................
Solved the Issued .....
The mistake was in ID-interface determination. I had not specified the interface mapping.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.