Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
SAP Community Downtime Scheduled for This Weekend

word wrap in ITAB

Former Member
0 Kudos
97

Hi,

How to make wordwrap in ITAB.Iam displaying values like this.

MCTXT(itab field)

-


AAAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCCC

After reaching length 12, i want to make break and i want to display in second line like

AAAAAAAABBBB

BBBBBBCCCCCC

CCCCCC

Can any one tell me how to do.

Points guraranteed

cheers

kaki

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos
75

hi

use this FM ...

RKD_WORD_WRAP

thanks

vijay

former_member188685
Active Contributor
0 Kudos
75

hi

check this thread .

thanks

vijay

Former Member
0 Kudos
75

Hi Kaki,

Like Vijay mentioned use the fm for this.

See the below sample code for refrerence.


data : mctext(65).

 DATA: BEGIN OF i_outlines OCCURS 0,
        txt(12),
 END OF i_outlines.

mctext = 'AAAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCCC'.

      CALL FUNCTION 'RKD_WORD_WRAP'
        EXPORTING
          textline                  = mctext
*         DELIMITER                 = ' '
         outputlen                 = 12
       TABLES
         out_lines                 = i_outlines
       EXCEPTIONS
         outputlen_too_large       = 1
         OTHERS                    = 2.
       if sy-subrc = 0.
       endif.

Hope this will help you.

Thanks&Regards,

Siri.