ks_ks_
16th December 2008, 09:14
Hi Guys,
I am using LN; and in a display session the main table of which is tdsls401, I want to filter all the records which are ready for a particular status.
Is it possible to write extension SQL on tdsls400/tdsls413 for a session which has main table tdsls401?
ks
rahul.kolhe22
16th December 2008, 11:58
Hi,
No it is not possible to write query extension SQL on table tdsls400/tdsls413 for the session with main table tdsls401.
query.extend.where just adds up your condition in the where clause to the query which is used by the system to fetch the data to be displayed on the session.
Regards
--Rahul
wiggum
16th December 2008, 12:53
You can extend your query extension with checks on table tdsls400 as each record of tdsls401 refers to one record in tdsls400. General in query extensions you can do all what you can do within a single select command (except grouping).
Perhaps you can set tdsls413 as main table and refer to tdsls401 and tdsls400.
rahul.kolhe22
16th December 2008, 14:14
Hi Wiggum,
Thanks a lot. You have corrected me.
I would apologize ks_ks_.
I have tried doing what Wiggum told and it worked for me:
below is what the code I have written
query.extend.from("tdpur400")
query.extend.where("tdpur401.orno refers to tdpur400.orno and " &
"tdpur400.cotp = " & quoted.string(ordr.type))
It shows all the Purchase orders which are of order type specified by ordr.type
rahul.kolhe22
17th December 2008, 10:03
Hi Wiggum,
I have the requirement where I want to display the data in the main table in the descending order of sequence. Sequence is my index1.
Can we use query.extend.*** some function to arrange the data in descending order.
Any other suggestion to get the data on the session in descending order is welcomed.
Thanks in advance
--Rahul
ks_ks_
17th December 2008, 10:15
Hi Wiggum,
I have the requirement where I want to display the data in the main table in the descending order of sequence. Sequence is my index1.
Can we use query.extend.*** some function to arrange the data in descending order.
Any other suggestion to get the data on the session in descending order is welcomed.
Thanks in advance
--Rahul
Hi Rahul,
After writing the query though the session display the data but I also want to arrange it in ascending order. If you find any way out, please let me know.
rahul.kolhe22
17th December 2008, 11:17
Hi,
By default the data on the session is arranged in the ascending order of index1. If you want to arrange the data based on some other field then we have to wait for some reply.
--Rahul
wiggum
17th December 2008, 13:24
Sorry i have to correct me: You can do all except grouping AND ordering
raj_mirani
17th December 2008, 13:25
If we want to apply order by clause on main table then, “query.extend.order” can be used.
Following is the syntax:
query.extend.order (<field name> [Sort Direction])
This function is available from BaaN V onwards (Not available in BaaN C IV).
wiggum
17th December 2008, 13:46
I never saw this before and its not documented but its very interesting.
How does it work? I found this e.g. in tfacp2510m000 but because of the function name i guess that it would extend the ordering but it seems that the function will replace (parts of) the ordering by the selected index.