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 conversion

Former Member
0 Likes
550

Hi,

Here is my code..

SELECT addrnumber name1 city1 FROM adrc INTO TABLE i_adrc

WHERE name1 IN r_name1 AND city1 IN r_city1.

after this select statement i am getting only few records the data for the field name1 is maintained in uppercase and some lowercase. I need to convert the whole data in the database to lowercase befre i ececute the select statement. Based on this data i need to pick the data as below.

IF i_adrc IS NOT INITIAL.

SELECT kunnr adrnr brsch bran1 land1 INTO TABLE i_kna1

FROM kna1 FOR ALL ENTRIES IN i_adrc

WHERE adrnr = i_adrc-addrnumber AND

brsch IN r_brsch AND

bran1 IN r_braco AND

land1 IN r_land1.

Even here i need to convert the database data to lowercase before my select statement excutes.

regards,

Ram

4 REPLIES 4
Read only

Former Member
0 Likes
494

What is your question Ram?

Read only

0 Likes
494

To convert ADRC-name1 data to lowercase before my select statement executes.

Regards,

Ram.

Read only

Former Member
0 Likes
494

Hi Ram,

SELECT addrnumber name1 city1 FROM adrc INTO TABLE i_adrc

WHERE name1 IN r_name1 AND city1 IN r_city1.

<b>LOOP AT I_ADRC.

TRANSLATE I_ADRC-NAME1 to LOWER CASE.

MODIFY I_ADRC.

ENDLOOP.</b>

IF i_adrc IS NOT INITIAL.

SELECT kunnr adrnr brsch bran1 land1 INTO TABLE i_kna1

FROM kna1 FOR ALL ENTRIES IN i_adrc

WHERE adrnr = i_adrc-addrnumber AND

brsch IN r_brsch AND

bran1 IN r_braco AND

land1 IN r_land1.

ENDIF.

Similarly you can change the required fields to lower case or upper case.

For upper case :

TRANSLATE I_ADRC-NAME1 to UPPER CASE.

Best regards,

Prashant

Pls. mark points for helpful answers

Read only

Former Member
0 Likes
494

Hi,

For getting the entire content modify your select option append '*' at start and end of data . This will take care of fetching all the data.

eg : select-option-low = Xyz.

Hope this helps.