Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > AFS/DDC/OLE: Function servers

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 10th April 2018, 17:06
v_kewl v_kewl is offline
Member
 
Join Date: Dec 2008
Posts: 58
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
AFS for tihra1210m000

Hi Folks,
AFS code for Process hours tihra1210m000 is not working.

There is a sub session tihra1210s000 getting called from tihra1210m000, which is not getting handled. Throwing a error message "Report not found"
Do anyone have a working code in BaanIVc4?
Thanks!!


Regards,
Gaurav
Reply With Quote
  #2  
Old 11th April 2018, 00:55
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Or if you post your code someone might see something you can check. I do not have any hours accounting afs code, but might see something in your code.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #3  
Old 11th April 2018, 14:52
v_kewl v_kewl is offline
Member
 
Join Date: Dec 2008
Posts: 58
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
Hi Mark,
Thanks for your reply, below is the code. I treid handling sessions in multiple ways but it was not working, below is one active now.

Error I'm getting in AFS after continue process is "No data found for report, no report is printed" but manually I get error report.

function domain tcbool process.hours(domain tcdate i.date,
domain tcemno i.emno,
domain tihra.sern i.dsrn,
ref domain tcmcs.str300m o.mess)
{
ret.val = false
domain tcmcs.str10 tmp.str1, tmp.str2, tmp.str3, tmp.str4, tmp.str5, tmp.str6
domain tcmcs.str4 o.str.wsrn, o.str.year, o.str.week, o.str.dayn
long o.wkdy, o.yrdy, o.week, o.year

num.to.week(i.date, o.wkdy, o.yrdy, o.week, o.year)

stpapi.put.field("tihra1210m000", "process.yr", str$(o.year))
stpapi.put.field("tihra1210m000", "process.wk", str$(o.week))
stpapi.put.field("tihra1210m000", "process.dy", str$(o.wkdy+1))
stpapi.put.field("tihra1210m000", "process.dt", str$(i.date))
| stpapi.put.field("tihra1210m000", "process.dt", sprintf$("%D018", i.date))
stpapi.put.field("tihra1210m000", "emno.f", str$(i.emno))
stpapi.put.field("tihra1210m000", "emno.t", str$(i.emno))

stpapi.get.field("tihra1210m000", "process.yr", tmp.str1)
stpapi.get.field("tihra1210m000", "process.wk", tmp.str2)
stpapi.get.field("tihra1210m000", "process.dy", tmp.str3)
stpapi.get.field("tihra1210m000", "process.dt", tmp.str4)
stpapi.get.field("tihra1210m000", "emno.f", tmp.str5)
stpapi.get.field("tihra1210m000", "emno.t", tmp.str6)

stpapi.handle.subproc("tihra1210m000" ,"tihra1210s000", "ignore")
stpapi.handle.subproc("tihra1210m000" ,"tihra1211s000", "ignore")
stpapi.handle.subproc("tihra1210m000" ,"tdilc4207s000", "ignore")
stpapi.handle.subproc("tihra1210m000" ,"tdilc4208s000", "ignore")
stpapi.set.report("tihra1210m000", "rtihra121001000", "D", o.mess)

stpapi.continue.process("tihra1210m000", o.mess)
| stpapi.zoom.option("tihra1210m000", 1, "tihra1210s000", o.mess)

| stpapi.set.report("tihra1210s000", "rtihra121001000", "D", o.mess)
| stpapi.put.field("tihra1210s000", "tihra100.year", str$(o.year))
| stpapi.put.field("tihra1210s000", "tihra100.week", str$(o.week))
| stpapi.put.field("tihra1210s000", "tihra100.dayn", str$(o.wkdy+1))
| stpapi.put.field("tihra1210s000", "tihra100.emno", str$(i.emno))
| stpapi.print.report("tihra1210s000", o.mess)

| stpapi.end.session("tihra1210s000")
stpapi.end.session("tihra1210m000")

return(ret.val)
}

Last edited by v_kewl : 11th April 2018 at 15:19.
Reply With Quote
  #4  
Old 11th April 2018, 21:36
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
When you run the session manually do each of those sessions with the stpapi.handle.subproc actually kick off and do something? Require input or anything like that? From looking at the message it looks like they do something even if it is generate a report. So you might just need to define which report tihra1210s000 runs.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #5  
Old 12th April 2018, 07:25
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 492
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Why dont you try to find a record using stpapi.find and then use stpapi,mark and use continue process?
Reply With Quote
  #6  
Old 12th April 2018, 17:12
v_kewl v_kewl is offline
Member
 
Join Date: Dec 2008
Posts: 58
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
Quote:
Originally Posted by mark_h View Post
When you run the session manually do each of those sessions with the stpapi.handle.subproc actually kick off and do something? Require input or anything like that? From looking at the message it looks like they do something even if it is generate a report. So you might just need to define which report tihra1210s000 runs.
Except tihra1210s000, other sessions are backflusing session called in backgroud but I believe we don't need to handle it, even without handling all of the sub session which open in background control come back after doing something, with the same message "No data to print".
Also I tried both ways with(setting the report rtihra121001000) and without handling tihra1210s000, system come back without hung.
Reply With Quote
  #7  
Old 12th April 2018, 17:14
v_kewl v_kewl is offline
Member
 
Join Date: Dec 2008
Posts: 58
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
Quote:
Originally Posted by Ajesh View Post
Why dont you try to find a record using stpapi.find and then use stpapi,mark and use continue process?
I tried that way through maintain hours accounting session, but system do nothing
Reply With Quote
  #8  
Old 13th April 2018, 14:12
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I was poking around looking at my system - tihra1210m000 and 1210s000 run the same script. Those 2 along with tihra1211s000 - all have the same report defined for them. It looks like all three generate the error report - what I am not sure of is if they write to the same open report. Also - I would expect "No data to print" if there were no errors. Are you sure there is an error that would come out if you ran it manually?

I am not even sure we use this session since all of our time comes in thru a 3rd party system and interface.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #9  
Old 16th April 2018, 15:52
v_kewl v_kewl is offline
Member
 
Join Date: Dec 2008
Posts: 58
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
Quote:
Originally Posted by mark_h View Post
I was poking around looking at my system - tihra1210m000 and 1210s000 run the same script. Those 2 along with tihra1211s000 - all have the same report defined for them. It looks like all three generate the error report - what I am not sure of is if they write to the same open report. Also - I would expect "No data to print" if there were no errors. Are you sure there is an error that would come out if you ran it manually?

I am not even sure we use this session since all of our time comes in thru a 3rd party system and interface.
Hi Mark,
Thanks for your effort. You are correct "No data to print" message appears when there is no error to report. And in AFS scenario even there is data it displaying the same message. We logged a case with Infor and they too identified it as a bug in the session in case of AFS.
Reply With Quote
  #10  
Old 17th April 2018, 14:12
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Glad to hear they have it as a bug.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AFS waiting timed out (frozen) jp.aalders AFS/DDC/OLE: Function servers 4 20th December 2011 20:48
AFS for tfacr4410m000 and Credit Notes Neal Matthews AFS/DDC/OLE: Function servers 7 12th April 2011 20:48
Steps to create AFS indian_sumesh AFS/DDC/OLE: Function servers 1 6th November 2008 17:32
AFS hangs in stpapi.put.field garias AFS/DDC/OLE: Function servers 1 30th January 2005 22:13
AFS (tfgld1101m000) don´t run fine since a user with a Dynamic menu (DEM) garias AFS/DDC/OLE: Function servers 4 20th January 2004 14:24


All times are GMT +2. The time now is 20:44.


©2001-2018 - Baanboard.com - Baanforums.com