Code: Alles auswählen.
CONSTANTS:
a_uml TYPE c VALUE 'Ä',
o_uml TYPE c VALUE 'Ö',
u_uml TYPE c VALUE 'Ü',
sz TYPE c VALUE 'ß'.
select bname from user_addr into it_user_addr_line-bname
where
a_uml in bname or
o_uml in bname or
u_uml in bname or
sz in bname
endselect.
Code: Alles auswählen.
*- Grosschreibung
TRANSLATE user_addr-bname TO UPPER CASE.
*-Benutzerkennug mit Umlaut auswählen
SELECT bname FROM user_addr INTO TABLE gt_bname.
CLEAR it_user_addr.
IF sy-subrc = 0.
LOOP AT gt_bname ASSIGNING <fs_bname>.
IF ( ( <fs_bname>-bname CA 'Ä' ) OR
( <fs_bname>-bname CA 'Ö' ) OR
( <fs_bname>-bname CA 'Ü' ) OR
( <fs_bname>-bname CA 'ß' ) ).
it_user_addr_line-bname = <fs_bname>-bname.
APPEND it_user_addr_line TO it_user_addr.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE i012.
ENDIF.
*-->konvertieren Buchstaben mit Umlaut in kombibuchstaben im Nachname und Vorname.
LOOP AT it_user_addr INTO it_user_addr_line .
IF ( it_user_addr_line-bname CA 'Ä' ).
REPLACE 'Ä' WITH 'AE' INTO it_user_addr_line-bname.
ENDIF.
IF ( it_user_addr_line-bname CA 'Ö' ).
REPLACE 'Ö' WITH 'OE' INTO it_user_addr_line-bname.
ENDIF.
IF ( it_user_addr_line-bname CA 'Ü' ).
REPLACE 'Ü' WITH 'UE' INTO it_user_addr_line-bname.
ENDIF.
IF ( it_user_addr_line-bname CA 'ß' ).
REPLACE 'ß' WITH 'SS' INTO it_user_addr_line-bname.
ENDIF.
APPEND it_user_addr_line TO user_daten.
ENDLOOP.