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

Upper case

Former Member
0 Likes
864

Hi gurus,

I am getting a file which has material no. and plant and I just want to convert that material in upper case, and only the first letter of the plant in upper case. can you please tell me how to do that.

Rajeev

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
841

Do F1 on ABAP keyword TRANSLATE.

Rob

6 REPLIES 6
Read only

Former Member
0 Likes
842

Do F1 on ABAP keyword TRANSLATE.

Rob

Read only

0 Likes
841

Hi Rob,

Thanks for the reply, well I did use that Translate key word and it worked too, I used the following code:

loop at it_input_file.

TRANSLATE it_tab-matnr TO UPPER CASE.

endloop.

but what it is doing right now is it will transalte the material no. to upper case but as soon as I am out of the loop it shows me the same old material. I mean basically its not saving the changes.

Thanks

Rajeev

Read only

0 Likes
841

Well, you have to MODIFY the internal table:

LOOP AT it_input_file.
  TRANSLATE it_tab-matnr TO UPPER CASE.
  MODIFY it_input_file.        "<========
ENDLOOP.

Rob

Read only

0 Likes
841

Hi Rob, the problem is solved. But now I want to assign you the reward points but I can't see the option, don't know why?

I have one more small question what does it mean when sy-subrc returns '4'.

Thnaks

Rajeev

Read only

0 Likes
841

The point system (for the forum only) has been down for a while. Don't know when it'll be back.

SY-SUBRC = 4 means different thing in different circumstances. What were you doing when you got it.

Rob

Read only

Former Member
0 Likes
841

Hi

Do like this .

data name type char10 .

name = 'praveen' .

TRANSLATE name+0(1) TO UPPER CASE. .

write name .

Thanks.

Praveen