Commit 9d47e941 authored by manohar's avatar manohar

edi generation as per transetup added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95135 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ce3ada8e
......@@ -56,7 +56,7 @@ public class DistOrderAmdConf extends ActionHandlerEJB implements DistOrderAmdCo
String errCode = null;
int count=0;
ITMDBAccessEJB itmDBAccessEJB = null;
String errString = null;
String errString = null, ediOption = "0";
int upd = 0;
try
{
......@@ -382,23 +382,39 @@ public class DistOrderAmdConf extends ActionHandlerEJB implements DistOrderAmdCo
//call edi generation
if( errString == null || errString.trim().length() == 0 )
{
errCode = null;
GenerateEDILocal genEDIRemote = null;
AppConnectParm appConnect = new AppConnectParm();
Properties props = appConnect.getProperty();
InitialContext ctx = new InitialContext(props);
//GenerateEDIHome genEDIHome = ( GenerateEDIHome )ctx.lookup( "GenerateEDI" );// commented for ejb3
genEDIRemote = ( GenerateEDILocal )ctx.lookup( "ibase/GenerateEDI/local" );// added for ejb3
//GenerateEDI genEDIRemote = (GenerateEDI)genEDIHome.create();//commented for ejb3
// 28/05/14 manoharan
sql = " select edi_option from transetup where tran_window = 'w_distordamd' ";
pstmt = conn.prepareStatement( sql );
rs = pstmt.executeQuery();
//errCode = genEDIRemote.genEDI( "w_distordamd", tranId, "E", xtraParams, conn );
//Method changed by manoj dtd 18/12/2013 as per no. of arguments used
errCode = genEDIRemote.genEDI( "w_distordamd", tranId, xtraParams, conn );
if( "SUCCESS".equalsIgnoreCase( errCode ) )
if ( rs.next() )
{
ediOption = rs.getString(1):
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (ediOption != null && ("1".equals(ediOption) || "2".equals(ediOption)) )
{
errCode = null;
GenerateEDILocal genEDIRemote = null;
AppConnectParm appConnect = new AppConnectParm();
Properties props = appConnect.getProperty();
InitialContext ctx = new InitialContext(props);
//GenerateEDIHome genEDIHome = ( GenerateEDIHome )ctx.lookup( "GenerateEDI" );// commented for ejb3
genEDIRemote = ( GenerateEDILocal )ctx.lookup( "ibase/GenerateEDI/local" );// added for ejb3
//GenerateEDI genEDIRemote = (GenerateEDI)genEDIHome.create();//commented for ejb3
//errCode = genEDIRemote.genEDI( "w_distordamd", tranId, "E", xtraParams, conn );
//Method changed by manoj dtd 18/12/2013 as per no. of arguments used
errCode = genEDIRemote.genEDI( "w_distordamd", tranId, xtraParams, conn );
if( "SUCCESS".equalsIgnoreCase( errCode ) )
{
errCode = null;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment