Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Mapping, splitting linen in several lines


I have the following situation.

The source structure contains a field that can be up to 4000 characters long,

The target structure contains a field than has a length of 132.

These fields have to be mapped with each other but how can I split the field of 4000 characters

into several lines of 132 characters long?

kind regards Maarten

Former Member
Former Member replied


while (sourceStr.length()>132)


String resultStr=sourceStr.substring(0,132);

sourceStr = sourceStr.substring(132);

(or) sourceStr = sourceStr.substring(132,sourceStr.length());


// This is for checking the last characters if it is 10 or 20 or ... then we have to add that also.

if(sourceStr.length() < 132)



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question