‎2006 Dec 12 8:37 AM
Hi,
Could u pls tell me what is the error here
select * from lfa1 into table lt_lfa1 where lifnr in s_lifnr.
if sy-subrc = 0.
*processing
endif.
Here my sy-subrc is 4 while debugging.
could u suggest me pls.
‎2006 Dec 12 8:39 AM
hi Salil,
Checkc out whether there exists any record for the selection screen entry in LFA1 table using SE11 or SE16 T-Code ..
Regards,
Santosh
‎2006 Dec 12 8:39 AM
Can you check via transaction SE16 if you have any entries for the Vendors in the selection criteria???
Kind Regards
Eswar
‎2006 Dec 12 8:40 AM
‎2006 Dec 12 8:40 AM
Hi,
Check in db table(use SE16),the value you are providing for s_lifnr in selection screen exists in table.
‎2006 Dec 12 8:40 AM
Hi,
If sy-subrc is 4 then there is no data for the condition you are checkiing for.
That can only be the problem with your query. As it seems ok with syntax.
Regards,
Sesh
‎2006 Dec 12 8:43 AM
Hi Salil ,
I feel there must be no data for your set of input.
Regards
Arun
‎2006 Dec 12 8:43 AM
hi salil,
1 ) check ur data base , that any data is avialable.
2) check ur where condition.
your statement is syntactically correct
rgds
anver
‎2006 Dec 12 8:54 AM
Hi salil
Is the given LIFNR is valid? i mean ur ilfnr number is stored in the database? pls check and run, no problem in ur query, just check ur input
‎2006 Dec 12 9:30 AM
in db table there is record.
i don't know why it is happened. While debugging I found the value of sy-subrc = 4.
In se16 while executing the db table for same criteria (as mentioned in where clause) there is some value.
Could u pls suggest me.
‎2006 Dec 12 9:43 AM
Hi Salil ,
Could you please tell how you have declared s_lifnr.
Regards
Arun
‎2006 Dec 12 9:49 AM
Salil
Have u declare like below?
SELECTION-SCREEN BEGIN OF BLOCK Pur_Blk WITH FRAME.
SELECT-OPTIONS: s_lifnr FOR ekko-lifnr,
SELECTION-SCREEN END OF BLOCK Pur_blk.
select single name1 into vennam from lfa1
where lifnr = s_lifnr and
spras = 'EN'.
write 😕 vennam.
Try this, may eb a small problem in that. What is the value passed in ur s_lifnr field while debugging?
‎2006 Dec 12 9:36 AM
hi,
try this.
Loop at s_lifnr. " Selection Filed
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_lifnr-LOW
IMPORTING
output = s_lifnr-LOW.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = s_lifnr-HIGH
IMPORTING
output = s_lifnr-HIGH.
Modify s_lifnr index sy-TABIX.
ENDLOOP.select * from lfa1 into table lt_lfa1 where lifnr in s_lifnr.
if sy-subrc = 0.
*processing
endif.rgds
Anver
‎2006 Dec 12 9:45 AM
Hello,
The SELECT statement sets sy-subrc to 4 if the result set is empty, that is, if no data was found in the database.
Regards,
Shehryar Dahar
‎2006 Dec 12 10:03 AM
Hi,
Try to enter the same lifnr value in both the selection screen and SE16.
If it has zero's before numeric value,enter as it is in database.
If you are entering 16 and if db table contains 00..16,then sy-subrc eq 4.
‎2006 Dec 12 10:17 AM
Hi,
check your database table.
just send the complete code...s
Thanks
Vikranth Khimavath