‎2007 May 03 6:46 AM
i'm giving input as Flat file. it contains 53 Personal Numbers, but there are entries for 47 Numbers. After writing Select Query How can i display a message that these numbers doesn't contain records.
Can anyone Suggest.
‎2007 May 03 6:49 AM
therse must be duplicate entries for which you must have coded 'delete adjacent duplicates' that's y entries number is not matching.
regds
anjali
‎2007 May 03 6:49 AM
1. Upload the data in flat file to internal table ITAB1 using GUI_UPLOAD
2. store the 53 numbers in ITAB2 using select query
sort itab1 by pernr.
loop at itab2.
read table itab1 with key perne eq itab2-pernr binary search.
if sy-subrc eq 0.
else.
message i001(ZZ) with itab2-pernr.
endif.
endloop.Message was edited by:
Chandrasekhar Jagarlamudi
‎2007 May 03 6:51 AM
Hi,
If the Personel Number is having records then the Select query return SY-SUBRC = 0. if there is no record existed then the SY-SUBRC will become 4. so based on this SY-SUBRC you can give the message.
When ever the SY-SUBRC returns 4, then move those records to a Internal table, then loop that Internal table and Display those records
Regards
Sudheer
‎2007 May 03 7:13 AM
Hi Vamsi,
First upload the file into internal table itab1 using FM 'gui_upload'.
take another table itab2 having same structure as itab1.
loop at itab1.
select single pernr from P0003 into i_tab2 where pernr = itab1-pernr.
if sy-subrc <> 0.
message e0001.
else append itab2.
endif.
endloop.
e0001-these numbers doesn't contain records.
Reward points if helpful.
Regards,
Hemant