cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Adapter Querry...!

Former Member
0 Kudos

hi

I am doing a File to File scenario.

In XI my Source structure is say,

MT_Source

-


Recordset

-


Field1 (0-1)

-


Field2 (0-1)

-


Field3(0-1)

-


VarField (0-Unbounded)

Now my souce CSV file is something like this.

Field1,Field2,Fiel3,Varfield,Varfield,Varfield.

<b>(Note the occurence of the "Varfield" ,its occurence is indefinete, it may be 1 or 2 or 3)</b>

My mapping works fine when i duplicate the Varfield in the test tab,

However when i run the scenario i get the following error in Communication Channel monitoring for my Sender Adapter.

<b>"Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Recordset':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!"</b>

Could anybody tell me how could i manage such situation... would be very thankfull. I want my Dource structure to be dynamic wrt to my csv file,...is this possible.....!!

Accepted Solutions (0)

Answers (10)

Answers (10)

Former Member
0 Kudos

hey I have chaged the parameters as you have suggested, however I am getting an error

"Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Mandatory parameter 'Recordset.keyFieldValue': no value found "

there is no common KEY field in the structure,is there anything else i can substitute this with, and is it neccessary to mention a key Field and Key Field Value.

Former Member
0 Kudos

Hi Bhavesh,

My Sample input file is...

0000003000,000000000000000014,,TEST ARTICLE,1010101,60,TEST ARTICLE,X,TEST ARTICLE,A1,,,ZVKP,<i><b>2050000000102,25000108,28500000</b></i> |

Now these fields that are in bold have dynamic occurences (0-unbounded). In other words there can be three values or can be a single value..and is not fixed,

The source data strucure i have created looks like this.

<b>MT_Source</b>

<b>---Recordset (0-Unbounded)</b>

-


Site

-


Article

-


Aendtyp

-


Desc

-


Warengr

-


Kondwert

-


Posdesc_Text

-


Raberlaubt

-


Itemkeyword_Text

-


Mwskz

-


Meinpverb

-


Vkinperfor

-


Kondart

<b>--Hauptean</b> (0-Unbounded)

-


EAN (0-1)

The fields in bold in the sample data is mapped to the EAN field under substructure Hauptean,

So the number of times EAN occurs in sample data the substructure Hauptean has to repeat itself. in the above case we need to have three Hauptean substructures under one Recordset.

Now in my Adpater configuration i have these follwing parameters set (Which i am not sure if I am right)

<b>Content Conversion parameters</b>

recordset name: Recordset

Recordset Structure : Recordset,,Hauptean,

Recordset Sequence :Ascending

Recordset.fieldNames :Artikelnr,Aendtyp,Fldval,Qualarttxt,Item_name_text,Warengr,Kondwert,Posdesc_Text,Raberlaubt,Itemkeyword_Text,Mwskz,Meinpverb,Vkinperfor,Kondart

Hauptean.fieldNames:EAN

Recordset.fieldSeparator:,

Hauptean.fieldSeparator:,

Recordset.processConfiguration:FromConfiguration

Hauptean.endSeparator:'|'

Recordset.endSeparator:'|'

Hope it is clear to you guys...please let me know if u have any idea how to achieve this , it would be really appreciated.

bhavesh_kantilal
Active Contributor
0 Kudos

John,

Incorrect answer. Content Deleted.

Regards,

Bhavesh

Message was edited by:

Bhavesh Kantilal

bhavesh_kantilal
Active Contributor
0 Kudos

John,

Please ignore my previous post. Given the incorrect answer!

Sorry!

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

John,

0000003000,000000000000000014,,TEST ARTICLE,1010101,60,TEST ARTICLE,X,TEST ARTICLE,A1,,,ZVKP<b>|</b>2050000000102<b>|</b>25000108<b>|</b>28500000<b> |</b>

Either make the change in the source file as I have shown above

or, if you want to retain the source file then

make the <b>Hauptean.endSeparator: ,</b>

You do not need a Hauptean.fieldSeparator as you do not have multiple fields under Hauptean

Regards,

Bhavesh

Regards,

Bhavesh

Shabarish_Nair
Active Contributor
0 Kudos

<i>MT_Source

-


Recordset

-


Field1 (0-1)

-


Field2 (0-1)

-


Field3(0-1)

<b>----


VarField (0-Unbounded)</b></i>

>>>

with the current capabilities of the file adapter i doubt if such a dynamic field can be handled in FCC !!!!

Former Member
0 Kudos

Thanks for the ans, however i would need my Output file as

Field1,Field2,Field3,Varfield1,Varfield2,Varfield3..So..on.

Any idea...?

Former Member
0 Kudos

John,

Check this weblog which may help you:

/people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi

---Satish

bhavesh_kantilal
Active Contributor
0 Kudos

John,

Can you give us the sample input file and the content conversion parameters used in your sender file adapter?

Regards,

Bhavesh

Former Member
0 Kudos

Hey thanks Pal, However i have specified all the required Parameters for the Structure in Adapter Properties,and i am sure it would work for normal cases,

Is there any other idea u can think of for this variably occuring field...? Please help me bro...!!!

Former Member
0 Kudos

John,

If you give the parameters what I have mentioned then you will get a file in the format:

Field1,Field2,Fiel3,Varfield1

Field1,Field2,Fiel3,Varfield2

Field1,Field2,Fiel3,Varfield3 etc.

If this is what you are expecting as output then it will work.

---Satish

Former Member
0 Kudos

Hey thanks for ur responses...But My Recordset structure is Simple and has no Substructres in it..

So I think <b>"NameA,Na..."</b> thing under recordset structure would not work.

The problem is that, its just one source field in the CSV-file is occuring variably,How would i specify in my Adapter properties that this particular fields occurrence is unbounded.....please help....!!

Former Member
0 Kudos

John,

You just specify like below and try:

Recordset Structure : Recordset

Recordset.fieldnames : <Give the fieldnames if your file has. If you dont have dont specify>

Recordset.fieldSeparator : , (Since your file is comma seperated)

---Satish

Former Member
0 Kudos

I ran into this error recently, it was because somewhere in the file a comma (",") was benig used in an item description field. This tricked XI into thinking that there were more fields, because that was the delimeter. Possibly check your source file and make sure this isn't the case?

Former Member
0 Kudos

John,

In Sender File communicaiton channel specify ignoreRecordsetName as true and check whether you are able to succeed or not.

---Satish

Former Member
0 Kudos

Hi John,

See these...

All the best!

cheers,

Prashanth

P.S Please mark helpful answers

Former Member
0 Kudos

Hi,

Please look at following

http://help.sap.com/saphelp_erp2005vp/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

From sap help.

Recordset Structure

Enter the sequence and the number of sub structures as follows: <NameA,nA,NameB,nB,...>. Therefore, nA=1,2,3,... or * (for a variable, unlimited number, including 0).

Use this and you should be able to solve.

Thanks,

Tuhin