‎2009 Aug 31 7:05 AM
I want to pick only one entry of lifnr.
I am validating like this
start-of-selection.
select lifnr from lfm1.
at selection-screen on so_lifnr .
select single lifnr from lfm1 into so_lifnr where lifnr = so_lifnr-low.
if sy-subrc ne 0.
message E000(ZV) with so_lifnr.
endif.
it is shwoing no records for lifnr. ( but recors is existing in table )
similarly i wnat to do for so_lifne-high.
Thanks
‎2009 Aug 31 7:11 AM
Hi..
Use table LFA1 to validate the Vendor.. Not LFM1..
Regards
Ansari
‎2009 Aug 31 7:18 AM
i have to add field lfm1-ekorg. so m picking data first from lfm1 then corresponding records from bsik and then corresponding records from lfa1.
‎2009 Aug 31 7:22 AM
Hi,
Try like this,
tables: LFM1.
at selection-screen on so_lifnr-low .
select single lifnr from lfm1 where lifnr = so_lifnr-low. " Remove the into so_lifnr clause
if sy-subrc ne 0.
message E000(ZV) with so_lifnr.
endif.
at selection-screen on so_lifnr-high .
select single lifnr from lfm1 where lifnr = so_lifnr-high.
if sy-subrc ne 0.
message E000(ZV) with so_lifnr.
endif.
Regards,
Vikranth
‎2009 Aug 31 7:34 AM
Hi,
Your INTO clause contains so_lifnr -> which is your select option.
Try to use some other structure with a different name in the INTO clause.
select single lifnr from lfm1 into wa_lifnr where lifnr = so_lifnr-low.
‎2009 Aug 31 7:35 AM
i excuted like this it is working fine check this code
TABLES LFM1.
DATA : BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFM1-LIFNR,
END OF ITAB.
SELECT-OPTIONS SO_LIFNR FOR LFM1-LIFNR.
START-OF-SELECTION.
SELECT LIFNR FROM LFM1 into table itab.
AT SELECTION-SCREEN ON SO_LIFNR .
SELECT SINGLE LIFNR FROM LFM1 INTO SO_LIFNR WHERE LIFNR = SO_LIFNR-LOW.
IF SY-SUBRC NE 0.
MESSAGE E000(ZV) WITH SO_LIFNR.
ENDIF.
‎2009 Sep 03 6:58 AM