11-21-2007 12:08 PM
Hi,
Again question
In the table BSIS there is in field ZOUNR populated with the same value a few times.
I would like to select unique records. and check them in the another table.
The result of the select centence below is, that I get multiple lines for one record. How to enter the select sentence just for unique records?
SELECT * FROM BSIS INTO LW_BSIS
WHERE ( HKONT IN HKONT ) AND
( AUGBL IN AUGBL ).
IF SY-SUBRC = 0.
MOVE-CORRESPONDING lw_bsis TO INT.
ENDIF.
SELECT * FROM EKPO INTO LW_EKPO
WHERE ( EBELN EQ LW_BSIS-ZUONR+0(10) ) AND
( EBELP EQ LW_BSIS-zuonr+10(5) ).
IF SY-SUBRC = 0.
MOVE-CORRESPONDING LW_EKPO TO INT.
ENDIF.
ENDSELECT.
ENDSELECT.
11-21-2007 12:14 PM
11-21-2007 12:16 PM
11-21-2007 12:18 PM
Hi Saso,
Instead of using
SELECT * FROM BSIS INTO LW_BSIS
WHERE ( HKONT IN HKONT ) AND
( AUGBL IN AUGBL ).
SELECT DISTINCT * FROM BSIS INTO LW_BSIS
WHERE ( HKONT IN HKONT ) AND
( AUGBL IN AUGBL ).
If it is helpfull pls reward pts.
Regards
Srimanta
11-21-2007 12:18 PM
Hi...
SELECT <OTHER FIELDS FROM BSIS> DISTINCT(ZOUNR) FROM BSIS
WHERE <CONDITION>.
<b>reward if Helpful.</b>
11-21-2007 1:29 PM
I found the solution, your replys desn't work.
This is a solution for this.
SORT INT by ZUONR.
DELETE ADJACENT DUPLICATES from int COMPARING ZUONR.
11-21-2007 1:30 PM
I found the solution, your replys desn't work.
This is a solution for this.
SORT INT by ZUONR.
DELETE ADJACENT DUPLICATES from int COMPARING ZUONR.
11-21-2007 2:10 PM
I found the solution, your replys desn't work.
This is a solution for this.
SORT INT by ZUONR.
DELETE ADJACENT DUPLICATES from int COMPARING ZUONR.