If SAP could not Write IDoc File, Check Unicode Format in Port! [SAP]
SAP ECC 6.0
SAP_BASIS 700
We were getting a failed EDI output for a purchase order output. The error is:
Message ME760 - No IDoc items belonging to purchasing document found
Diagnosis
Outbound processing:
No IDoc has been generated because no output-relevant changes to the document were found.
Inbound verarbeitung:
No items were found for the PO number specified in the IDoc. The IDoc may be incomplete (contains no items).
What is the problem? Even the IDoc was created… And the IDoc’s status is 51, and error message is:
Message EA299 - Could not write IDoc to file
Diagnosis
The system could not convert data from the data record 000020.
Procedure
Check the port definition of the receiver port.
You can use the “Continue despite conversion error” option to write the IDoc to the file from transaction BD87 with replacement characters.
So the problem: The IDoc is being created successfully, but the IDoc file is not being saved into the port folder for the EDI subsystem.
Let me check the port definition, WE21. File port SAPDEV, and directory is \\EDI01\qasedi\out\… Yes, there is a folder like that.
The first thing came to my mind is authorization problem for file write. Basically S_DATASET check authorization check. I did ST01 (System Trace) for Authorization Checks. Yes, I saw S_DATASET for the IDoc file, but is green (successful). So it is not a S_DATASET authorization check problem!
Print program is RSNASTED and subroutine is EDI_PROCESSING for the purchase order (EF) output type. I have seen the program calls the function module IDOC_OUTPUT_ORDCHG at some point.
I know that EDI_OUTPUT_NEW function module is used to create/save the file for outbound IDocs.
So somehow I found where the file is created and data transferred to the file.
- Function Module: IDOCS_OUTPUT_TO_FILE
- Subroutine: WRITE_PAKET
- Subroutine: WRITE_TO_FILE (Include LEDI7F11)
Inside OPEN_FILE subroutine, it checks S_DATASET for the file by using AUTHORITY_CHECK_DATASET function module with WRITE activity. But as I said there is no problem with S_DATASET.
So something must be wrong when the data is transferred to the file. Indeed, when the data is Transferred but doing CATCH SYSTEM-EXCEPTIONS some errors are defined: CONVT_CODEPAGE_INIT, DATASET_WRITE_ERROR, CONVT_CODEPAGE.
So the problem is for TRANSFER statement, and it shows me that it is related to data itself. At some point TRANSFER point doesn’t like some data. Indeed, if we look the IDoc’s status message, it says: “The system could not convert data from the data record 000020.” So this 20 means 20th line and so it is 20th segment in the IDoc.
I am getting close
And 20th segment of ORDERS05 IDoc is E1EDP19 001… Bingo the problem is material description field KTEXT value (FO STEEL RED 25.4 X 1”-24) It seems TRANSFER doesn’t like this values and especially little ” character.
So if we would delete this ” character from material description, we might be all right. Yes, it worked.
But then I remember something about port definition (WE21). In port definition there is a check box (Unicode format). This was unchecked and I checked it. Then without deleting ” character in material description and I tried to purchase order output, IDoc and it worked!
So keep in your mind. Use Unicode format checked for port definitions, if you use a Unicode enabled SAP, for example ECC 6.0
Tags: EDI, error, file, IDoc, ME23N, output, port, unicode, WE21
November 17th, 2010 at 12:23 pm
I am having this same error — but if I push the idoc again (or reverse a payment and let it get picked up in the following day’s run) we get no error — why would this be sporadic??