RavCOder
4th September 2019, 10:05
Hi,
I created this thread to know how don't have duplicate value in a display session.
I created a session that displays some value (business partner in table tdsls400), but I don't know how "delete" duplicate value.


declaration:

table ttdsls400
string old.ofbp
**********MAIN TABLE SECTION**************
main.table.io:
after.read:
if old.ofbp = tdsls400.ofbp then
skip.io("")
else
old.ofbp = tdsls400.ofbp
endif
*********FUNCTION SECTION**********
functions:
function view_data()
{
select tdsls400.ofbp , tdsls400.orno
from tdsls400
selectdo
endselect
}

oirfeodent
18th September 2019, 10:49
Hi,
I created this thread to know how don't have duplicate value in a display session.
I created a session that diplays some value (business partner in table tdsls400), but I don't know how "delete" duplicate value.


declaration:

table ttdsls400
string old.ofbp
**********MAIN TABLE SECTION**************
main.table.io:
after.read:
if old.ofbp = tdsls400.ofbp then
skip.io("")
else
old.ofbp = tdsls400.ofbp
endif
*********FUNCTION SECTION**********
functions:
function view_data()
{
select tdsls400.ofbp , tdsls400.orno
from tdsls400
selectdo
endselect
}


Use query extension, with an SQL which will satisfy your filter condition.

Regards,

RavCOder
18th September 2019, 11:25
I don't know how to use query extensions, but I think this:


function long after.read.table(){
query.extend.select("tdsls400.ofbp")
query.extend.from("tdsls400")
query.extend.where ("tdsls400.ofbp =: tdsls400.ofbp")

}