Нашел в свое время... возможно даже на сапфоруме, малость подпилил: (только это не перевод, а транслитерация)
Code:
function z_hr_translit_ru_to_en .
*"----------------------------------------------------------------------
*"*"Локальный интерфейс:
*" IMPORTING
*" VALUE(RUS) TYPE CHAR40
*" EXPORTING
*" REFERENCE(ENG) TYPE CHAR40
*"----------------------------------------------------------------------
data: rus_string(131),
lat_string(147),
lat_string_first(147),
lat_string_a(23).
types: begin of t_lat,
tb(3),
end of t_lat.
data: t_lat_first type standard table of t_lat with header line,
t_lat type standard table of t_lat with header line.
data: begin of t_rus occurs 0,
tb(1),
end of t_rus.
data: i type i,
k type i,
l type i,
l1 type i,
l2 type i,
l3 type i,
k1 type i,
k2 type i,
y.
concatenate 'А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,'
'а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я,%'
into rus_string.
concatenate 'A,B,V,G,D,E,YO,ZH,Z,I,Y,K,L,M,N,'
'O,P,R,S,T,U,F,H,C,CH,SH,SCH, ,I, ,E,YU,YA,'
'a,b,v,g,d,e,yo,zh,z,i,y,k,l,m,n,'
'o,p,r,s,t,u,f,h,c,ch,sh,sch, ,i, ,e,yu,ya,%'
into lat_string.
concatenate 'A,B,V,G,D,E,YO,Zh,Z,I,Y,K,L,M,N,'
'O,P,R,S,T,U,F,H,C,Ch,Sh,Sch, ,I, ,E,Yu,Ya,'
'a,b,v,g,d,e,yo,zh,z,i,y,k,l,m,n,'
'o,p,r,s,t,u,f,h,c,ch,sh,sch, ,i, ,e,yu,ya'
into lat_string_first.
lat_string_a = 'A,E,I,Y,O,U,a,e,i,y,o,u'.
split lat_string at ',' into table t_lat.
split rus_string at ',' into table t_rus.
split lat_string_first at ',' into table t_lat_first.
* Основное преобразование
translate rus using ' %'.
condense: rus.
clear: y, i.
l = strlen( rus ) - 1.
while i <= l.
check rus+i(1) ne space.
read table t_rus with key tb = rus+i(1).
if sy-subrc = 0.
k = sy-tabix.
if i = 0.
read table t_lat_first into t_lat index k.
else.
read table t_lat index k.
endif.
if sy-subrc = 0.
condense t_lat-tb.
if not y is initial.
concatenate eng t_lat-tb into eng separated by space.
clear: y.
else.
concatenate eng t_lat-tb into eng.
endif.
endif.
else.
if y is initial and rus+i(1) ne space.
concatenate eng rus+i(1) into eng.
endif.
if not y is initial.
concatenate eng rus+i(1) into eng separated by space.
clear: y.
endif.
endif.
if rus+i(1) = space.
y = 'X'.
endif.
add 1 to i.
endwhile.
* Замена "iy" на "y" в конце слова
l = strlen( eng ) - 2.
if eng+l(2) = 'iy'.
eng+l(2) = 'y '.
endif.
* Замена "s" на "ss" в середине слова, если по бокам гласные буквы
l = strlen( eng ).
k2 = l - 1.
i = 1.
do k2 times.
l1 = i - 1.
l2 = i.
l3 = i + 1.
if ( eng+l2(1) = 'S' or eng+l2(1) = 's' )
and lat_string_a cs eng+l1(1)
and lat_string_a cs eng+l3(1).
move '$' to eng+l2(1).
endif.
add 1 to i.
enddo.
replace '$' with 'ss' into eng.
translate eng using '% '.
endfunction.