Skip to Content
1
Jan 21, 2021 at 02:53 PM

CL_ABAP_CHAR_UTILITIES=>cr_lf is working for some of the records and not working for some others?

214 Views Last edit Jan 21, 2021 at 03:10 PM 3 rev

Hello ,

I am facing an issue, please do needful.

Any help would be appreciated !

I am using CL_ABAP_CHAR_UTILITIES=>cr_lf to update Sales order text (VA03) in my program, but it is reflecting in the output for some of the records and for some others its not working.

In the attached picture, after 'OD 3.6' it should display in next line but it is not working and for some other items it's working as required. So, where the problem here is ?

Data: Begin of i_ORDER_TEXT.
Data:   cr_lf(1).
Data: End of i_ORDER_TEXT.  

CLASS cl_abap_char_utilities DEFINITION LOAD.

loop at i_text into wa_text.
    I_order_text-doc_number = wa_text-vbeln .
    i_order_text-itm_number = wa_text-posnr.
    i_order_text-Text_id = '0001'.
    i_order_text-langu = 'E'.
    i_order_text-text_line = Wa_text-text.
    MOVE CL_ABAP_CHAR_UTILITIES=>cr_lf TO i_order_text-cr_lf.
    append i_order_text.
  ENDLOOP.

  CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

Attachments

ftp-sd.png (23.1 kB)