sghatge
6th March 2018, 07:45
Dear Friends,

I have customized session for display ROC record same as session tisfc0130m000 - Report Operations Completed and attached this customized session's form command in tisfc0501m000 - Production Order . I want to put some checks and controls in customized session before open the original session tisfc0130m000 using function start.session. when I run this customized session, initially system is not showing the record but when I click on the next record buttion, it is showing the record. I do not understand, where I am wrong.
I need your help to resolve this issue ASAP. My code as below.
----------------------------------------------------------------
declaration:

table ttisfc010

extern domain tcorno c.pdno
long field.proc
domain tcmcs.str13 zoom.from.session

#include <bic_dam>

group.1:
init.group:
check.order()

functions:

function check.order()
{
import("tisfc001.pdno", c.pdno)

if not isspace(c.pdno) then
query.extend.where.in.zoom("tisfc010.pdno = " & quoted.string(c.pdno))
rebuild.query()
start.session(MODAL_OVERVIEW, "tisfc0130m000", prog.name$, "c.pdno")
endif
clear.query.extend.in.zoom()
exit()
}
----------------------------------------------------------------------------------------------

bhushanchanda
7th March 2018, 14:03
Hello,

Double click on your session and set the start command as first.set and see if that helps.

sghatge
12th March 2018, 17:48
As you suggested, I have made changes but it is not working..

sghatge
4th October 2018, 10:28
Anybody can know the solutions.....

tmannais
4th October 2018, 10:47
I don't know what is causing the issue but I think this might be a workaround.
Since you stated that by clicking on the next record button, it shows the record then try simulating the action at the start of the session.
May be something like:
execute( first.set )
or
execute( next.set )

giggty
4th October 2018, 10:58
What session does not show the record on start? Your customized one or tisfc0130m000?

sghatge
4th October 2018, 14:10
Hi,

I tried with all possible things but not worked. Can anybody test my script at your end and suggest me the correct script.

This will help me to improve my knowledge.

Thanks

giggty
4th October 2018, 15:59
Just to make sure: you need to set the start command to first.set for the session that you have a problem with showing records (from your description it is unclear to me which session among the two you have that problem with).

sghatge
5th October 2018, 06:34
Hi giggty,

I have set the first.set in the session and tried but no result. I think pointer is not set correctly but I don't know why?
I have customized session tisfc0130m100 and calling standard session tisfc0130m000 from this customization session with start.session function as I already given script details beginning.

Thanks.

giggty
5th October 2018, 10:46
You don't need to call rebuild.query() in tisfc0130m100, remove it. Also instead of using c.pdno in query.extend.where.in.zoom() try to hardcode some pdno that you know definitely exists in tisfc0130m000 (like query.extend.where.in.zoom("tisfc010.pdno = " & quoted.string("0000001"))) and see if it works.

sghatge
5th October 2018, 14:11
Thanks Giggty for prompt reply.
Even though hardcoded production order number, not showing record selected order.
If you have system, can you please test at your end for know the exact issue?
If you need any more information, please ask me but we need to resolve the said issue ASAP as it is very urgent for me.

giggty
5th October 2018, 15:12
Ok, i checked it myself. tisfc0130m000 has views, so the start command you need is not first.set but first.view :) Try it on your end.

sghatge
5th October 2018, 17:53
Giggty,
Thanks for prompt response. As you suggested, I have checked with start command first.view but still same issue. I requesting you to please share your code if possible? this will very helpful for me.
Here I am sharing customized session tivir0130m100 details as below which I have created.
Main table : tisfc010
start command : 2 (first.view)
session type : display
Window type : list window
Main session : ticked (yes)
synchronized dialog : tivir0130m100

Now you correct me where I am wrong?

awaiting your reply....

giggty
8th October 2018, 09:48
I have a test session (for experiments) and its script has your exact code. Upon start tisfc0130m000 is opened with the correct pdno positioning.

Are you sure you are not mixing up start command of tisfc0130m000 with the start command of tivir0130m100? Why is the latter first.view too? And why does it have synchronized dialog?

sghatge
8th October 2018, 14:38
Hi giggty,

First thing is, tisfc0130m000 is standard session and cannot do any changes for this standard session.

Secondly, tisfc0130m100 is my own customized session and trying to opening standard session tisfc0130m000 from this customized session as per my code given.

Please let me know in which session I put the start command first.view and synchronized dialog whether blank or what.

If possible, please share your customized session values as I already mentioned above. If there is any changes, I will try with your values and then I will check.

Thanks.

giggty
8th October 2018, 15:24
Open tisfc0130m000 in ttadv2500m000 and change Start Command to 2.

Thing is tisfc0130m000 will now position itself on the first pdno every time it is opened. Which might not be ideal. To do it more properly (if you do not own sources and i presume you don't) one could generate a wrapper for this standard session and adjust it in such a way that the standard command is ignored if it was zoomed from tisfc0130m100. This can be done using RUSH (http://www.baanboard.com/baanboard/showthread.php?t=559) for example.

For starters just try to change start command in ttadv2500m000 and see if it works.

sghatge
9th October 2018, 08:33
Hi giggty,

Great news. It is working fine now after changing the start command to 2 for standard session tisfc0130m000.

Thanks you so much for sort out my problem.

Once again thank you so much.