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

Data Element LFSNR

Former Member
0 Likes
1,245

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,179

Hello,

Pls check the condition you are passing in the SELECT statement...is it like a703 then try to make A703...

Thanks.

Read only

0 Likes
1,179

Hi

That's what I did, but same result - no result

regards

yuval

Read only

0 Likes
1,179

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).

Read only

0 Likes
1,179

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

Read only

0 Likes
1,179

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

Read only

0 Likes
1,179

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

Read only

0 Likes
1,179

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

Read only

prakashjasti
Contributor
0 Likes
1,179

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.

Prakash J
Read only

0 Likes
1,179

I'm curious to know the difference!