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

conversion upercase and lower case prob

Former Member
0 Likes
1,253

hi experts.

i am facing a problem, such that,

i have likp-traid(truck no)

likp-erdat in selection screen, both are select-options.

i made select from likp with respect to likp-traid(truck no)

likp-erdat in selection screen,( both are select-options).

based on that i made for all entries in vttk with respect to likp-traid = vttk-signi.

but likp-traid have value in caps (say, WB-32, WB32)

vttk has also the above values , but in lower case(say. wb32,wb-32),

thats why for all entries failed,

how to convert those uppercase to lower case?plz help

11 REPLIES 11
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,217

Hello,

Use TRANSLATE TO LOWER CASE.

BR,

Suhas

Read only

Former Member
0 Likes
1,217

hello ,

thanks for ur answer,

but i need to clarify that , my internal table it_likp-traid has multiple values,

how can i convert those vvalues to 'text' , which must be type char,

to use translate statement

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,217

Hello Rajdeep,

I will ask you not to select data from VTTK using LIKP-TRAID.

Can you share your code with us? May be then we can help you out.

Suhas

Read only

Former Member
0 Likes
1,217

Hi,

See the following code.

Hope this will help u.

TABLES: likp.

types: BEGIN OF x_a,

traid type likp-traid,

END OF x_a.

DATA: it_a TYPE STANDARD TABLE OF x_a,

wa_a like LINE OF it_a.

DATA: it_a1 TYPE STANDARD TABLE OF x_a,

wa_a1 like LINE OF it_a.

DATA: str(20) TYPE c.

select-OPTIONS: van FOR likp-traid LOWER CASE .

SELECT traid from likp into TABLE it_a WHERE traid in van.

LOOP AT it_a INTO wa_a .

str = wa_a-traid.

TRANSLATE str to LOWER CASE.

wa_a1-traid = str.

APPEND wa_a1 to it_a1.

ENDLOOP.

LOOP AT it_a1 INTO wa_a1 .

WRITE:/ wa_a1-traid.

endloop.

Thanks.

Read only

Former Member
0 Likes
1,217

Hi,

You can do it through using TRANSLATE.

TRANSLATE "text" to LOWER CASE.

Hope it helps,

Thanks & Regards

Read only

Former Member
0 Likes
1,217

hi

frm ur post i assum u r 1st selecting data frm likp n den for all the netires inlikp u get data frm vttk.. so once u get data frm likp before goin to vttk loop on likp selection and use translate to uppercase on tht perticular field n update ur likp table n den go for vttk

if its other way round u can still use the same sequesnce for the respective tables

Read only

Former Member
0 Likes
1,217

Hi,

Use TRANSLATE "text" to LOWER CASE.

Regards,

Phani.

Read only

Former Member
0 Likes
1,217

Hi....

For your issue.....

based on that i made for all entries in vttk with respect to likp-traid = vttk-signi.
but likp-traid have value in caps (say, WB-32, WB32)
vttk has also the above values , but in lower case(say. wb32,wb-32),
thats why for all entries failed,

The solution is ...

Based on the select options the records are retrieved from the table likp. Move those records to the internal table say it_table.

Loop at it_table into the wa_table.  " wa_table is the work area for the internal table it_table.
transcalte wa_table -traid to lower case.
endloop.

now you can select the records from the table vttk using the option for all entries in the

above internal table, in which you have translated them to lower case.

So now your retrieval of records will be successful.

Hope this helps you much,

Thanks and regards

Bhuvana.

Read only

Former Member
0 Likes
1,217

you try this FM to translate to uppercase.

Example,

CALL FUNCTION '2054_TRANSLATE_2_UPPERCASE'

EXPORTING

I_STRING = P_V_TEXT

IMPORTING

E_STRING = P_V_TEXT

To translate to lowercase,

TRANSLATE adrc-name1 TO LOWER CASE.

Regards,

Joan

Read only

Former Member
0 Likes
1,217

Hi

use this function module

TERM_TRANSLATE_TO_UPPER_CASE

Read only

Former Member
0 Likes
1,217

i have done it success fully with all of urs help message,

this fm convert lower case tp upper

TERM_TRANSLATE_TO_UPPER_CASE

but i needed the reverse one,

i did it in this way,

loop at it_likp.

it_main-text = it_likp-traid.( declare text type string)

translate it_main-text to lower case.

endloop.