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

Select statement

Former Member
0 Likes
625

select single lifnr from lfa1 into ZZINFO-LIFNR

where sortl EQ ZINFO_COND_RECORD-LIFNR.

I am not able to get the value .

sortl value is CJ-PO issu

But If I physically looking at the DB LFA1 then I am able to get the value.

Any ideas why I am not able to find out?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
606

Check the field ZINFO_COND_RECORD-LIFNR may not be having value before passing to LFA1.

I wonder LIFNR in ZINFO_COND_RECORD is correct?

5 REPLIES 5
Read only

Former Member
0 Likes
606

I don't suggest that you post the whole code, but if we could see the variables used being declared and assigned to values, perhaps we'll understand why it's failing.

Read only

0 Likes
606

I am checking in the debugger and there is value for it though.

Edited by: mark_yellow mark on Aug 20, 2008 1:43 AM

Read only

Former Member
0 Likes
607

Check the field ZINFO_COND_RECORD-LIFNR may not be having value before passing to LFA1.

I wonder LIFNR in ZINFO_COND_RECORD is correct?

Read only

Former Member
0 Likes
606

Hi,

U mean the value of ZINFO_COND_RECORD-LIFNR = 'CJ-PO'.

If it is so, then check..

1. whether sy-subrc = 0.

2. If sy-subrc = 0, then check how many records are there in LFA1 table for that condition.. Because while using Select single statement, If u have more than 1 record for that condition, it will take the first record. So there might be the difference.

Regards,

Prem.

Read only

Former Member
0 Likes
606

Hi Mark,

Also cross check the value getting stored in the variable

sortl. If you are assigning the value as a constant, see to it

that the value is enclosed in quotes say, 'CJ-PO'.