cancel
Showing results for 
Search instead for 
Did you mean: 

Content conversion for seperate idoc

abhijitbolakhe
Advisor
Advisor
0 Kudos

Hi

My scenario is file to idoc as follows.

v.no|amount|currency|documenttype

1011|1000|INR|01

1011|1500|INR|02

1011|1600|INR|02

1211|1000|INR|02

1211|1200|INR|02

1234|1000|INR|01

1234|1000|INR|01

my key field is v.no and v.no can be anything(voucher number).

i want seperate idoc should be created for similar v.no. (3 idocs should be created in above case)

what should i give in key field value as it is not fixed?

Regards

Abhijit

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

Hi Abhijit,

>>my key field is v.no and v.no can be anything(voucher number).

if your vno. repeats then it can't be taken as a key field. Do a FCC without considering it as a key field.

Regards

Suraj

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Abhijit,

Since you dont have a key field in your file, you create a flat structure with one segment called Records and add all the fields. Read all the data records into this. Here you dont need a key field for content conversion then. Once you have all the records then for each change in v.no. (splitby value on change) you create an idoc.

Regards

---Satish

abhijitbolakhe
Advisor
Advisor
0 Kudos

Hi Satish

Thanks for the reply.

Since i want seperate idoc based on the field 'v.no'....do i need to keep v.no as key field ?

Is there any other option in mapping?

Regards

Abhijit

Former Member
0 Kudos

Hi Abhijit,

If you follow the process what I mentioned then you dont have any key field. All your records should be read without key field only. Once you have then use splitbyvalue change in mapping. Also you need to change the occurrence of idoc as mentioned as jose.

Regards,

---Satish

Former Member
0 Kudos

Hi,

You need to do the following:

1. Configure your FCC as delimiter file(v.no|amount|currency|documenttype)

2. Export your IDOC structure and change the occurrence of IDOC node from "1" to "1...unbounded"

3. Import IDOC xsd as an external definition.

4. Use this xsd in your message mapping.

5. Handle the idoc creation logic inside of the message mapping.

Regards

Ivan

Former Member
0 Kudos

Hi,

You read the file as it is ,and while Mapping remove context on V.NO and use SPLIT BY VALUE on value change then do the mapping accordingly ,you can create 3 idocs for the same.

Hope this helps.

Thanks,

Madhu