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

Duplicate records

Former Member
0 Likes
850

Hi,

If ACCTN is not null or blank(ACCTN we get from table usr02)

then check for duplicate values for ACCTN field.

If duplicate values are found for ACCTN, get BNAME for each duplicate record and send error message u201CDuplicate ACCTN for BNAME xxxxxxx, BNAME xxxxxxxu201D to one ID.

canu plz suggest me..if possible can u provide coding part..

6 REPLIES 6
Read only

Former Member
0 Likes
802
Total Questions:  240 (168 unresolved)

And didn't you notice what happend to one of your todays thread?

Read only

0 Likes
802

Hello Amit,

but unfortunatelly he hasn't tested Rob's program.

Best regards

Stephan

Read only

GauthamV
Active Contributor
0 Likes
802

If you know the logic then whats the problem in writing code.

Note: If you SEARCH in SCN will get lot of information.

Read only

JanStallkamp
Advisor
Advisor
0 Likes
802

Hi.

The referee shows you the [Yellow Card|http://en.wikipedia.org/wiki/Penalty_card#Yellow_card].

If you aren't familiar with soccer: This means you are close to being forced to leave the field. Don't ask very basic questions in the forums. This is not the place to ask others to do your job!

Best regards,

Jan Stallkamp

Read only

Former Member
0 Likes
802

Hi Balu,

I couldnt understand whether you want to send the Message to some email ID or just want it to pop up on the screen where you execute this report. If it is the latter, try the following code. If you need to send a mail, let me know, will help you with the Function Module

**********************************************************************************************************

data: begin of t_usr02 occurs 0,

bname type usr02-bname,

accnt type usr02-accnt,

end of t_usr02.

data: bname1 type usr02-bname,

accnt1 type usr02-accnt,

mesg(100) type c.

select bname accnt from usr02 into corresponding fields of table t_usr02 where accnt ne space.

if sy-subrc = 0.

sort t_usr02 by accnt.

loop at t_usr02.

if accnt1 = t_usr02-accnt.

concatenate 'Duplicate ACCNT for BNAME :' bname1 ', BNAME :' t_usr02-bname into mesg.

message mesg type 'I'.

endif.

accnt1 = t_usr02-accnt.

bname1 = t_usr02-bname.

endloop.

else.

message 'No Entries Found' type 'S'.

endif.

**********************************************************************************************************

Regards,

Subhrangsu

Read only

0 Likes
802

Hello Subhrangsu,

from now on, I will post my client's specifications here and hope you'll do the work for me, too!

If you read the complete thread, you'll know, what I mean.

Best regards

Stephan