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

case-insensitive

Former Member
0 Likes
1,294

Hi All,

In Select-options i have a field batkd(po number).

Based on this bstkd i am retieving data from 4 tables.

SELECT-OPTIONS: s_bstkd FOR vbkd-bstkd,

but the problem is :

In data base one record is existing for this condition but the bstkd is the lower case in database.when i give in upper case in the select options it is not retrieveing the record

Can any body give me solution to ignore the case.

Thanks in Advance.

Thanks&Regards.

Ramu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,106

Hi,

loop at s_bstkd .

<b> translate s_bstkd-low to lower case.

modify s_bstkd . </b> endloop.

Regards

amole

6 REPLIES 6
Read only

Former Member
0 Likes
1,106

Hi,

the field vbkd-bstkd has got a check for lower case. so u need to give the values in lower case.

or u can do one change the values to lower case and modify the select options.

Madhavi

Read only

Former Member
0 Likes
1,106

logic should be written to change this value to lowercase, eventhough when we are giving it in uppercase,

make it always to lowercase, so that it will not create any problem in fetching records.

Read only

Former Member
0 Likes
1,106

Hi Ramu,

Is this the only select-option?

If there are other select-options, get the data based on the other select options.

Then loop at the internal table.

loop at itab.

translate itab-bstkd to upper-case.

modify itab index sy-tabix.

endloop.

loop at itab where bstkd in s_bstkd.

move-correspoding itab to itab_final.

append itab_final.

clear itab_final.

endloop.

itab_final will have the required records.

Regards,

ravi

Read only

Former Member
0 Likes
1,106

Hi Ramu,

loop at table VBKD there is an field BSTKD_M in upper letters.

Make your selection on this field.

Regards, Dieter

Here a short Code:

REPORT ZGRO_TEST.

*

TABLES: VBKD.

*

SELECT-OPTIONS: S_BSTKDM FOR VBKD-BSTKD_M.

*

BREAK-POINT.

*

SELECT * FROM VBKD WHERE BSTKD_M IN S_BSTKDM.

WRITE: / VBKD-VBELN, VBKD-BSTKD, VBKD-BSTKD_M.

ENDSELECT.

Redards, Dieter

Message was edited by: Dieter Gröhn

Read only

Former Member
0 Likes
1,107

Hi,

loop at s_bstkd .

<b> translate s_bstkd-low to lower case.

modify s_bstkd . </b> endloop.

Regards

amole

Read only

venkata_ramisetti
Active Contributor
0 Likes
1,106

Hi,

The BSTKD value in the table VBKD is case-sensitive as per the Data definition in the Data Dictionary.

So the table field may contain either lower case or upper case or mix of these. It is totally depends upon your data entered by users.

So better not to convert this case. You have to the parameter value that exists in the data base.

If your entire data for VBKD-BSTKD is in uppercase , then you want to convert the parameter, you can do it in the AT SELECTION-SCREEN event.

AT SELECTION-SCREEN.

LOOP AT S_BSTKD.

TRANSLATE S_BSTKD-LOW TO UPPER CASE.

TRANSLATE S_BSTKD-HIGH TO UPPER CASE.

MODIFY S_BSTKD.

ENDLOOP.

Hope this help you.

Ramakrishna