cancel
Showing results for 
Search instead for 
Did you mean: 

MII can't receive IDOC from ECC error

Former Member
0 Kudos

Hi,expert and Michael,

I have some problems with MII IDOC listener.

I config the IDOC listener following your document,and the I send the IDOC from ECC using T-CODE:POIM.

The IDOC generate successfully,but in SM58,I see some errors like:RFC_ERROR_SYSTEM_FAILURE: IDocException occurred.

I have three questions:

1.when I config MII IDOC listener, shall I config the SAPJavaResourceAdapter first?

2.Can I config the same progarmID in different SAP system

3.I think there are some cache in NW or MII,how can I clear the cache in NW or MII.when I change the config for the IDOC listener,shall i clear the cache in NW or MII and restart the NW instance.

The error logs in MII NW like this:

com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE: IDocException occurred

at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:614)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:2268)

at com.sap.conn.jco.rt.DefaultServerWorker.dispatch(DefaultServerWorker.java:259)

at com.sap.conn.jco.rt.DefaultServerWorker.loop(DefaultServerWorker.java:322)

at com.sap.conn.jco.rt.DefaultServerWorker.run(DefaultServerWorker.java:220)

at com.sap.mw.jco.jra.JRA$ReaderThread.run(JRA.java:7260)

at com.sap.engine.services.connector.jca15.work.TaskImpl.run(TaskImpl.java:255)

at com.sap.engine.core.thread.execution.Executable.run(Executable.java:115)

at com.sap.engine.core.thread.execution.Executable.run(Executable.java:96)

at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)

Caused by:

RfcException: [System QAS|bydnew]

message: IDocException occurred

Return code: RFC_FAILURE(1)

error group: 104

key: RFC_ERROR_SYSTEM_FAILURE

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.executePlayback(MiddlewareJavaRfc.java:2664)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.playbackTRfc(MiddlewareJavaRfc.java:2478)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.handletRfcRequest(MiddlewareJavaRfc.java:2362)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:2207)

... 8 more

Caused by:

RfcException: [System QAS|bydnew]

message: IDocException occurred

Return code: RFC_FAILURE(1)

error group: 104

key: RFC_ERROR_SYSTEM_FAILURE

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(MiddlewareJavaRfc.java:2956)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.executePlayback(MiddlewareJavaRfc.java:2659)

... 11 more

Caused by: com.sap.conn.idoc.IDocRuntimeException: IDocException occurred

at com.sap.mw.jco.jra.idoc.JRAIDocExtension$IDocMessageHandler.onMessage(JRAIDocExtension.java:111)

at com.sap.mw.jco.jra.JRA$ReaderThread.sendDirectToMdb(JRA.java:6641)

at com.sap.mw.jco.jra.JRA$ReaderThread.sendAsynchRequest(JRA.java:6601)

at com.sap.mw.jco.jra.JRA$ReaderThread.handleRequest(JRA.java:6771)

at com.sap.conn.jco.rt.DefaultServerWorker$RequestDispatcher.handleRequest(DefaultServerWorker.java:989)

at com.sap.conn.jco.rt.DefaultServerWorker$RequestDispatcher.handleRequest(DefaultServerWorker.java:967)

at com.sap.conn.jco.rt.DefaultServerWorker.dispatchRequest(DefaultServerWorker.java:142)

at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(MiddlewareJavaRfc.java:2927)

... 12 more

Caused by: com.sap.conn.idoc.IDocMetaDataUnavailableException: (3) IDOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type "LOIROU02" is

unavailable.

at com.sap.conn.idoc.rt.DefaultIDocDocument.<init>(DefaultIDocDocument.java:126)

at com.sap.conn.idoc.jco.JCoIDocDocument.<init>(JCoIDocDocument.java:90)

at com.sap.conn.idoc.jco.JCoIDocDocument.createIDocDocument(JCoIDocDocument.java:168)

at com.sap.conn.idoc.jco.JCoIDocRuntime.createIDocDocumentList(JCoIDocRuntime.java:74)

at com.sap.mw.jco.jra.idoc.JRAIDocRuntime.createIDocDocumentList(JRAIDocRuntime.java:104)

at com.sap.mw.jco.jra.idoc.JRAIDocExtension$IDocMessageHandler.onMessage(JRAIDocExtension.java:80)

... 19 more

hope for your reply!

thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

hi,Michael and Eoin

thanks for your quick reply.

yes,I solve the problem by your suggestion.It's really a authorisation problem.I miss the authorisation object that Michael

mentioned.

for the question 2,I have some doubt:the programID can't be same in the two SAP server?

For example, in ECC PRD and DEV, Can I define the same programID?Now I define the same programIDs in PRD and DEV.

if not,I will change my configeration.

thanks again!

agentry_src
Active Contributor
0 Kudos

Chuiqian,

About 80-90% of the issues I work on ultimately end up with multiple use of ProgID as the cause.

Soooooo, I really don't recommend trying to use it in multiple places. But if you want to give it a try, you will most likely only receive your IDocs at one of the two locations and probably not all of them will be delivered.

Regards,

Mike

Former Member
0 Kudos

Hi,

Regarding:

Q3) There is a Metadata cache in Netweaver and the only reliable way to clear this

is to restart netweaver. This step is normally only required if you change the

Metadata definition on the ECC side and need this updated.

Is this really the only possibility to clear the cache? To restart the NW? On a productive system this is not really a good solution. Please confirm again that there is no other way, Thanks!

Konrad

agentry_src
Active Contributor
0 Kudos

Hi Konrad,

I have to agree with you, but bear in mind that this is the MII forum and not a NetWeaver forum. Most of what I have learned with NW has been trial and error (with lots of errors along the way). There probably is a function or small program for NW that forces a refresh, but I have not found it and have lots of experience with IDoc Listeners.

I would recommend posting on a NetWeaver forum to see if you can find a better way to refresh for changes to IDoc structures. The same question has been posted here a number of times and no one so far has posted a better solution.

Regards,

Mike

Answers (2)

Answers (2)

Former Member
0 Kudos

Agrees with all that Mike says

Q1) Common error here during connection test is "program not registered". As Mike said do not

try to register this manually in Netweaver. This is an automated process. Please follow the steps

below that will register the program (will be available in soon to be released SAP note 1528512)

For the MII delivered idoc listener resource adapters it is not required

to follow the steps from note 353597 ie. rfcexec should

not be used to register the server program.

Follow the steps below to help resolve this issue,

1) Navigate to the resource adapter in the netweaver administrator

NWA -> Configuration -> Infrastructure -> Application resources

2) Find the XMIIIDOC0* adapter, note down all of the values

and save them for reference.

Please initialise all fields except for the fields below which

should keep these values-

MaxReaderThreadCount 0

Language EN

BindingKey XMIIIDOC

3) Save the initialised adapter

4) Restart the resource-

NWA -> Operation Management -> System -> Start and Stop

Page 2

-> Java EE applications -> Enter idoc to search and find the

relevant application

5) Select and choose Start -> On All instances

6) Return to the resource adapter initialised in step 2 and

fill in the data again. When this is saved with valid data

the server program you enter in the corresponding field

will be registered on the gateway automatically. This can be

any name but must correspond exactly to what is defined in SM59.

>> Note, make sure to set MaxReaderThreadCount >= 1

Any incorrect config will cause the resource to stop. To check

if a resource has stopped you must refresh the browser page (F5)

and find the resource again. It can be misleading as

a resource adapter may show as green status until the page refresh

If a resource stops it must be initialised saved and

started again (repeat steps 1-5)

Second common error is what Mike Mentioned, changes to the resources can lead to the MII

message listener configuration being initialised. An update from the MII Listener Config should resolve

the more common RFC_ERROR_SYSTEM_FAILURE errors.

Q2) Same as Mike's response, duplicated program ID's should not be used.

Q3) There is a Metadata cache in Netweaver and the only reliable way to clear this

is to restart netweaver. This step is normally only required if you change the

Metadata definition on the ECC side and need this updated.

METADATA_UNAVAILABLE errors are always either authorisation or

incorrect definition of the segments in ECC. IDOC_READ_COMPLETE

can help to identify both. Testing from both ECC and MII can help identify

where problems exist. This function module is what is used via RFC

by external applications to retrieve the Idoc MetaData.

If the error raised includes information like

IDOC_ERROR_METADATA_UNAVAILABLE: The meta data for the IDoc type u201CXXX u201D with extension u201CYYYu201D is unavailable.

In this case it can be that the definition itself in ECC is a problem, be sure to include the

extension information when passing to IDOCTYPE_READ_COMPLETE for troubleshooting. It can also be worthwhile

to test a non-modified or extended message type to eliminate the possibility of this problem and ensure authorisations

or resource configuration are not the problem.

Edited by: Eoin Donnelly on Jun 3, 2011 12:27 PM

Edited by: Eoin Donnelly on Jun 3, 2011 12:31 PM

Former Member
0 Kudos

I have this problem also.

Can it has the same programId name between two sap systems,like QA and PRD?

And the autheritory objects set to the listener user or sap user which to send idocs?

agentry_src
Active Contributor
0 Kudos

In short, no. You will need to have different ProgIDs for each system.

And I am not sure what you mean by authority objects. Eoin?

I know that various Partners have run into this question, so maybe they can chime in on how they have dealt with this.

Regards,

Mike

Former Member
0 Kudos

Thanks for you quick answer!

The following authorisation objects are required for ALE users.

S_IDOCCTRL - General access to IDoc functions

S_IDOCDEFT - Access to IDoc development

S_IDOCMONI - Access to IDoc monitoring

S_IDOCPART - Access to partner profile (IDoc)

S_IDOCPORT - Access to port definition (IDoc)

which is the ALE user? the idocs sender or the receiver?

agentry_src
Active Contributor
0 Kudos

The user refers to the one used in configuring the IDoc Listener in NW.

Regards,

Mike

Former Member
0 Kudos

Yes this will be the user configured in the message listener, an RFC is made from MII/NW to ECC

calling IDOC_READ_COMPLETE to retrieve the METADATA and this user must have the authorisations

to do so.

That in mind the user sending the idocs must obviously have authoristions to do so

Former Member
0 Kudos

I have completed and released 2 notes useful to resolving issues discussed here

Note: 1529038 Idoc send to MII, METADATA_UNAVAILABLE

Note: 1528512 SM59 Connection Test: Program XMIIIDOC** not registered

I hope they prove helpful

agentry_src
Active Contributor
0 Kudos

First question: It should not matter. Just follow the document and don't, I repeat, don't do anything else to "help" configure the listener. Especially do not manually register the ProgID in NW!

Second question: Definitely not. If you have the ProgID in multiple places in a single system or use the same ID singly in more than one NW/MII systems you will have problems (generally intermittent delivery of IDocs). If you use the same ProgID in more than one ECC system, I suspect that NW will get confused or will only retrieve the IDocs from the one it was originally configured for. I would not recommend it in any case. And there seems to be some caching going on in NW, so each new IDoc Listener will need a new unique ProgID. Don't reuse ones that you were testing with.

Third question: There is an update button in the MII Message Listener section. However, I generally restart NW anyway. It seems to always work. But I have not tested this in recent releases.

And per Eoin Donnelly who actually understands the ECC side of things much better than I:

"Generally this IDOC_ERROR_METADATA_UNAVAILABLE: is an authorizations issue

Review note 16642. The following authorisation objects are required for ALE users.

S_IDOCCTRL - General access to IDoc functions

S_IDOCDEFT - Access to IDoc development

S_IDOCMONI - Access to IDoc monitoring

S_IDOCPART - Access to partner profile (IDoc)

S_IDOCPORT - Access to port definition (IDoc)

The function IDOCTYPE_READ_COMPLETE can also be called directly via a JCO/JRA call from the MII Workbench to help dentify a number of causes for the METADATA_UNAVAILABLE errors.u201C

If you are using custom IDocs, we have also found recently that errors in the structure of the custom IDoc can cause Meta Data errors as well.

Good luck,

Mike

Edited by: Michael Appleby on Jun 3, 2011 1:13 PM

Edited by: Michael Appleby on Jun 3, 2011 1:31 PM