‎2010 Mar 07 12:31 PM
Hi
In a table we defined we have added a field of type LFSNR.
We have put in a value the is not numerical but starts with a letter say: A103.
Now when we try to run a select statement on this field we receive no results.
My question: if LFSNR is defined a c(16) why can't we run our select statement?
Thank you for your help
kind regards
yuval peery
‎2010 Mar 07 12:47 PM
Hello,
Pls check the condition you are passing in the SELECT statement...is it like a703 then try to make A703...
Thanks.
‎2010 Mar 07 12:49 PM
Hi
That's what I did, but same result - no result
regards
yuval
‎2010 Mar 07 3:36 PM
Use SE16 and try until it works. I think you'll then understand why your program doesn't work. If you still don't understand, could you paste your SELECT (and necessary statements so that we can understand).
‎2010 Mar 08 5:12 AM
Hi Sandra
I am using SE16 and entering LFSNR From a* To Z*, but the system returns "No entries found".
I also tried to run a select statment my self and but I keep getting no result sets back.
Thank you
yuval
‎2010 Mar 08 7:23 AM
Hi,
I have few records in my table ZMSFHEAD but when i pass one of the values to in my program it is showing
sy-subrc = 4.
in SE16 it is showing values for the same. So i tried it like this.
DATA : itab TYPE TABLE OF zmsfhead WITH HEADER LINE.
SELECT * FROM zmsfhead
INTO TABLE itab
WHERE dcno like 'Y/EI9%'. " Instead of passing direct value i am using WildCard and it is giving the Values into ITAB.
" Just try this it might be useful to you.
IF sy-subrc = 0.
ENDIF.Cheerz
Ram
‎2010 Mar 08 7:35 AM
Hi Yuval,
I tried following code and it works for XBLNR field. I hope this is what you are trying to do.
TABLES : PPDHD.
DATA : gt_PPDHD TYPE STANDARD TABLE OF PPDHD,
gw_PPDHD TYPE PPDHD.
CLEAR : gw_PPDHD, gt_PPDHD.
gw_PPDHD-DOCNUM = '101'.
gw_PPDHD-XBLNR = 'CJ102'.
INSERT PPDHD FROM gw_PPDHD.
SELECT * FROM PPDHD INTO TABLE gt_PPDHD WHERE xblnr = 'CJ102'.
LOOP AT gt_PPDHD INTO gw_PPDHD.
WRITE : gw_PPDHD.
CLEAR : gw_PPDHD.
ENDLOOP.
Hope this helps.
Regards,
Chandravadan
‎2010 Mar 08 9:30 AM
in SE16, enter only ZZZ in the TO field (leave FROM blank). Don't you get your line?
By the way, if your system is ASCII and your field accepts lower case, selecting from a* to Z* (why do you enter *?) would return nothing as "a" is greater than "Z" because the sequence in ASCII is ... 0 to 9 ... A to Z ... a to z ...
Edited by: Sandra Rossi on Mar 8, 2010 10:31 AM
‎2010 Mar 16 10:03 AM
Instead of this
SELECT * FROM PPDHD INTO TABLE gt_PPDHD WHERE xblnr = 'CJ102'.
Try like this.
SELECT * FROM PPDHD INTO TABLE gt_PPDHD WHERE xblnr LIKE 'CJ102'.
SELECT * FROM PPDHD INTO TABLE gt_PPDHD WHERE xblnr EQ 'CJ102'.
Regards,
Prakash.
‎2010 Mar 16 10:39 AM