Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module

former_member225631
Active Contributor
0 Kudos

Hi,

Is there any function module available to change a string (upper or lower)

into sentence case. Thanks in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

check this Fm

STRING_UPPER_LOWER_CASE

Reragds,

vijay

6 REPLIES 6

Former Member
0 Kudos

check this Fm

STRING_UPPER_LOWER_CASE

Reragds,

vijay

0 Kudos

check the fm<b> SWA_STRING_TO_UPPERCASE</b>

set this parameter PRESERVE_EXISTING_CAPITALS = SPACE

0 Kudos

This FM SWA_STRING_TO_UPPERCASE produces exact result. Thanks.

Former Member
0 Kudos

Check

<b>STRING_UPPER_LOWER_CASE</b>


  DATA: DELIM(40) TYPE C VALUE ' '.
  DATA: CON_ANREX LIKE Q0002-ANREX.
 
  CALL FUNCTION 'STRING_UPPER_LOWER_CASE'
       EXPORTING
            DELIMITER = DELIM
            STRING1   = RECORD-ANREX
       IMPORTING
            STRING    = CON_ANREX
       EXCEPTIONS
            NOT_VALID = 1
            TOO_LONG  = 2
            TOO_SMALL = 3.
 
  IF SY-SUBRC EQ 0.
    RECORD-ANREX = CON_ANREX.
  ENDIF.

former_member181962
Active Contributor
0 Kudos

Try this:

STRING_UPPER_LOWER_CASE

REPORT ZRTTEST.

data string(50).

CALL FUNCTION 'STRING_UPPER_LOWER_CASE'

EXPORTING

delimiter = ' '

string1 = 'this is for test'

IMPORTING

STRING = STRING

EXCEPTIONS

NOT_VALID = 1

TOO_LONG = 2

TOO_SMALL = 3

OTHERS = 4

.

write:/ string.

Regards,

ravi

Message was edited by:

Ravi Kanth Talagana

Former Member
0 Kudos

STRING_UPPER_LOWER_CASE