Can I use custom join business view in C++ business function



I'm trying to retrieve a value in a table column but I need it filtered by column values from two tables. Can I use custom business view to perform the queries using C++ business function ?

I want to return the value of F43C30.ADUKID from joining F43C30.ADUKID = F43C40.ADUKID based on criteria:
F43C30.ADSTDADNM = ' ' &
F43C30.ADASSDDESC = some value &
F43C40.ACCNTRTID = some value &
F43C40.ACBLUID = some value

Using SQL
select a.adadukid from testdta.f43c30 a join testdta.f43c40 b on a.adadukid=b.acadukid where
a.adstdadnm = ' ' and a.adassddesc = xxx3 and b.accntrtid = xxx1 and b.acbluid = xxx2

Please advise,
Wil G.


Active Member
Hello Wil

You can use JDB_OpenView and JDB_SelectKeyed to do SQL on a BSVW. I have used JDB_OpenViewExtended to perform aggregate functions on a join BSVW. I joined F0006 and F0902 tables. If you search JDB_OpenView in JDE code, you will find many examples.