Thursday 28 August 2008

"IDOC_INBOUND_ASYNCHRONOUS" : WCF adapter

Error details: Microsoft.Adapters.SAP.RFCException: Details: ErrorCode=RFC_SYS_EXCEPTION. ErrorGroup=RFC_ERROR_SYSTEM_FAILURE. SapErrorMessage=IDoc adapter inbound: Sender port is initial. AdapterErrorMessage=Error occurred while calling function module "IDOC_INBOUND_ASYNCHRONOUS" in R/3..

Improper control records( Sender post or position ect..) could be the reason for specified error.
SapErrorMessage, This error message gives you some idea.
****************************************

An error occurred while adding data to buffer: WCF Adapter

Error Message:
"A message sent to adapter "WCF-Custom" on send port "TestWCFSAPSend" with URI "sap://CLIENT=nnn;LANG=EN;@a/sapxxxx/nn?RfcSdkTrace=True&AbapDebug=False&UseSapGui=Without" is suspended. Error details: Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: An error occurred while adding data to buffer."
Some of Causes:
1) Control record is not properly positioned
2) Document Number should be same at all places(Segments and control record) or 16(Length) spaces.
*****************************************************************************

Wednesday 13 August 2008

Some Information On WCF Adapter-SAP

The SAP.NET Connector exposes two classes for dealing with IDocs - SAPIDocSender, and SAPIDocReceiver (I hope I got the names correct). Both these methods deal only with data in "flat file" format as we call it - a bunch of lines of text - the first line represents the Control Record, and then each subsequent line represents a Segment.

The WCF Adapter exposes a Send() and Receive() method to do something almost similar. The difference is that the methods are actually something like Send(ORDERS05), Send(MATMAS03), etc (and similarly for Receive) - these operations are "strongly typed" to a specific IDoc, which allows for better validation. In order to obtain this metadata, at runtime, the adapter executes IDOCTYPE_READ_COMPLETE to get the metadata, so that the adapter can validate the data flowing across. Hence, we make the extra calls, for exposing extra functionality.

The Adapter also exposes a SendIdoc() and ReceiveIdoc() call, which is similar to the SAP.NET Connector - the functions just take in a String (which should contain the lines of text, with the first line being the control record, and subsequent lines being the data records) - in these functions, since there is no metadata to validate, the adapter won't make any extra calls to IDOCTYPE_READ_COMPLETE.

Therefore, you should be able to use the SendIdoc() / ReceiveIdoc() methods in your scenario.

This forum post seems to be very similar : http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3725298&SiteID=1, and also contains a MSDN link to the SendIdoc()/ReceiveIdoc() methods.

In the MSB UI, on the left pane, click on IDOC (which is the top level category along with RFC / TRFC / BAPI). In the right top pane, SendIdoc and ReceiveIdoc should show up - they appear there, since they are generic operations for all IDocs (as compared to Send/Receive, which only show up after you've navigated the tree to a particular MessageType+IdocType+Release+Version).
***************************************************

Receiving Idocs - getting the raw idoc data

http://blogs.msdn.com/adapters/archive/2007/10/05/receiving-idocs-getting-the-raw-idoc-data.aspx

http://blogs.msdn.com/adapters/archive/2007/12/14/receiving-idocs-from-sap-using-the-sapbinding-requires-higher-sap-user-privilege-as-compared-to-the-older-mysap-adapter-really.aspx
-Sheshu

How to skip the calling of the SAP RFC function modules in WCF adapter

Question:
Dear All,
Does anyone know if it is possible to disable the calling of the following SAP RFC function module call "IDOC_INBOUND_ASYNCHRONOUS"/ "IDOCTYPE_READ_COMPLETE", which the WCF LOB SAP adapter seems to be making.
We are trying to post an IDOC type into an SAP system, however the particular IDOC type does not exist in the said SAP system.
It seems with the WCF LOB SAP adapter there are additional RFC calls made to perform checks in SAP, which prevents the posting of IDOCs if they do not exist. In the old SAP .Net Connector, there were no such checks and you could post any IDOC into an SAP system, if it exists in the system or not.
Here, I am trying to post IDOC to SAP PI system which does not contain all type messages.
Any suggestion welcome.
Thanks in Advance,

Answers:
1)
We cannot avoid calling IDOC_INBOUND_ASYNCHRONOUS since that is the way to send an IDoc to SAP. However if you want to avoid calling IDOCTYPE_READ_COMPLETE you can use the generic SendIDoc function in the SAP adapter. This RFC is called to get the metadata of the IDoc. You can get more details regarding this in the related blog
http://blogs.msdn.com/adapters/archive/2007/12/14/receiving-idocs-from-sap-using-the-sapbinding-requires-higher-sap-user-privilege-as-compared-to-the-older-mysap-adapter-really.aspx
2)
Related question here: http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3725298&SiteID=1

-Sheshu

Tuesday 5 August 2008

Some important likes Related to WCF adapter – BizTalk

Flat File support is provided for flexibility (e.g. backward compatibility, weak type support). This should be described in links below:
Sending IDOCs
http://msdn.microsoft.com/en-us/library/cc185479.aspx

Receiving IDOCs (second link describes additional steps for transaction support)http://msdn.microsoft.com/en-us/library/cc185169.aspxhttp://msdn.microsoft.com/en-us/library/cc185265.aspx

-Sheshu

Monday 4 August 2008

System.Exception: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly

System.Exception: Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.
Cause:
If the binding property EnableBizTalkCompatibilityMode is set to true, you must add the BizTalk property schema DLL for the SAP adapter as a resource in your BizTalk application, that is, the application in which your project is deployed.
Resolution:
The name for the BizTalk property schema for the SAP adapter is Microsoft.Adapters.SAP.BiztalkPropertySchema.dll. This is installed by the BizTalk Adapter Pack setup under :\ Program Files\Microsoft BizTalk Adapter Pack\bin. Perform the following tasks to add this assembly as a resource in your BizTalk application.
To add an assembly as a resource in BizTalk application
  • Click Start, point to Programs, point to Microsoft BizTalk Server 2006, and then click BizTalk Server Administration.
  • In the console tree, expand BizTalk Server 2006 Administration and the BizTalk Group that contains the application to which you want to add the BizTalk assembly.
  • Expand Applications and the application to which you want to add a BizTalk assembly.
  • Right-click Resources, point to Add, and then click BizTalk Assemblies.
  • Click Add, navigate to the folder containing the BizTalk assembly file, select the BizTalk assembly file, and then click Open.
  • In Options, specify the options for installing the BizTalk assembly to the GAC, and then click OK."

Taken from Microsoft site.

-Sheshu

Microsoft site for Troubleshooting Operational Issues with WCF adapter

http://msdn.microsoft.com/en-us/library/cc185364.aspx