Skip to end of metadata
Go to start of metadata
*---------------------------------------------------------------------------------------------*
* here we can split the given string with the definded  length and that can be
* passed into different variables .suppose if there is a report , in that one column having
* the string values(suppose more than 255 chars) , if you want to display the same string
* by splitting the row into different rows then this function module is used
*--------------------------------------------------------------------------------------------------
REPORT  zread_lines.
*-----------------------------------------------------------*
*  data declarations
*-----------------------------------------------------------*
DATA : str(40).
DATA : v1(20),
       v2(10),
       v3(10).
*-----------------------------------------------------------*
*     initialization
*-----------------------------------------------------------*
INITIALIZATION.
  str = 'This the test report for word wraping in reports'.
*-----------------------------------------------------------*
*  start of selection
*-----------------------------------------------------------*
START-OF-SELECTION.
  CALL FUNCTION 'RKD_WORD_WRAP'
    EXPORTING
      textline  = str
      outputlen = 10
    IMPORTING
      out_line1 = v1
      out_line2 = v2
      out_line3 = v3.
*---display .
  WRITE : / v1.
  WRITE : / v2.
  WRITE : / v3.
 
  • No labels