cancel
Showing results for 
Search instead for 
Did you mean: 

Error in RFC Adapter

dipen_pandya
Contributor
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

suman_saha
Contributor
0 Kudos

Hi,

Use the following settings:

Recordset Structure: DT_ZPO_UPLOAD,1.

DT_ZPO_UPLOAD.filedNames                     BSART,LIFNR,.....

DT_ZPO_UPLOAD.fieldSeparator                 ,

DT_ZPO_UPLOAD.endSeparator                 'nl'

DT_ZPO_UPLOAD.additionalLastFields        ignore

Suman

dipen_pandya
Contributor
0 Kudos

Hi Suman,

Thanks for a quick prompt.

Please check & confirm me whether  I am right or wrong?

Please advice.

suman_saha
Contributor
0 Kudos

Don't put fullstop(.) after recordset structure

dipen_pandya
Contributor
0 Kudos

Okay Alright.

Removed the full stop.

Anything else if I am missing or any thing incorrect?

Please Advice.

suman_saha
Contributor
0 Kudos

Try and let us know if it is working fine.

You may create a receiver file channel and use that instead of RFC receiver just to check the output file

Otherwise you need to configure logging and staging to check whats happening step by step.

dipen_pandya
Contributor
0 Kudos

Hey Suman.

Below error I am getting.

Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Parameter 'DT_ZPO_UPLOAD.fieldFixedLengths' or 'DT_ZPO_UPLOAD.fieldSeparator' is missing
Mandatory parameter 'DT_ZPO_UPLOAD.fieldNames': no value found

Transfer Mode should be kept "Binary" or "Text" ?

Please advice.

Zahid_Murtaza
Explorer
0 Kudos

atleast some progress:) ... put fieldSeparator as first parameter in list, and then fieldNames.

dipen_pandya
Contributor
0 Kudos

Hey.

I solved above error.

But now this one is coming.

???

azharshaikh
Active Contributor
0 Kudos

Hi,

Pls add the following config:

DT_ZPO_UPLOAD.missingLastFields= ignore

DT_ZPO_UPLOAD.keepIncompleteFields = YES

Regards,

Azhar

azharshaikh
Active Contributor
0 Kudos

Hi,

Also,  In your Screenshot u have given the Document Name = csvpoupdate.csv

Instead of File Name it should refer the Message Type that you have created for your Structure = MT_ZPO_UPLOAD

The File name you need to define in the First tab (Source)...

You can refer to sample conversion as given in the link:

SAPTechnical.COM - File Content Conversion

Regards,

Azhar

dipen_pandya
Contributor
0 Kudos

Hi Azhar,

It worked and payload generated as below which is not proper.


<?xml version="1.0" encoding="utf-8"?>

<ns:csvpoupdate.csv xmlns:ns="urn:podemo:b2b:purchaseorder:create">

<Recordset>

    <DT_ZPO_UPLOAD>

        <BSART>NB,3</BSART>

        <LIFNR>0001,1000,</LIFNR>

        <EKORG>01,1</EKORG>

        <EKGRP>00,</EKGRP>

        <BUKRS>1301</BUKRS>

        <MATNR>100,NOS,1500,INR,1</MATNR>

        <MENGE>00,V0</MENGE>

    </DT_ZPO_UPLOAD>

???

dipen_pandya
Contributor
0 Kudos

Okay I replaced the name.

Even my Mapping Program in ESR working fine.

But the generated payload is the proper.

???

Any guesses!

former_member184720
Active Contributor
0 Kudos

AFAIK - By default, <recordset> will be added if you don't mention anything under recordset name.

Try adjusting the configuration like below and see if that helps.

Recordset Structure: DT_ZPO_UPLOAD,*(change 1 to *)

in the table add below parameter.

ignoreRecordsetName true

azharshaikh
Active Contributor
0 Kudos

Hi,

As suggested by Hareesh, pls update ur config as follows:

Also the payload that you gave looks Incorrect...Seems that you have defined the Data Type : DT_ZPO_UPLOAD with default lengths.....

Kindly remove the Lengths from your Data Type property for each field....as this is a csv file that you using.

Regards,

Azhar

Answers (5)

Answers (5)

dipen_pandya
Contributor
0 Kudos

Thanks a lot all of you.

I made it with Content conversion.

Thanks again all of you for providing a proper way.

Regards,

Dipen.

dipen_pandya
Contributor
0 Kudos

Thanks every one.

Still I am struggling to achieve File Content Conversion.

Please help.

My file is as below (.csv).

And my XML structure is as below.

Please advice me how can i finish this.

This would be a great help.

Thanks a lot.

suman_saha
Contributor
0 Kudos

Hi,

It seems your content conversion is not proper.

For debugging purpose, remove content conversion and put .xml file directly fetching from message mapping and test. If this works,then do the content conversion taking help from the link:

SAPTechnical.COM - File Content Conversion

http://wiki.scn.sap.com/wiki/display/XI/Basic+File+Adapter+Content+Conversion

Suman

Zahid_Murtaza
Explorer
0 Kudos

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 Kudos

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_member192892
Active Contributor
0 Kudos

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 Kudos

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 Kudos

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 Kudos

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 Kudos

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,*
former_member192892
Active Contributor
0 Kudos

It seems your mapping output is not conforming to the XML structure for the RFC you are trying to call. Check the payload in the comm channel and compare once again just to be sure.

Regards

Varun

dipen_pandya
Contributor
0 Kudos

Hi Varun,

My Mapping output is working appropriately.

Payload is also bringing the File Data.

But the message remains in Waiting state.

Please Advice.

Thanks.