Epicor Inventory Transfer


I am getting the error below:

Exception caught in: Epicor.Mfg.BO.InvTransfer

Error Detail
============
Message: A transfer record was not found
Type: Error
Program: bo/InvTransfer/InvTransfer.p
Method: CommitTransfer
Table:
Row:
Field:

Stack Trace
===========
at Epicor.Mfg.Proxy.InvTransferImpl.CommitTransfer(InvTransferDataSet ds, String& legalNumberMessage, String& partTranPKs)
at Epicor.Mfg.UI.Adapters.InvTransferAdapter.CommitTransfer(InvTransferDataSet ds, String& legalNumberMessage, String& partTranPKs)

Inner Exception
===============
ERROR condition: The Server application has returned an error. (7243) (7211)

Inner Stack Trace
=================
at Progress.Open4GL.DynamicAPI.Session.runProcedure(String requestID, String procedureName, ParameterSet parms, Boolean persistent, Boolean internal_Renamed, Int64 procId, MetaSchema

localSchema, Int32 stateModel)
at Progress.Open4GL.DynamicAPI.Session.runStatelessProcedure(String requestID, String fullProcedureName, ParameterSet inparams, Object procId, MetaSchema localSchema, Int32 stateModel)
at Progress.Open4GL.DynamicAPI.PersistentProc.runTheProcedure(String requestID, String procedureName, ParameterSet parms, MetaSchema schema)
at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String procedureName, ParameterSet parms, MetaSchema schema)
at Epicor.Mfg.Core.CallContext.CallContextPersistentProc.runProcedure(String procedureName, ParameterSet parameters, MetaSchema metaSchema)
at Epicor.Mfg.Core.CallContext.ProxyHelper.CallMethod(String methodName, ParameterSet parameters, MetaSchema metaSchema, BLConnectionPool connPool, Session connection, PersistentProc

persistProc, CallContextDataSet callContextDataSet)
at Epicor.Mfg.Proxy.InvTransferImpl.CommitTransfer(InvTransferDataSet ds, String& legalNumberMessage, String& partTranPKs)

**********************************************************************************************************************

The trace packet is below:

<tracePacket>
<businessObject>Epicor.Mfg.BO.InvTransfer</businessObject>
<methodName>CommitTransfer</methodName>
<returnType>void</returnType>
<localTime>4/2/2014 09:13:49:1391570 AM</localTime>
<executionTime>2311</executionTime>
<parameters>
<parameter name='cc' type='Epicor.Mfg.Core.CallContext.CallContextDataSet' ><CallContextDataSet xmlns="http://www.epicor.com/Mfg/100/BO.CallContext/CallContextDataSet">
<BpmData>
<RowIdent />
</BpmData>
</CallContextDataSet></parameter>
<parameter name='ds' type='InvTransferDataSet' ><InvTransferDataSet xmlns="http://www.epicor.com/Mfg/100/BO.InvTransfer/InvTransfer">
<InvTrans>
<Company>TCS</Company>
<TranDate>2014-04-02T00:00:00-07:00</TranDate>
<FromWarehouseCode>MDA</FromWarehouseCode>
<FromWarehouseDesc>Material Distribution Area</FromWarehouseDesc>
<ToWarehouseCode>MDA</ToWarehouseCode>
<ToWarehouseDesc>Material Distribution Area</ToWarehouseDesc>
<FromBinNum>MDA PR2-S1</FromBinNum>
<FromBinDesc>MDA PR2-S1</FromBinDesc>
<ToBinNum>MDA PR2-S2</ToBinNum>
<ToBinDesc>MDA PR2-S2</ToBinDesc>
<FromLotNumber />
<ToLotNumber />
<FromOnHandQty>1700</FromOnHandQty>
<ToOnHandQty>0</ToOnHandQty>
<Plant>MfgSys</Plant>
<Plant2>MfgSys</Plant2>
<PartNum>3210</PartNum>
<TrackDimension>false</TrackDimension>
<TrackSerialnumbers>false</TrackSerialnumbers>
<TrackLots>false</TrackLots>
<PartDescription>Splice Plate Protectors Extr</PartDescription>
<SearchWord />
<TranReference />
<FromPlant>MfgSys</FromPlant>
<FromPlantTracking>true</FromPlantTracking>
<ToPlant>MfgSys</ToPlant>
<ToPlantTracking>true</ToPlantTracking>
<FromOnHandUOM>FT</FromOnHandUOM>
<TransferQty>1700</TransferQty>
<TransferQtyUOM>FT</TransferQtyUOM>
<ToOnHandUOM>FT</ToOnHandUOM>
<TrackingUOM>FT</TrackingUOM>
<TrackingQty>1700</TrackingQty>
<TranDocTypeID />
<PkgNum>0</PkgNum>
<FromPkgNum>0</FromPkgNum>
<ToPkgNum>0</ToPkgNum>
<ToOrderNum>0</ToOrderNum>
<ToOrderLine>0</ToOrderLine>
<ToOrderRelNum>0</ToOrderRelNum>
<ChildPkgNum>0</ChildPkgNum>
<ChildPkgLine>0</ChildPkgLine>
<ToPkgLine>0</ToPkgLine>
<ToPkgTranDocTypeID />
<ToPkgCode />
<ToPkgNumExist>false</ToPkgNumExist>
<RowIdent />
<RowMod>U</RowMod>
</InvTrans>
</InvTransferDataSet></parameter>
<parameter name='legalNumberMessage' type='string' ><![CDATA[]]></parameter>
<parameter name='partTranPKs' type='string' ><![CDATA[]]></parameter>
</parameters>
<paramDataSetChanges>
<paramDataSet name='cc' useDataSetNbr='0' >
</paramDataSet>
<paramDataSet name='ds' useDataSetNbr='0' >
<changedValue tableName='InvTrans' rowState='Modified' rowNum='0' colName='FromBinNum' ><![CDATA[MDA PR2-S1]]></changedValue>
<changedValue tableName='InvTrans' rowState='Modified' rowNum='0' colName='FromBinDesc' ><![CDATA[MDA PR2-S1]]></changedValue>
<changedValue tableName='InvTrans' rowState='Modified' rowNum='0' colName='FromOnHandQty' ><![CDATA[1700]]></changedValue>
<changedValue tableName='InvTrans' rowState='Modified' rowNum='0' colName='TransferQty' ><![CDATA[1700]]></changedValue>
<changedValue tableName='InvTrans' rowState='Modified' rowNum='0' colName='TrackingQty' ><![CDATA[1700]]></changedValue>
<changedValue tableName='InvTrans' rowState='Modified' rowNum='0' colName='RowMod' ><![CDATA[U]]></changedValue>
</paramDataSet>
</paramDataSetChanges>
</tracePacket>

*****************************************************************************************************************

My Code is below:

private void TCS_CommitTransfer(InvTransferDataSet dsIT, string legalNumberMessage, string partTranPKs )

{

InvTransferAdapter ita =

new InvTransferAdapter(this.oTrans);

ita.BOConnect()

for(int i = 0; i < dsIT.InvTrans.Rows.Count; i++)

{

              dsIT.InvTrans[i].BeginEdit();
              dsIT.InvTrans[i].ToBinNum = txtPrimBinNum.Text ;
              dsIT.InvTrans[i].ToBinDesc = txtPrimBinNumDescription.Text;;
              dsIT.InvTrans[i].ToOnHandQty = decimal.Parse(dsIT.InvTrans[i].FromOnHandQty.ToString());
              dsIT.InvTrans[i].TransferQty.ToString();
              dsIT.InvTrans[i].TrackingQty.ToString();
              dsIT.InvTrans[i].RowMod = "U";
              dsIT.InvTrans[i].EndEdit();
              ita.CommitTransfer(dsIT, out legalNumberMessage, out partTranPKs);

}

try

{

bool result = ita.CommitTransfer(dsIT, out legalNumberMessage, out partTranPKs);

}

catch(Exception ex)

{

MessageBox.Show(ex.Message.ToString());

}

ita.Dispose();