var req = Matrix.getRequest();
var res = Matrix.getResponse();
var conn = Matrix.getConnection();
var INPUT1_TABLE = req.getTable("DataGrid");
var IT_INPUT_TABLE = req.getTable("DataGrid2");
try{
conn.Connect("DBBEE56A722B7F472BA9E746EE412F6D17");
sql = "{call ZXNSC_NEW_RFCCALL_TEST}";
// set output parameters
var stmt = conn.PrepareCall(sql);
stmt.registerOutParameter("IT_RESULT",-10);
stmt.registerOutParameter("IT_INPUT",-10);
// set input parameters
stmt.setObject("INPUT1", INPUT1_TABLE.toSapDataTable());
stmt.setObject("IT_INPUT" , IT_INPUT_TABLE.toSapDataTable());
stmt.execute(); //실행
var IT_RESULT_DATA= stmt.getDataTable(1);
var IT_INPUT_DATA= stmt.getDataTable(2);
//set response dataset
res.getDataSet().AddTable(IT_RESULT_DATA,"IT_RESULT_GRID");
res.getDataSet().AddTable(IT_INPUT_DATA,"IT_INPUT_GRID");
conn.DisConnect();
conn = null;
}catch(e){
if(conn !=null){conn.DisConnect();conn = null;}
}