Word Wrap Functionality in ALV

...Previous  

Modified Output of ALV after Wrap functionality

·         For demonstration purpose, I have used 2 columns – Employee ID (width of Character 10) and Employee Name (width of Character 20)

·         String of length 95 is passed to Employee name field which is of CHAR20 and this column is wrapped so that whole string is shown in multiple lines

Go to SP01 transaction to check Print output.

 

 

Benefits

·         Desired Columns can be wrapped and shown in the same report output.

·         Multiple columns can be wrapped as per requirement. Also, different columns can be wrapped to different lengths, and hence logic needs to be modified accordingly.

·         Wrap length can be set dynamically and changed during run time as per desired functionality.

·         Even though string gets wrapped into multiple lines, however it’s treated as one line item. This provides an advantage incase HOTSPOT functionality is required over line items.

·         No hassles or logic is required to ensure that line gets split at words instead of in between the words as standard SAP function modules are used to achieve the same. Also, we can set custom delimiters for wrap functionality. Hence, CSV file can be wrapped at comma.

·         Print output will also show wrapped output and hence, word wrap functionality is quite helpful in scenarios like Invoice printing, Delivery Document.  

Conclusion

·         Though SAP doesn’t provide Wrap functionality along with ALV standard features, however, we can achieve this though custom logic and coding.

·         This document can be referred by technical consultants to understand how wrap functionality can be implemented for ALV. This document doesn’t explain about ALV Events functionality.

·         The code can be reused with minimal changes as per requirement.

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image