I need to compare two text fields during loading of data from a legacy system into an R/3 system. The content of the external fields are in upper case while the R/3 contains a mix of upper and lower case. The select is as follows:
SELECT SINGLE vkbur INTO (iall-vkbur)
FROM tvkbt WHERE bezei = iall-zvkbur_t
AND spras = 'E'.
With this select the sy-subrc is 4 because nothing is found. Is there a way to change the command the way that the select is independent from upper/lower case?
There is no ABAP way of doing this directly (though it may be possible using EXEC SQL, depending on your environment.) The solution I'd suggest would be to read the whole of tvbkt into an internal table of the same structure + an extra field to hold the uppercase version of vkbur. Loop through your table, translating to upper case.
Then use READ TABLE ... WHERE ... instead of the select single.
Dig Deeper on SAP ERP software
Related Q&A from Matthew Billingham
An SAP user is trying to run a report in an SAP ALV Grid online and wants to know how to get the data in the report to appear along with the header. Continue Reading
An SAP user needs to transfer customer purchase order spreadsheet data to SAP VA01 to create a new sales order. Continue Reading
An SAP user needs information on how to change the password on several SAP user accounts from a central location. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.