avin_ln
24th May 2014, 13:27
Hello everyone,

I am customizing a session in which i require some additional fields. Thes fields i am storing in an extension table(ltacp100) having same index as main table of tfacp1500m000. On customized session i am using some of my extension table fields. so to display my extension table fields in tfacp1500m000, i have created wrapper of this session and added

query.extend.select("tfacp100.*, ltacp100.*")
query.extend.from("tfacp100, ltacp100")
query.extend.where(tfacp100.ninv = ltacp100.docn")

Now, when i start the session same records are displayed twice, can anyone give solution to this problem.

Thank You,
Avin Singhi

andreas.toepper
27th May 2014, 11:26
I havo no solution, but maybe you can check the resulting sql-statements of the session.

Start the session and press CTRL+Shift+8 on the keyboard. LN will start a new session. There you can find the sqls-statements used by the session in one of the tabs.

Btw: I usualy append query-extensions. Just in case the session uses a modified select itself. I think a query-extension without a mode-parameter will overwrite the query by default.

Maybe you could try:

query.extend.select("ltacp100.*", EXTEND_APPEND)
query.extend.from("ltacp100", EXTEND_APPEND)
query.extend.where("tfacp100.ninv = ltacp100.docn", EXTEND_APPEND)

bhushanchanda
27th May 2014, 11:28
Are you sure you are comparing the indices?

Try comparing both ttyp and ninv.

avin_ln
28th May 2014, 12:19
hello andreas,

I have tried EXTEND_APPEND the problem is when i see Session Query. my query.extend.select and query.extend.from are appended to main query of session but query.extend.where condition is not appended. i guess problem is due to this only

avin_ln
28th May 2014, 12:24
Hello Bhushan,
I have compared indices only.

andreas.toepper
28th May 2014, 13:02
If I'm not mistaken, you're using tfacp1500? Please take a look at function function handle.query.extend.from.form.command(..). It is rebuilding the query.extend.where from scratch. I think it may overwrite you're query.extend.where on sessionstart.

avin_ln
29th May 2014, 13:55
Hello Andreas,
Problem is solved, I executed my code after standard query.extension and it worked.

Thank You