RequirementGet the data from database with irrespective of case …For example :Go to LFA1 tableGive input likeClick on exec...
We got the data …But give same input text like this ..
Now Press on Execute(F8)
We got an success message like “No table entries found for specified key”….But the table is actually having the data…Becau...
TRANSLATE p_name1 to upper case.EXEC SQL.SELECT * FROM lfa1 INTO :wa_lfa1       WHERE upper(NAME1) LIKE :p_name1 ENDEXEC.I...
Case 1 :
Case 2 :
Case 3 :
I hope you people have understood…Thank you all…anil.neegineni@gmail.com
Irrespective of case get the data from database in sap
Irrespective of case get the data from database in sap
Irrespective of case get the data from database in sap
Upcoming SlideShare
Loading in …5
×

Irrespective of case get the data from database in sap

2,569 views

Published on

if you want to get the data from sap ...if the field is case sensitive that kind of cases we can go for this way and fetch the data from database irrespective of case...

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,569
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Irrespective of case get the data from database in sap

  1. 1. RequirementGet the data from database with irrespective of case …For example :Go to LFA1 tableGive input likeClick on execute (F8)
  2. 2. We got the data …But give same input text like this ..
  3. 3. Now Press on Execute(F8)
  4. 4. We got an success message like “No table entries found for specified key”….But the table is actually having the data…Because of case sensitive it is showing that success messages instead of picking thedata from the database..For these kind of cases …If you want to get the data in any program or application from the databaseirrespective of case…We should follow the below code :parameters p_name1 type name1_gp obligatory.data wa_lfa1 type lfa1.replace all occurrences of * in p_name1 with %.
  5. 5. TRANSLATE p_name1 to upper case.EXEC SQL.SELECT * FROM lfa1 INTO :wa_lfa1 WHERE upper(NAME1) LIKE :p_name1 ENDEXEC.IF sy-subrc = 0. WRITE: / wa_lfa1-lifnr, wa_lfa1-name1, wa_lfa1-ort01.else. exit.ENDIF.After execution(F8)
  6. 6. Case 1 :
  7. 7. Case 2 :
  8. 8. Case 3 :
  9. 9. I hope you people have understood…Thank you all…anil.neegineni@gmail.com

×