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

Displaying Message

Former Member
0 Likes
559

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.

4 REPLIES 4
Read only

Former Member
0 Likes
529

therse must be duplicate entries for which you must have coded 'delete adjacent duplicates' that's y entries number is not matching.

regds

anjali

Read only

Former Member
0 Likes
529

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

Read only

Former Member
0 Likes
529

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

Read only

Former Member
0 Likes
529

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