2022 Jan 20 7:16 PM
Hi!
I need to include text in the multi-line sales order.
At the end of each line I have already included cr_lf or newline.
However, when I do this, the next line has a space at the beginning.
What can I do to make this not happen?
Thanks!
In the intern table SD_SALESDOCUMENT_CREATE.

See that from the 2nd to the 7th line there is a space before the number.

2022 Jan 26 2:59 PM
HI vijay.hariharan!
If I removed it, the text will be with number in same line.
Thank you!
I solved the problem include '/' in the text records. (<lfs_bapi>-format_col = '/'.)
program:
IF <lfs_bapi> IS ASSIGNED.
<lfs_bapi>-langu = sy-langu.
<lfs_bapi>-text_id = lc_uuid_mx.
<lfs_bapi>-text_line = lv_uuid_txt(lv_off).
CLEAR lv_off2.
FIND lv_crlf(1) IN <lfs_bapi>-text_line MATCH OFFSET lv_off2 MATCH LENGTH lv_len.
IF sy-subrc = 0 AND lv_off2 > 0.
<lfs_bapi>-text_line = <lfs_bapi>-text_line(lv_off2).
ENDIF.
<lfs_bapi>-format_col = '/'.
lv_len = STRLEN( lv_uuid_txt ).
lv_off = lv_off + 1.
lv_len = lv_len - lv_off.
lv_uuid_txt = lv_uuid_txt+lv_off(lv_len).
ENDIF.
2022 Jan 21 4:10 AM
Have you tried without the # at the end in the TEXT_LINE field.. Maybe you can try for one of the lines in T_TEXTS just to confirm whether this causes the space..
Regards,
Vijay
2022 Jan 21 9:53 AM
2022 Jan 26 2:59 PM
HI vijay.hariharan!
If I removed it, the text will be with number in same line.
Thank you!
I solved the problem include '/' in the text records. (<lfs_bapi>-format_col = '/'.)
program:
IF <lfs_bapi> IS ASSIGNED.
<lfs_bapi>-langu = sy-langu.
<lfs_bapi>-text_id = lc_uuid_mx.
<lfs_bapi>-text_line = lv_uuid_txt(lv_off).
CLEAR lv_off2.
FIND lv_crlf(1) IN <lfs_bapi>-text_line MATCH OFFSET lv_off2 MATCH LENGTH lv_len.
IF sy-subrc = 0 AND lv_off2 > 0.
<lfs_bapi>-text_line = <lfs_bapi>-text_line(lv_off2).
ENDIF.
<lfs_bapi>-format_col = '/'.
lv_len = STRLEN( lv_uuid_txt ).
lv_off = lv_off + 1.
lv_len = lv_len - lv_off.
lv_uuid_txt = lv_uuid_txt+lv_off(lv_len).
ENDIF.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |