cancel
Showing results for 
Search instead for 
Did you mean: 

Line break / carriage return in BW query: How to use it in a translated query element?

yj
Participant
0 Kudos

Dear all,

In some BW queries we use line breaks. In the BW Modeling Tools I set this with the symbol "##" in the query designer. In my original language German, with which I created the queries, the line break works without any problems and it is directly there when opening the query in Analysis for Office.

But if I translate it, e.g. in transaction SE63, and I use "##" for another language, the line break is not shown the first time when opening the query in AO. Also in transaction RSRT there are no line breaks.

How do I achieve that the line breaks are shown in each language?

Currently in table RSZELTTXT it is stored this way:

Regards,
Yvonne

View Entire Topic
yj
Participant
0 Kudos

SAP Support told me to create a Z report to replace ## with a line break. This is the code which works for us:

REPORT Z_INSERT_LINE_BREAK.

PARAMETERS:
p_langu TYPE sy-langu,
p_update TYPE rs_bool.

DATA:
l_h_lf2(2) TYPE x VALUE '0D0A',
l_r_conv TYPE REF TO cl_abap_conv_in_ce,
l_crlf(2) TYPE c,
l_th_elttxt TYPE rzd1_th_elttxt.

IF l_crlf IS INITIAL.
l_r_conv = cl_abap_conv_in_ce=>create( input = l_h_lf2 ).
l_r_conv->read( IMPORTING data = l_crlf ).
ENDIF.

SELECT * FROM rszelttxt INTO TABLE l_th_elttxt WHERE
objvers = rs_c_objvers-active AND langu = p_langu.

LOOP AT l_th_elttxt ASSIGNING FIELD-SYMBOL(<l_s_elttxt>) WHERE txtlg CS '##'.

WRITE: / <l_s_elttxt>-eltuid, <l_s_elttxt>-txtlg.

IF p_update = rs_c_true.
REPLACE ALL OCCURRENCES OF '##' IN <l_s_elttxt>-txtlg WITH l_crlf.
UPDATE rszelttxt FROM <l_s_elttxt>.
ENDIF.

ENDLOOP.