cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error in RFC Adapter

dipen_pandya
Contributor
0 Likes
2,889

Dear Experts,

I have a File to RFC Scenario & We are running on Single Stack (JAVA only) Process Orchestration ( 7.4).

Where my FTP Server is running fine. Communication Channels for Sender(File) and Receiver(RFC) both are GREEN in Monitoring, But still RFC is not able to find the file data.

I have configured all part of ESR, ID & iFlow. There are not any inconsistencies found.

The Error is as per below attached Screenshot.

(MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: could not get functionname from XML requst: com.sap.aii.adapter.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declaration(1)

Please give your helpful suggestions.

Thanks & Regards,

Dipen.

View Entire Topic
Zahid_Murtaza
Explorer
0 Likes

Seems like the XML generated by your file adapter is not correctly mapping to your RFC structure. To verify it, you can copy the generated xml from message monitoring and paste it in message mapping test in Integration repository to verify if mapping gets executed successfully, hopefully you should be able to determine exact cause from there.

dipen_pandya
Contributor
0 Likes

Hi Zahid,

I tried to find generated XML in Message Monitoring but it is not yet generated as the message is lying in Waiting state.

My RFC Structure is as below.


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://po:update"

targetNamespace="http://po:update">

   <xsd:element name="MT_PO_UPLOAD_EXCEL" type="DT_PO_UPLOAD_EXCEL" />

   <xsd:complexType name="DT_PO_UPLOAD_EXCEL">

      <xsd:sequence>

         <xsd:element name="PURCHASING_DOCUMENT" type="xsd:string" default="4" />

         <xsd:element name="VENDOR_ACC_NUMBER" type="xsd:string" default="10" />

         <xsd:element name="PURCHASING_ORG" type="xsd:string" default="4" />

         <xsd:element name="PURCHASING_GROUP" type="xsd:string" default="3" />

         <xsd:element name="COMPANY_CODE" type="xsd:string" default="4" />

         <xsd:element name="MATERIAL" type="xsd:string" default="18" />

         <xsd:element name="QUANTITY" type="xsd:string" default="13" />

         <xsd:element name="UOM" type="xsd:string" default="3" />

         <xsd:element name="NET_PRICE" type="xsd:string" default="13" />

         <xsd:element name="CURRENCY" type="xsd:string" default="5" />

         <xsd:element name="PLANT" type="xsd:string" default="4" />

         <xsd:element name="TAX_CODE" type="xsd:string" default="2" />

      </xsd:sequence>

   </xsd:complexType>

</xsd:schema>

And my File XML structure is as follow.


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://po:update"

targetNamespace="http://po:update">

   <xsd:complexType name="DT_PO_UPLOAD_EXCEL">

      <xsd:sequence>

         <xsd:element name="PURCHASING_DOCUMENT" type="xsd:string" default="4" />

         <xsd:element name="VENDOR_ACC_NUMBER" type="xsd:string" default="10" />

         <xsd:element name="PURCHASING_ORG" type="xsd:string" default="4" />

         <xsd:element name="PURCHASING_GROUP" type="xsd:string" default="3" />

         <xsd:element name="COMPANY_CODE" type="xsd:string" default="4" />

         <xsd:element name="MATERIAL" type="xsd:string" default="18" />

         <xsd:element name="QUANTITY" type="xsd:string" default="13" />

         <xsd:element name="UOM" type="xsd:string" default="3" />

         <xsd:element name="NET_PRICE" type="xsd:string" default="13" />

         <xsd:element name="CURRENCY" type="xsd:string" default="5" />

         <xsd:element name="PLANT" type="xsd:string" default="4" />

         <xsd:element name="TAX_CODE" type="xsd:string" default="2" />

      </xsd:sequence>

   </xsd:complexType>

</xsd:schema>

Please Help me to resolve this issue.

I am on urgent assignment.

Thanks & Regards,

Dipen.

Former Member
0 Likes

Okay, now your RFC structure definitely does not adher to standard BAPI XMLs. Now the question is, what is your scenario? What RFC are you trying to call? Are you intending to call a BAPI in SAP or some external RFC?

Regards

Varun

dipen_pandya
Contributor
0 Likes

Hi varun,

Yes I am tending to give the data to the Customized ABAP Remote Enabled Function Module(RFC) which also include BAPI function module of Purchase Order Create.

My Scenario is File to RFC.

I am picking file from FTP Server which is working perfectly.

And I am giving this file (.csv) to SAP system.

Please Advice.

Thanks.

Dipen.

Zahid_Murtaza
Explorer
0 Likes

The issues seems to be at mapping level, hence sender message (Outbound) message is probably received at PI and should be in log. Go through message monitoring of adapter engine instead of integration engine.

Are you expecting an xml file from FTP or content conversion is being used?

does the mapping test in integration repository with some dummy data gets executed succesfully?

The fact that your communication channel status is green, the problem seems to be during mapping after file has been picked up (File does gets picked up from your ftp directory, right ?)

dipen_pandya
Contributor
0 Likes

Yes Zahid.

You are right file is still there on FTP directory, its not deleted yet.

I am using Content Conversion too.

But what I am suppose to write in Recordset Structure?

Thanks in advance.

Zahid_Murtaza
Explorer
0 Likes

usually, the structure is defined as following hierarchy:

<Mt_anyfileRec>

      < Record>
         < Row>

               <Field 1>

               <Field 2>

               ..

               ..

               <Field N>

Then this sequence is used to correctly define the content conversion.

If we take above example, the sender adapter will be populated as follow for content coversion:

  • Document name: MT_anyfileRec
  • Record Set name: Record
  • Record set structure: Row,*