Code: Alles auswählen.
SELECT z~guid,
z~ktext,
replace_regexpr( pcre = '[[:space:]]',
value = z~ktext,
with = '' ) AS ktext_condensed
FROM ztable AS z
WHERE replace_regexpr( pcre = '[[:space:]]', "condense in where
value = z~ktext,
with = '' ) = @pm_text
INTO TABLE @DATA(data_tab).
Code: Alles auswählen.
...
replace( z.ktext, ' ' ,'' ) as ktext_condensed,
...
Code: Alles auswählen.
...
replace( z.ktext, ' ' ,`` ) as ktext_condensed,
...
Code: Alles auswählen.
replace_regexpr( pcre = '[[:space]]+',
value = z~text,
with = `` ) AS text_condensed
von da wird auf die Hilfe verwiesen:Auflösung
Ein einzelnes Leerzeichen kann nicht als Argument übergeben werden. Sie wird in eine leere Zeichenfolge konvertiert.
Grüße EdwinREPLACE( arg1, arg2, arg3 ) String arg1, in which all instances of arg2 are replaced by the content from arg3. The replacement of letters is case-sensitive. Trailing blanks are ignored in all arguments. The maximum length of the result is 1333.
Code: Alles auswählen.
types:
begin of lty_row,
spras like t005t-spras,
landx50 like t005t-landx50,
end of lty_row.
data:
lt_table type standard table of lty_row with default key,
ls_row type lty_row.
exec sql performing adopt_entry.
select spras, landx50
into :ls_row-spras,
:ls_row-landx50
from t005t
where mandt = :sy-mandt
and landx50 = 'Costa Rica'
endexec.
break-point. " check lt_t005t
form adopt_entry.
replace all occurrences of ` ` in ls_row-landx50 with space.
append ls_row to lt_table.
endform.
Code: Alles auswählen.
types:
begin of lty_row,
spras like t005t-spras,
landx50 like t005t-landx50,
end of lty_row.
data lt_table type standard table of lty_row with default key.
select spras, landx50
into @data(ls_row)
from t005t
where landx50 = 'Costa Rica'.
replace all occurrences of ` ` in ls_row-landx50 with space.
append ls_row to lt_table.
endselect.
Code: Alles auswählen.
...
WHERE replace_regexpr( pcre = '[[:space:]]', "condense in where
value = z~ktext,
with = '' ) = @pm_text
...
Code: Alles auswählen.
select spras, landx50
into @data(ls_row)
from t005t.
replace all occurrences of ` ` in ls_row-landx50 with space.
if ls_row-landx50 = |CostaRica|. " where condition
append ls_row to lt_table.
endif.
endselect.