Application Development and Automation 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: 
Read only

SAP SCRIPT function for converting to lowercase or uppercase

Former Member
0 Likes
1,452

Hello,

Does anyone know an built-in function for printing fields in lower or uppercase with SAP SCRIPT

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,022

hi,

u can use PERFORM statement in the script and in the subroutine u can call the FM SWA_STRING_TO_UPPERCASE

do reward if it helps,

regards,

priya.

6 REPLIES 6
Read only

Former Member
0 Likes
1,022

Hi

You can call a subroutine from SAP SCRIPT, Inside the subroutine you can call a functionmodule to convert lower to upper or vice-versa.

Rgds,

Baburaj

Read only

Former Member
0 Likes
1,023

hi,

u can use PERFORM statement in the script and in the subroutine u can call the FM SWA_STRING_TO_UPPERCASE

do reward if it helps,

regards,

priya.

Read only

Former Member
0 Likes
1,022

Hi bernsen,

Use the paragraph formate which have the 'UPPER CASE' (outline attributes) is checked......

Regards,

Satya.

Read only

Former Member
0 Likes
1,022

hi,

Check this way..


  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.

Regards,

Santosh

Read only

Former Member
0 Likes
1,022

Hi Bernsen,

For all character fields which you want to display in SCRIPT, use a TRANSLATE statement to change to upper case in driver program and use these character fields in SCRIPT.

In Driver Program,

<b>TRANSLATE V_CHAR_FIELD TO UPPER CASE.</b>

In SCRIPTS,

<b>/: &V_CHAR_FIELD&</b>

Thanks,

Vinay

Read only

Former Member
0 Likes
1,022

It's clear to me.

For translating to uppercase i can use a outline field in paragraph format

for translatingt to lowercase i have to use a perform to a abap function.

Thanks