‎2006 Oct 18 12:10 PM
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.
‎2006 Oct 18 12:19 PM
Hi,
loop at s_bstkd .
<b> translate s_bstkd-low to lower case.
modify s_bstkd . </b> endloop.
Regards
amole
‎2006 Oct 18 12:13 PM
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
‎2006 Oct 18 12:14 PM
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.
‎2006 Oct 18 12:15 PM
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
‎2006 Oct 18 12:16 PM
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
‎2006 Oct 18 12:19 PM
Hi,
loop at s_bstkd .
<b> translate s_bstkd-low to lower case.
modify s_bstkd . </b> endloop.
Regards
amole
‎2006 Oct 18 12:23 PM
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