Skip to Content
0
Former Member
Jun 19, 2006 at 06:09 PM

idoc to sap using sap.net connector

110 Views

i get the following error

IDOC to SAP SAP.Connector.RfcException: Invalid connection. at SAP.Connector.SAPClient.tRfcInvoke(String method, Object[] methodParamsIn, RfcTID tid) at SAP.Connector.SAPIDocSender.TRfcIDocInBoundAsynchronous(EDI_DC40_BLOCKList iDocControlRec40, EDI_DD40_BLOCKList iDocDataRec40, RfcTID tid) at SAP.Connector.SAPIDocSender.SubmitIDoc(TextReader iDoc, RfcTID tid) at SAP.Connector.SAPIDocSender.SubmitIDoc(String iDocPath, RfcTID tid)

i use the following idoc

EDI_DC40 0000000000000037249620 3012 EXCHANGE_RATE01 EXCHANGE_RATE EXCHANRBFILEPORTLS BTS2000 EXCHANSAPMBS LS BTS2000 20021014113506

E2EXCHANGE_RATE000 000000000000003724900000100000001 X

E2BP1093_0001 000000000000003724900000200000102M AED JPY 200210101.02 1 1 1.02 1 1

i use the following code

proxy.Connection = SAP.Connector.SAPLoginProvider.GetSAPConnection(this);

//sapiDocSender1.Connection = new SAP.Connector.SAPConnection(this.destination1);

sapiDocSender2.SubmitIDoc((Server.MapPath(dataFile)),myTid);

proxy.ConfirmTID(myTid);

HttpContext.Current.Response.Write ("Idoc was submitted to SAPlook at transaction WE02 in SAP");

}

catch (Exception ex)

{

HttpContext.Current.Response.Write ("Problem submitting IDOC to SAP\n" + ex.ToString());

}

i have the idoc file in d:\idocs\abc.txt and i can access it using transaction WE16 the port is INTERNAL

Do I need to change the idoc or do i need to create a parter. if so how do i do that?

any help would be great

thanks in advance