/** Copy information from the meta-data input to the dialog fields. */ public void getData() { logDebug(BaseMessages.getString(PKG, "SapInputDialog.Log.GettingKeyInfo")); // The database connection name... // if (input.getDatabaseMeta() != null) { wConnection.setText(input.getDatabaseMeta().getName()); } else if (transMeta.nrDatabases() == 1) { wConnection.setText(transMeta.getDatabase(0).getName()); } // The name of the function to use // function = input.getFunction(); if (input.getFunction() != null) { wFunction.setText(Const.NVL(input.getFunction().getName(), "")); } // The parameters... // for (int i = 0; i < input.getParameters().size(); i++) { SapParameter parameter = input.getParameters().get(i); TableItem item = wInput.table.getItem(i); int colnr = 1; item.setText(colnr++, Const.NVL(parameter.getFieldName(), "")); item.setText(colnr++, parameter.getSapType().getDescription()); item.setText(colnr++, Const.NVL(parameter.getTableName(), "")); item.setText(colnr++, Const.NVL(parameter.getParameterName(), "")); item.setText(colnr++, ValueMeta.getTypeDesc(parameter.getTargetType())); } wInput.setRowNums(); wInput.optWidth(true); // The parameters... // for (int i = 0; i < input.getOutputFields().size(); i++) { SapOutputField outputField = input.getOutputFields().get(i); TableItem item = wOutput.table.getItem(i); int colnr = 1; item.setText(colnr++, Const.NVL(outputField.getSapFieldName(), "")); item.setText(colnr++, outputField.getSapType().getDescription()); item.setText(colnr++, Const.NVL(outputField.getTableName(), "")); item.setText(colnr++, Const.NVL(outputField.getNewName(), "")); item.setText(colnr++, ValueMeta.getTypeDesc(outputField.getTargetType())); } wOutput.setRowNums(); wOutput.optWidth(true); }