Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   AFS/DDC/OLE: Function servers (http://www.baanboard.com/baanboard/forumdisplay.php?f=59)
-   -   Getting a process id of session in AFS call (http://www.baanboard.com/baanboard/showthread.php?t=69923)

VishalMistry 6th April 2017 17:36

Getting a process id of session in AFS call
 
Hello everybody,

I am doing stpapi.put.field. This will invoke this particular session in background. Is there any way to get process id of this session ?

Thanks,
Vishal

sachinbaan 7th April 2017 07:34

Hello,

You can make use of pstat().

for example,
Code:

        procid = -1
        procid = pstat( procid, progname, info )

        while procid >= 0
                procid = pstat( procid, progname, info )
                if progname = "tdpur4100m900" then
                        kill(ids)
                endif
                ids = procid
        endwhile

In above example, you can make use of predefined variable 'parent'. it will return id of your current session.


All times are GMT +2. The time now is 00:01.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com