‎2007 Mar 20 12:49 PM
Hi,
I want to write a query is such a way that first 4 characters are distinct for given fields in a table. Only the first found instances should return.
Ex:
PORD100-1
PORD100-2
PORD200-1
INVC200-345
INVC200-789
The select query should return following since I am comparing only first four chracters i.e PORD and INVC in my case.
PORD100-1
INVC200-345
‎2007 Mar 20 12:55 PM
Hi,
this code will surely help u try this.
select single field1 from <db table> into i_field1.
write:/ i_field1.
select single field1 from <db table> into j_field1 where field11(4) <> i_field11(4).
write:/ j_field1.
regards,
bharat.
‎2007 Mar 20 12:55 PM
Hi!
You can do it in an ABAP program (SE38), checking the first 4 characters, with a synatx like this: field(4).
In query (SQ01) you shall insert an ABAP code with the syntax I showed above.
Regards
Tamá