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 system table used in abap?

1078


What is the difference between upload and ws_upload ? : abap bdc

1181


How do you populate data into a multiple line field?

1003


What are the classifications of the sap abap data classes?

1071


Program lines for the radio button selection and unabling some input variables in section screen

1369


If a table that is to be extended contains a long field, we cannot use append structures why? : abap data dictionary

1112


What are the contents in technical specifications?

1104


What is the t-code for transaction recorder? : abap bdc

1022


Can we create an abap program without using y or z?

1053


What are function modules?

1019


Explain what is an rfc?

1047


I just wanted to know that when I am recruiting somebody, I am generating his personal no also. Then I want to give him training also. Now I just want to create 2 scenarios to clear my doubts? : sap abap hr

946


What are the kinds of foreign key fields?

1026


What is the bapi?

1095


What is a function group? : abap modularization

1018