Skip to Content
Author's profile photo Former Member

EDI errors – First Record is not a control Record

The error is that the first segment is not the right one and the creation stops .

The error that was encountered was when the loading file .idoc file error ed out and was replaced by a another .idoc file .

This file also error ed out and the incoming sales orders were not created.

The files names were the same and on further analysis it was realized that the reason for changing the file was that the first one had errors in the EDI segments.

The client had replaced the file with the same name and assumed that the file would resume from the error that happened in the first file but this failed .

The error happens as the system tries to restart processing from the line number where the last successful idoc was created but because the file name is the same and the lines have changes system cannot find the starting segment and errors out.


The solution for this issue is to make the program start reading the new file that was loaded in this case in2.idoc from line 1 where the EDIDC segment is present and not a different line. This can be done by following the steps below.

Step 1.

Please login into tcode se11.  Enter EDFI2 as the database table.


Please press CTRL+SHIFT+F10 together to display the contents and Press F8.


Confirm that the path that the in2.idoc file exists in the database as a entry and check the last created idoc number.


Once confirmed that the entry exists go to se37 and enter EDI_EDFI2_DELETE   as the Function Module and press Display. Then execute by pressing F8.


Enter the path name and check the upper/lower case button and press F8.The result should come up as database entry deleted.The path number is from the table discussed earlier.

Go back to the database EDFI2 to check that the entry has been deleted .Now trigger the program to process the 2.idoc file.

This should resolve the error as the counter that was maintained in the table was cleared making the system read the file as a new file and not associate it with the old file .

Please feel free to ask me any doubts you may have about this blog .

Thank you

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.