i don't how NetWebServiceMethod open a table or view but if i founded another solution for my problem, i create a queue and open a table manually and then assign a values to a queue, with this code the select count(*) is not generated, but when return type is set to view then the select count(*) is generate
With queue and open manually work, but generated more code.. and i think that filter need embedded for conditional filter when Return Type is View
CLEAR(ThisQueue)
FREE(ThisQueue)
p_web.OpenFile(WSPAYMENTDETAIL)
SET(WSPAYMENTDETAIL)
WSPAYMENTDETAIL{PROP:Order}=WSP:BATCHNO
IF CLIP(BlType)=''
WSPAYMENTDETAIL{prop:where}='acctno=<39>'&clip(AcctNo)&'<39>'
ELSE
WSPAYMENTDETAIL{prop:where} = 'acctno=<39>'&clip(Acctno)&'<39> and bltype= <39>'& clip(BlType)&'<39>'
END
LOOP
NEXT(WSPAYMENTDETAIL)
IF ERROR() THEN BREAK.
LOC:BATCHNO = WSP:BATCHNO
LOC:TRAN_ = WSP:TRAN_
LOC:TYPE = WSP:TYPE
LOC:DES = WSP:DES
LOC:EMPID = WSP:EMPID
LOC:LINEITEM = WSP:LINEITEM
LOC:TRANDATE_DATE = format(WSP:TRANDATE_DATE,@d02)
LOC:TRANDATE_TIME = format(WSP:TRANDATE_TIME,@t3)
LOC:AMOUNT = WSP:AMOUNT
LOC:TRACENO = WSP:TRACENO
LOC:ACCTKEY = WSP:ACCTKEY
LOC:BLTYPE = WSP:BLTYPE
LOC:ACCTNO = WSP:ACCTNO
ADD(ThisQueue)
END
p_web.CloseFile(WSPAYMENTDETAIL)