cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in Idoc Flat file To Idoc XML conversion

Former Member
0 Kudos

Hi All,

We tried converting an Idoc Flat file to Idoc XML in PI 7.11. We referred the below mentioned blog for it

/people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats

We were able to convert the standard orders Idoc flat file to Idoc XML. In our requirement the Idoc flat file contained comments in the first line. I'm pasting the first two line of my file below

first line in Idoc flat file

ndeh1 FTP.GODBAC20100517172033.TGOODFELLAS     FTP               2010051800001720100518000018                                                                                #UNKNOWN                                                              godbac20100517172033.txt                                                                                *

second line of Idoc flat file

EDI_DC40  1100000000000000695620 3012  MBGMCR02                                                    MBGMCR                                     MBGMCRWINELKE   LS  GOODFELLAS                                                                                SAPQ10    LS  XXXXXXX                                                                                20100517172033

1. With the comment line(first line) we are facing the below error in the channel

 MP: exception caught with message Invalid length of control segment: 1001

Is there any to make the module to understand that the line is a comments and ignore it?

2. On removing the first line we are facing the below error in the channel

MP: exception caught with message Invalid DOCNUM detected. SEGDOCNUM = 0000000000000000 DOCNUM = 0000000000000695

How to rectify the above error?

Please advice

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

<li>

For removing the comment line from the IDoc flat file you can use a OS level script and "Run Operating System Command before Message Processing" in the Sender File Adapter.

<li>

Then regarding the IDoc XML module problem, I belive the data is not in proper format as per the IDoc definition. Please cross check each and every field data & segments since it expects a Fixed length data file.

<li>

If the above solution doesn't work, do the following to troubleshoot:

<li>

Desgin a Config scenario without any mapping and only file adapter as receiver.

<li>

In receiver file adapter use IDoc XML conversion Module to generate IDoc flat file.

<li>

Send IDoc XML file using RWB Test message and generate IDoc flat file.

<li>

Try to process the newly generated IDoc flat file using the original interface where you are facing the error.

Thanks & Regards,

Ananth

Shabarish_Nair
Active Contributor
0 Kudos

you can maybe write a module on the File sender side that will remove the first line or a mapping(java) that can remove the first line before sending it to the Module for IDoc conversion

Former Member
0 Kudos

Hi Shabrish,

Thanks for ur reply. Yes we had "creation of a module to remove the comment" as an option. But before doing it we just want to know if there is a standard way of removing it as we do in FCC.

Any idea on the second error msg?

Regards,

Malini

Shabarish_Nair
Active Contributor
0 Kudos

>

> Thanks for ur reply. Yes we had "creation of a module to remove the comment" as an option. But before doing it we just want to know if there is a standard way of removing it as we do in FCC.

i dont think there is a standard way to do tht in the IDoc conversion module