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: 

How to Translate all ALV Output Columns from Lower to Upper Case

Former Member
0 Kudos

Hi all,

I have around 50 Columns of ALV output ( Displaying using GRID Function Module ).

Now i need to Translate all the Output from Lower case to Uppercase at a Time.

How to Solve this Issue.

Points Rewarded.

Regards,

N.L.

1 ACCEPTED SOLUTION

hymavathi_oruganti
Active Contributor

while passing data to itab itself, pass by translating

LOOP AT ITAB TO WA.

TRANSLATE WA-FIELD1 TO UPPERCASE.

MODIFY ITAB FROM WA.

ENDLOOP.

9 REPLIES 9

Former Member
0 Kudos

I don't think there is any straight forward way of doing this. You will have to convert the data in the internal table before displaying.

Regards,

Ravi

Former Member
0 Kudos

Hi Narayana,

There is now to translate output from Lower case to Upper case at a time. You cant do this with FM attributes. To do this, you need to convert all fields in internal table to UPPER CASE and build field catalog.

I hope this may solves your problem.

Thanks,

Vinay

former_member188685
Active Contributor
0 Kudos

Hi,

try to set the flag lowercase for all the fields fieldcat-LOWERCASE = 'X' or SPACE.

Regards

vijay

0 Kudos

The lowercase flag in the field catalog is to allow lowercase letters . Not for converting the data.

Regards,

Ravi

0 Kudos

Hi

I already triedout this Option.

But it is not working for me.

Regards,

N.L.

0 Kudos

Then u can LOop at the output table and convert the lowercase to uppercase using

<b>

TRANSLATE wa1 TO UPPER CASE.

</b>

within the loop.

Try this will help.

Former Member
0 Kudos

In fieldcatalog <b>lvc_s_fcat</b> there is a field called <b>LOWERCASE</b> mark this field to 'X' thsis wont allow lower case letters.

Lowercase letters allowed/not allowed.

Hope this solves ur problem.

hymavathi_oruganti
Active Contributor

while passing data to itab itself, pass by translating

LOOP AT ITAB TO WA.

TRANSLATE WA-FIELD1 TO UPPERCASE.

MODIFY ITAB FROM WA.

ENDLOOP.

former_member331934
Participant
0 Kudos

here is an example code

.

.

.

DATA: gt_sat TYPE TABLE OF ty_sat.
DATA: wa_sat TYPE ty_sat.

.

.

.

FORM Catalog.

REFRESH fieldcat.

.

.

.

fieldcat-fieldname = 'EKNAM'.
fieldcat-seltext_m = 'purchaser'.
fieldcat-col_pos = 4.
fieldcat-outputlen = 40.
fieldcat-edit = 'X'.

LOOP AT gt_sat INTO wa_sat.
TRANSLATE wa_sat-eknam TO UPPER CASE.
MODIFY gt_sat FROM wa_sat.
ENDLOOP.

APPEND fieldcat TO fieldcat.
CLEAR fieldcat.

ENDFORM.