Hi All ,
I have a requirement . Below is the type of data i have .
charg vbeln matnr 1) 1000 80092938 xyz 2) 1000 80092938 pqr 3) 1000 80092900 mno 4) 2000 728947872 yhg
.......
I have such records . need to find such records where value of charg are same but differnt vbeln .
for example : record no. 1 is required case as record 1 and 3 have same charg but different vbeln .
how to find such record ?
Below is the code i have what more to be added to set flag for this special record .
LOOP AT i_xy ASSIGNING <gs_xy> .
* Reading the internal table with batch as key field
READ TABLE i_xy1 ASSIGNING <gs_xy1> WITH KEY
out_charg = <gs_xy>-out_charg .
* Assigning record no. from which the read is successful
index = sy-tabix .
LOOP AT i_xy1 INTO <gs_xy1> FROM index .
IF sy-subrc EQ 0 .
* Reading the internal table with batch as key field
READ TABLE i_xy1 ASSIGNING <gs_xy1> WITH KEY
out_charg = <gs_xy>-out_charg .
*this below flag should be set on receiving such records
* more logic required i cant use on change of as it is obsolete
gd_batch_rep = 'Y'.
ENDIF .
* ENDIF .
ENDIF .
ENDIF .
ENDLOOP .
ENDLOOP .