doc.getPain00800101().getGrpHdr().setInitgPty(new PartyIdentification20());
doc.getPain00800101().getGrpHdr().getInitgPty().setNm(sepaParams.getProperty("src.name"));
//Payment Information
PaymentInstructionInformation5 pmtInf = new PaymentInstructionInformation5();
doc.getPain00800101().setPmtInf(pmtInf);
pmtInf.setPmtInfId(pmtInfId != null && pmtInfId.length() > 0 ? pmtInfId : sepaId);
pmtInf.setPmtMtd(PaymentMethod2Code.DD);
pmtInf.setReqdColltnDt(SepaUtil.createCalendar(sepaParams.getProperty("targetdate")));
pmtInf.setCdtr(new PartyIdentification22());
pmtInf.setCdtrAcct(new CashAccount8());
pmtInf.setCdtrAgt(new FinancialInstitution2());
//Payment Information
pmtInf.getCdtr().setNm(sepaParams.getProperty("src.name"));
//Payment Information
pmtInf.getCdtrAcct().setId(new AccountIdentification2());
pmtInf.getCdtrAcct().getId().setIBAN(sepaParams.getProperty("src.iban"));
//Payment Information
pmtInf.getCdtrAgt().setFinInstnId(new FinancialInstitutionIdentification4());
pmtInf.getCdtrAgt().getFinInstnId().setBIC(sepaParams.getProperty("src.bic"));
//Payment Information - ChargeBearer
pmtInf.setChrgBr(ChargeBearerType2Code.SLEV);
pmtInf.setPmtTpInf(new PaymentTypeInformation8());
pmtInf.getPmtTpInf().setSvcLvl(new ServiceLevel4());
pmtInf.getPmtTpInf().getSvcLvl().setCd(ServiceLevel3Code.SEPA);
pmtInf.getPmtTpInf().setSeqTp(SequenceType1Code.fromValue(sepaParams.getProperty("sequencetype")));
//Payment Information - Credit Transfer Transaction Information
ArrayList<DirectDebitTransactionInformation2> drctDbtTxInfs = (ArrayList<DirectDebitTransactionInformation2>) pmtInf.getDrctDbtTxInf();
if (maxIndex != null)
{
for (int tnr = 0; tnr <= maxIndex; tnr++)
{
drctDbtTxInfs.add(createDirectDebitTransactionInformation2(sepaParams, tnr));