doc.getPain00100102().getGrpHdr().setInitgPty(new PartyIdentification20());
doc.getPain00100102().getGrpHdr().getInitgPty().setNm(sepaParams.getProperty("src.name"));
//Payment Information
PaymentInstructionInformation4 pmtInf = new PaymentInstructionInformation4();
doc.getPain00100102().setPmtInf(pmtInf);
pmtInf.setPmtInfId(pmtInfId != null && pmtInfId.length() > 0 ? pmtInfId : sepaId);
pmtInf.setPmtMtd(PaymentMethod5Code.TRF);
// Payment Type Information
pmtInf.setPmtTpInf(new PaymentTypeInformation7());
pmtInf.getPmtTpInf().setSvcLvl(new ServiceLevel4());
pmtInf.getPmtTpInf().getSvcLvl().setCd(ServiceLevel3Code.SEPA);
String date = sepaParams.getProperty("date");
if(date == null) date = SepaUtil.DATE_UNDEFINED;
pmtInf.setReqdExctnDt(SepaUtil.createCalendar(date));
pmtInf.setDbtr(new PartyIdentification23());
pmtInf.setDbtrAcct(new CashAccount8());
pmtInf.setDbtrAgt(new FinancialInstitution2());
//Payment Information - Debtor
pmtInf.getDbtr().setNm(sepaParams.getProperty("src.name"));
//Payment Information - DebtorAccount
pmtInf.getDbtrAcct().setId(new AccountIdentification2());
pmtInf.getDbtrAcct().getId().setIBAN(sepaParams.getProperty("src.iban"));
//Payment Information - DebtorAgent
pmtInf.getDbtrAgt().setFinInstnId(new FinancialInstitutionIdentification4());
pmtInf.getDbtrAgt().getFinInstnId().setBIC(sepaParams.getProperty("src.bic"));
//Payment Information - ChargeBearer
pmtInf.setChrgBr(ChargeBearerType2Code.SLEV);
//Payment Information - Credit Transfer Transaction Information
ArrayList<CreditTransferTransactionInformation2> cdtTrxTxInfs = (ArrayList<CreditTransferTransactionInformation2>) pmtInf.getCdtTrfTxInf();
if (maxIndex != null)
{
for (int tnr = 0; tnr <= maxIndex; tnr++)
{
cdtTrxTxInfs.add(createCreditTransferTransactionInformation2(sepaParams, tnr));