To split the string length with limited
CustTable custTable;
str fullInvoiceNum, requiredTextInvoice, splitInvoice ,Invoice, staticText ="Payment of Invoice";
int i=1,j=1;
while select custTable
{
fullInvoiceNum += custTable.name();
}
requiredTextInvoice = staticText + fullInvoiceNum;
while (j < strLen(requiredTextInvoice))
{
if(i==1)
{
splitInvoice = subStr(requiredTextInvoice,j,35);
Invoice = splitInvoice;
j = 3;
}
else
{
splitInvoice = subStr(requiredTextInvoice,j,33);
Invoice = " _" + splitInvoice;
}
j = j + 33;
info(strFmt("%1 %2", Invoice, strLen(Invoice) ));
i++;
}
No comments:
Post a Comment