cancel
Showing results for 
Search instead for 
Did you mean: 

Null object error while sending file from SFTP to ECC in 1:n mapping

Former Member
0 Kudos

Hi,

We are on PI 7.4 single stack. My scenario is file to ECC where I am using 1:n mapping.

Source side I am using external definition and receiver side there are two idocs which I have to map. I have changed the occurences in the target side to 0 to unbounded both in MM and OM. I have disabled the EDI_DC40 segment for both the idocs in the receiver side and in ICO, I have given the PI logical system name in sender communication component in Oubound processing tab . I have also selected control record in IDOC XML not mandatory. Now when I test this interface I am getting the below error for both the Idocs

using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.aii.af.idoc.exception.IDOCAdapterException: Error during transform: java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable chars" style="WHITE-SPACE: normal" ti="0" lsdata="{0:'Transmitting the message to endpoint using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.aii.af.idoc.exception.IDOCAdapterException: Error during transform: java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable chars',9:true}" ct="TV" bResetTabIndex="true"Transmitting the message to endpoint <local> using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.aii.af.idoc.exception.IDOCAdapterException: Error during transform: java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable chars

I went through SDN and found that Interface name should be of

<MESTYP>.<IDOCTYP>.<CIMTYP>.

So, do I have to change the name of the External definition to above pattern? But then in my external definition MESTYP and IDCTYP are coming but not CIMTYP. How to go forward with this error.

Thanks,

Richa.

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Have you created an Service interface for Receiver too ? i mean inbound interface should be idoc no need to use custom service interface .

stop-using-external-definition-for-1-n-idoc-multi-mapping

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you Manoj and Evginey. I have changed the operation mapping and then the ICO. It started working.

Former Member
0 Kudos

Hi Manoj,

I have created two inbound service interfaces for receiver. In the mapping I have selected Idocs directly but in Operation Mapping I have used service interfaces.

Thanks,

Richa.

former_member190293
Active Contributor

Hi Richa!

You shouldn't create any interfaces for IDocs. Just use imported definitions in Operation mapping and Message mapping.

Regards, Evgeniy.