cancel
Showing results for 
Search instead for 
Did you mean: 

CSV to IDOC

Former Member
0 Kudos

Hi friends,

My scenario is CSV to IDOC. Everything is ok but in MOIN payload main document my structure is not right way.

My original structure :20110929,20110929,GR/GI Slip No.,Header Text,ABCD,MIGO,Massdata..Like this ..But in XML it will appears like Below. Help me friends.

- <Header>

<DocumentDate>,2011092</DocumentDate>

<PostingDate>9,201109</PostingDate>

<RefDocNumber>29,GR/GI Slip</RefDocNumber>

<DocHeaderText>No.,HEADER</DocHeaderText>

<BillOfLading>TEXT</BillOfLading>

<CurrentTcode>,ABC</CurrentTcode>

<UserName>D,MIGO,M</UserName>

<CompanyID>ASSD</CompanyID>

</Header>

- <Item>

<MaterialNumber>,NMH-145-P5K</MaterialNumber>

<Plant>G,10</Plant>

<StorageLocation>01,</StorageLocation>

<BatchNumber>0101,9102</BatchNumber>

<MovementType>360</MovementType>

<ConsumptionPosting>1</ConsumptionPosting>

<QuantityInUnitOfEntry>3</QuantityInUnitOfEntry>

<UnitOfEntry>,3</UnitOfEntry>

<RecievingIssuingMaterial>11,V,5,EA,NM</RecievingIssuingMaterial>

<IssuingPlant>H-14</IssuingPlant>

<IssuingStorageLocation>5-P</IssuingStorageLocation>

<IssuingBatch>5KG,1001,</IssuingBatch>

Thanks

hari

Accepted Solutions (0)

Answers (3)

Answers (3)

PriyankaAnagani
Active Contributor
0 Kudos

Hi Hari,

Please verify your content conversion parameters. I think you've used fixed lenghts...make sure that you enter the correct content conversion parameters.

Regards,

Priyanka

Former Member
0 Kudos

hi Hari,

Can you please type in the content conversion that you have used. Looks like there is a mistake in that rite?

Regards,

Ninu

Former Member
0 Kudos

Hi Ninu,

Here Iam copy my FCC parameters. Please check and give me idea.

Header.fieldFixedLengths 1,8,8,14,11,4,4,11,4

Header.fieldNames: Key,DocumentDate,PostingDate,RefDocNumber,DocHeaderText,BillOfLading,CurrentTcode,UserName,CompanyID

Item.fieldFixedLengths 1,12,4,3,9,3,1,1,2,12,4,3,9

Item.fieldNames :

Key,MaterialNumber,Plant,StorageLocation,BatchNumber,MovementType,ConsumptionPosting,QuantityInUnitOfEntry,UnitOfEntry,RecievingIssuingMaterial,IssuingPlant,IssuingStorageLocation,IssuingBatch

hari

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

You are using fieldfixedlengths in content conversion and providing field seperators in the input data. Either use field seperators or remove seperators(,) from your sample input data.

Regards,

Priyanka

Former Member
0 Kudos

yes Priyanka is rite.

Use fieldseparator instead of field fixed lengths.

Regards,

Ninu

Former Member
0 Kudos

hi,

When iam using field separator instead of field fixed lengths XI not pick the file in FTP.

hari

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Might be your content conversion parameters are wrong. Please post the error that you are getting in the communication channel & FCC parameters in case of field seperator.

Regrds,

Priyanka

Former Member
0 Kudos

Hi Priyanka,

Iam trying as you said using field separator instead of fixed field lenths. Now Xi is picked the file but not displayed in MONI. CC has no errors. waiting for ur post.

Thanks

hari

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Are you able to see the payload in CC?Are you getting successful message in communication channel & no message in MONI??? If yes, try to do dummy changes to your communication channel,activate it and retest your scenario.

Regards,

Priyanka

Edited by: priyanka.anagani on Oct 13, 2011 11:40 AM

Former Member
0 Kudos

hi priyianka,

Here iam producing all FCC structure. In this structure XI will pick and displayed in Moni. If iam done any changes i.e replace field fixed lengths instead of field separator XI will pick the file but not displayed in Moni. If necessary changes please give me an idea.

ignoreRecordsetName=true

Header.fieldFixedLengths=1,8,8,14,11,4,4,11,4

Header.fieldNames=Key,DocumentDate,PostingDate,RefDocNumber,DocHeaderText,BillOfLading,CurrentTcode,UserName,CompanyID

Header.processConfiguration=FromConfiguration

Header.keyFieldValue=H

Header.endSeparator='nl'

Header.keyFieldInStructure=ignore

Item.fieldFixedLengths=1,12,4,3,9,3,1,1,2,12,4,3,9

Item.fieldNames=Key,MaterialNumber,Plant,StorageLocation,BatchNumber,MovementType,ConsumptionPosting,QuantityInUnitOfEntry,UnitOfEntry,RecievingIssuingMaterial,IssuingPlant,IssuingStorageLocation,IssuingBatch

Item.processConfiguration=FromConfiguration

Item.keyFieldValue=I

Item.endSeparator='nl'

Item.keyFieldInStructure=ignore

thanks

hari

Former Member
0 Kudos

hi Hari,

I am not sure how your input file structure is .. however, here i assume you have one header and several item fields in your file. If this is the case, use the following content conversion :-

xml.recordsetstructure = Header,1,Item,*

ignoreRecordsetName=true

Header.fieldSeparator = ','

Header.fieldNames= DocumentDate,PostingDate,RefDocNumber,DocHeaderText,BillOfLading,CurrentTcode,UserName,CompanyID

Header.endSeparator='nl'

Item.fieldSeparator = ','

Item.fieldNames=MaterialNumber,Plant,StorageLocation,BatchNumber,MovementType,ConsumptionPosting,QuantityInUnitOfEntry,UnitOfEntry,RecievingIssuingMaterial,IssuingPlant,IssuingStorageLocation,IssuingBatch

Item.endSeparator='nl'

If you are getting an error please paste your error here from cc monitoring or moni

Regards,

ninu

Edited by: NinuPSankar on Oct 13, 2011 12:37 PM

Former Member
0 Kudos

Hi Ninu,,

Thanks for your replies, Iam trying as you suggested but xi is picked the file. IN CC monitoring this error occured.

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

waiting for ur response.

Thanks

hari

Former Member
0 Kudos

Sorry XI is not picked the file. Above post i forgot 'NOT"

hari

Former Member
0 Kudos

hi hari,

sorry for the wrong reply. Please try to use recordsetstructure as Header,Item. I am not sure again.. Maybe wait for working replies.. tomorrow i will update the same after checking options here if nobody else has replied.

Second thing.. how do you look at a file and distinguish which is the header.. is it the first line that is always the header?

can you put a bigger piece of your sample file here for analysis.

Regards,

ninu

Former Member
0 Kudos

Hi Ninu,

The problem not solved yet. Here iam copy the input structure. please give me suggestions.

H,20110929,20110929,GR/GI Slip No.,HEADER TEXT,ABCD,MIGO,MASSDATA,ABCD

I,NMH-145-P5KG,1001,0101,910236013,311,V,5,EA,NMH-145-P5KG,1001,0102,910236013

H,20110929,20110929,GR/GI Slip No.,HEADER TEXT,ABCD,MIGO,MASSDATA,ABCD

I,NMH-145-P5KG,1001,0101,910236013,311,V,5,EA,NMH-145-P5KG,1001,0102,910236013

Thanks,

hari

Former Member
0 Kudos

Hi experts,

It's urgent . Please help

hari

Former Member
0 Kudos

Problem solved

Thanks all

0 Kudos

please post the approach you have followed to solve the issue..

rgds

Mahesh

Former Member
0 Kudos

Hi Hari,

Have u checked in Message Mapping with some inputs? is it showing the same which it is showing in SXMB_MONI. please check once in Message mapping.

Thanks,

Amar.