‎2007 Apr 09 3:47 PM
i need to display the first character as uppercase and followed by lower case.
for eg: Sdn Sap Com
‎2007 Apr 09 3:49 PM
Hi..
w_text(3) type c Value 'sdn'.
<b>translate w_text+0(1) to upper case.</b>
write: w_text.
‎2007 Apr 10 4:46 AM
Hi..
<b>data:
w_text(30) type c value 'sdn sap com',
w_len type i,
w_offset type i.
w_len = strlen( w_text ).
translate w_text+0(1) to upper case.
do w_len times.
w_offset = sy-index - 1.
if w_text+w_offset(1) eq SPACE.
translate w_text+sy-index(1) to upper case.
endif.
enddo.
write: w_text.</b>
‎2007 Apr 09 3:49 PM
‎2007 Apr 09 3:51 PM
Please, read my weblog -:)
<a href="/people/alvaro.tejadagalindo/blog/2006/12/21/does-abap-lacks-of-string-processing">Does ABAP lacks of String processing?</a>
Greetings,
Blag.
‎2007 Apr 09 3:52 PM
hi sathish,
u can use Translate stmt.
Translate str to uppercase.
Regards...
Arun.
Reward points if useful.
‎2007 Apr 10 4:58 AM
Hi..,
Execute this code.. its Working..
<b>parameters P_test(30) type c.
data w_word(30) type c.
data w_result(30) type c.
while P_test ne space.
split p_test at ' ' into w_word p_test.
translate w_word+1 to lower case.
translate w_word(1) to upper case.
condense w_word no-gaps.
concatenate w_result w_word into w_result separated by space.
endwhile.
WRITE W_RESULT.</b>
<i>****************************
Input : sai ramesh abap YASH
Output : Sai Ramesh Abap Yash
************************************</i>
regards,
sai ramesh
‎2007 Apr 10 5:09 AM
Hi,
check this code.
data:text(30).
DATA:LEN(2) TYPE N.
DATA:N(2) TYPE N,M(2) TYPE N.
text = 'ghjgahgf sgjfdshj hsdfkgj'.
N = 0.
LEN = STRLEN( TEXT ).
LEN = LEN - 1.
TRANSLATE TEXT+1(LEN) TO LOWER CASE.
translate text+0(1) to upper case.
DO LEN TIMES.
IF TEXT+N(1) = SPACE."SEARCHING FOR SPACES AND MAKING NEXT CHAR CAPITAL
M = N + 1.
TRANSLATE TEXT+M(1) TO UPPER CASE.
ENDIF.
N = N + 1.
ENDDO.
write:/ text.
regards,
bharat.