Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to find only duplicate records from table ?

Answer Posted / sunil kumar gautam

In my code it is consider that duplication is checked on
the basis of empcd field of emp table.

REPORT ZTESTDUP.
types:begin of ty_du,
EMPID type ZEMP_ASHU_SUNIL-EMPID ,
EMPCD type ZEMP_ASHU_SUNIL-EMPCD,
EMPNM type ZEMP_ASHU_SUNIL-EMPNM,


end of ty_du.

Data: IT_du type standard table of ty_du,
Wa_du type ty_du.


select * INTO CORRESPONDING FIELDS OF TABLE IT_DU
from ZEMP_ASHU_SUNIL.

data: i type I.


data:IT_final type table of ty_du,
wa_final type ty_du.

loop at IT_DU into WA_DU.
i = 0.

loop at IT_DU into WA_DU where empcd = WA_DU-
empcd.

i = i + 1.

endloop.
if i = 2.
wa_final-empid = WA_DU-empid.
wa_final-empcd = WA_DU-empcd.
wa_final-empnm = WA_DU-empnm.
append wa_final to it_final.
clear wa_final.

endif.


endloop.

In above code final internal table contains duplictae data.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the basic objects of the data dictionary?

1074


what is difference between user exit, customer exit and badi?

5288


Different types of luws. What are they?

1252


Explain the disadvantage of using exec sql statement in abap?

1042


Why lsmw does not support call transaction method? : abap bdc

1158


Which FM do you use to find out who is reporting to whom

5860


send coding to write a program to create customer quotation using BAPI 'BAPI_QUOTATION_CREATEFROMDATA2/BAPI_QUOTATION_CREATEFR OMDATA'

2895


any one can tell me which is the tables can store in ddic plese dont say db02l,please give me different ways of resideing the tables ?

2536


What is the use of the statement leave to list-processing?

1044


Normally how many and what files get created when a transaction program is written? what is the XXXXXTOP program?

1162


Hi my dear friends,Please give the answers for the following link http://www.saptechnical.com/InterviewQ/interviewQ.htm

2213


How do you send files to the legacy systems from sap and vice versa? How does one know that the legacy files have come on to the sap server you are working on? : abap bdc

1135


Hat are the different types of mode (run code) in call transaction method?

1168


How to convert normal function module to bapi?

2110


foreign key enforcement?

2155