Skip to Content
avatar image
Former Member

Carriage Return problem in Long Text

Hi

I am tyring to download Long text for Interactions (CBIH82) transaction. I am using read_text function module. The read text works fine as far as reading text but the internal table for TDLINE contains two hashes (##) in everyline which is actually a carriage return character (hex value 0A0D). Now when i pass this line to GUI_DOWNLOAD it splits the text at the hashes and wirtes it in a new line for the .txt file.

We tried most of the string operations but it fails to read the ## as it is not actually two hashes but character representation of Carriage return. Is there any function module avaliable to get it converted to a character format.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 27, 2006 at 11:13 AM

    Hi shashank,

    1. u can use the concept of (carriage + line feed)

    CL_ABAP_CHAR_UTILITIES=>CR_LF

    for replacing the character/splitting etc.

    2. eg.

    REPORT ABC.

    data : m(10) type c.

    m = CL_ABAP_CHAR_UTILITIES=>CR_LF.

    regards,

    amit m.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2006 at 11:14 AM

    Hi,

    Please try with the FM 'STPU1_HEX_TO_CHAR'.

    TTR

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 27, 2006 at 11:19 AM

    Hi Shashank,

    You could do this -

    Run a search for the character cl_gui_char_utilities=>cr_lf and remove it. ( Know its too simple, but worth a try )

    Regards,

    Aniket

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      If you dont have access to the class CL_ABAP_CHAR_UTILITIES, do this instead:

      DATA: crlf(2)   TYPE x VALUE '0D0A',
            itab      TYPE TABLE OF string,
            w_input   TYPE string.
      
         w_input = '<contains the text with the line feed.>'.
      
         SPLIT w_input AT crlf INTO TABLE itab.
      
      

      Regards Michael.