cancel
Showing results for 
Search instead for 
Did you mean: 

using fm RKD_WORD_WRAP

Former Member
0 Kudos

hi all ,

can anyone help me out with this function module how to use it,"RKD_WORD_WRAP " .actually i have a text field in my line item sgtxt and i have taken a internal table in my print program, i have used column in my sap script i want to wrap the text between the column itself.hw can i use this in my print program and sap script. if u could explain me with an example for which will fulfill my requirement.

abinash verma

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
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.
Former Member
0 Kudos

in tis code can you plz tell me in detailhow to use the field bseg-sgtxt, currentlyi have taken this field into internal table itab in my print program and wrriting itab-sgtxt in my layout, can you plz relate my conditions with this?plz

Former Member
0 Kudos

Are you trying to do something like this?


report zV_TEST1 .
 
data:
 
      str1 type string,
      str2 type string,
      str3(1000) type c.
 
data: out_lines type table of string with header line.
 
str1 = 'Hi there. How are you?'.
str2 = 'Why am I working today, its my day off.'.
 
concatenate str1 str2 into str3 separated by space.
 
call function 'RKD_WORD_WRAP'
  exporting
    textline                  = str3
   outputlen                 = 35
 tables
   out_lines                 = out_lines
 exceptions
   outputlen_too_large       = 1
   others                    = 2.
 
loop at out_lines.
  write:/ out_lines.
endloop.
 



Regards,
VAsanth
Former Member
0 Kudos

sorry but,

i haven't used it till nw, i dnt know how to define it,i have to output in my layout ,sgtxt field in my line item but i dnt know now the normal content of sgtxt is displayed , i wanted to wrap the content into the column ,so how can i use this fm or is there anything else i can do , plz help me.