Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 4th January 2005, 15:05
Danny Leolux's Avatar
Danny Leolux Danny Leolux is offline
Member
 
Join Date: Jan 2005
Location: Venlo, the Netherlands
Posts: 36
Danny Leolux is on a distinguished road
Baan: B40c4 - DB: SQL - OS: Windows
How to get tisfc0408m000 to work with AFS

I have tried to make a session that can print orderdocuments based on the current production planning (tisfc012). By selecting the cwoc and date the documents should be printed.

The problem is I always get "No data within selection".
What am I doing wrong? I followed earlier examples here on Baanboard but I can't seem to get it to work.

Who can help me?
(I attached the script to explain what I've tried to do)

Code:
|******************************************************************************
|* tiprdd417m000  0  VRC B40O c4 llx4
|* Productiedocumenten op afd.bezetting printen
|* dvh
|* 17-12-04 [14:14]
|******************************************************************************
|* Script Type: 4
|******************************************************************************
                                                                                
|****************************** DECLARATION SECTION ***************************
declaration:
	
	table	ttisfc001
	table	ttisfc012

	extern	domain	tccwoc		e.cwoc
	extern	domain	tcdate		e.date.f
	extern	domain	tcdate		e.date.t
	extern	domain	tcmcs.str20	e.device
	extern	domain	tcorno		tisfc001.pdno
	extern	domain	tccprj		tisfc001.cprj

	#pragma used dll ottstpapihand
|****************************** PROGRAM     SECTION ***************************
|****************************** ZOOM FROM   SECTION ***************************
|****************************** FORM	     SECTION ***************************
|****************************** CHOICE      SECTION ***************************
choice.cont.process:
on.choice:
	read.main.table()
|****************************** FIELD       SECTION ***************************
field.e.date.f:
when.field.changes:
	e.date.t = e.date.f

|****************************** MAIN TABLE  SECTION ***************************
|****************************** FUNCTION    SECTION ***************************
functions:

function read.main.table()
{
	domain	tcmcs.str100	errm
	domain	tcdate		l.date

	l.date = date.num() + 1000

	select	tisfc012.*, tisfc001.*
	from	tisfc012, tisfc001
	where	tisfc012._index1 inrange {:e.cwoc, :e.date.f}
				 and	 {:e.cwoc, :e.date.t}
	and	tisfc012.pdno refers to tisfc001
	order by tisfc012._index1
	selectdo
		errm = ""	
		stpapi.put.field("tisfc0408m000", "order.sorted", 
				 str$(tisfc.osrt.order))	
		stpapi.put.field("tisfc0408m000","cprj.f", "")
		stpapi.put.field("tisfc0408m000","cprj.t", "ZZZZZZ")
		stpapi.put.field("tisfc0408m000","pdno.f", str$(tisfc012.pdno))
		stpapi.put.field("tisfc0408m000","pdno.t", str$(tisfc012.pdno))
		stpapi.put.field("tisfc0408m000","opno.f", "")
		stpapi.put.field("tisfc0408m000","opno.t", "999") 
		stpapi.put.field("tisfc0408m000","prdt.t", str$(l.date)) 
		stpapi.put.field("tisfc0408m000", "document.sorted", 
				 str$(tisfc.dsrt.doc.by.order))
		stpapi.put.field("tisfc0408m000", "print.org", 
				 str$(tcyesno.yes))
		stpapi.put.field("tisfc0408m000", "print.dupl", 
		  		 str$(tcyesno.yes))
		stpapi.put.field("tisfc0408m000", "print.modi", 
				 str$(tcyesno.yes))
		stpapi.put.field("tisfc0408m000", "covn.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "roul.b", str$(tcyesno.yes))
		stpapi.put.field("tisfc0408m000", "oprn.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "matl.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "matn.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "subn.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "chel.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "sawl.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "collect.sawl", 
				 str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "cutl.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "collect.cutl", 
				 str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "recn.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "insn.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "pcdl.b", str$(tcyesno.no))
		stpapi.put.field("tisfc0408m000", "print.config", 
				 str$(tcyesno.no))
		stpapi.set.report("tisfc0408m000", "rtisfc040802001",
				  str$(e.device), errm)
		stpapi.continue.process("tisfc0408m000", errm)
		stpapi.end.session("tisfc0408m000")
	endselect
}

Last edited by mark_h : 4th January 2005 at 16:22. Reason: Include code into message....
Reply With Quote
  #2  
Old 4th January 2005, 16:20
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Try using this:
Code:
	stpapi.set.report("tisfc0408m000", "rtisfc040801000",spool.device,errm)
instead of:
Code:
	stpapi.set.report("tisfc0408m000", "rtisfc040802001", str$(e.device), errm)

Note that I typically use spool.device instead of anything else - keeps the domains correct. Or just to test use D66.


Mark
Reply With Quote
  #3  
Old 4th January 2005, 16:56
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Forgot to mention that the recommended way to do enumerated values is using something like str$(etol(tcyesno.no)) instead of just str$(tcyesno.no). It seems there are problems sometimes with the format you used - of course I do it the same way, but thought I would mention this.

Mark
Reply With Quote
  #4  
Old 5th January 2005, 11:37
Danny Leolux's Avatar
Danny Leolux Danny Leolux is offline
Member
 
Join Date: Jan 2005
Location: Venlo, the Netherlands
Posts: 36
Danny Leolux is on a distinguished road
Baan: B40c4 - DB: SQL - OS: Windows
Hi Mark,

Thank you for the suggestions. I have tried them but they didn't work.
See changed script below:
Code:
|******************************************************************************
|* tiprdd417m000  0  VRC B40O c4 llx4
|* Productiedocumenten op afd.bezetting printen
|* dvh
|* 17-12-04 [14:14]
|******************************************************************************
|* Script Type: 4
|******************************************************************************
                                                                                
|****************************** DECLARATION SECTION ***************************
declaration:
	
	table	ttisfc001
	table	ttisfc012

	extern	domain	tccwoc		e.cwoc
	extern	domain	tcdate		e.date.f
	extern	domain	tcdate		e.date.t
	extern	domain	tcmcs.str20	e.device
	extern	domain	tcorno		tisfc001.pdno
	extern	domain	tccprj		tisfc001.cprj

	#pragma used dll ottstpapihand
|****************************** PROGRAM     SECTION ***************************
|****************************** ZOOM FROM   SECTION ***************************
|****************************** FORM	     SECTION ***************************
|****************************** CHOICE      SECTION ***************************
choice.cont.process:
on.choice:
	read.main.table()
|****************************** FIELD       SECTION ***************************
field.e.date.f:
when.field.changes:
	e.date.t = e.date.f

|****************************** MAIN TABLE  SECTION ***************************
|****************************** FUNCTION    SECTION ***************************
functions:

function read.main.table()
{
	domain	tcmcs.str100	errm
	domain	tcdate		l.date

	l.date = date.num() + 1000
	spool.device = e.device

	select	tisfc012.*, tisfc001.*
	from	tisfc012, tisfc001
	where	tisfc012._index1 inrange {:e.cwoc, :e.date.f}
				 and	 {:e.cwoc, :e.date.t}
	and	tisfc012.pdno refers to tisfc001
	order by tisfc012._index1
	selectdo
		errm = ""	
		stpapi.put.field("tisfc0408m000", "order.sorted", 
				 str$(tisfc.osrt.order))	
		stpapi.put.field("tisfc0408m000","cprj.f", "")
		stpapi.put.field("tisfc0408m000","cprj.t", "ZZZZZZ")
		stpapi.put.field("tisfc0408m000","pdno.f", str$(tisfc012.pdno))
		stpapi.put.field("tisfc0408m000","pdno.t", str$(tisfc012.pdno))
		stpapi.put.field("tisfc0408m000","opno.f", "")
		stpapi.put.field("tisfc0408m000","opno.t", "999") 
		stpapi.put.field("tisfc0408m000","prdt.t", str$(l.date)) 
		stpapi.put.field("tisfc0408m000", "document.sorted", 
				 str$(etol(tisfc.dsrt.doc.by.order)))
		stpapi.put.field("tisfc0408m000", "print.org", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "print.dupl", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "print.modi", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "covn.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "roul.b", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "oprn.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "matl.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "matn.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "subn.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "chel.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "sawl.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "collect.sawl", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "cutl.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "collect.cutl", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "recn.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "insn.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "pcdl.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "print.config", 
				 str$(etol(tcyesno.no)))
		stpapi.set.report("tisfc0408m000", "rtisfc040802001",
				  spool.device, errm)
		stpapi.continue.process("tisfc0408m000", errm)
		stpapi.end.session("tisfc0408m000")
	endselect
}
I still always get "No data with selection".
Do you perhaps have another idea ?

Thanks in advance,
Danny
Reply With Quote
  #5  
Old 5th January 2005, 13:09
kbartelds kbartelds is offline
Senior Member
 
Join Date: Feb 2003
Location: Netherlands
Posts: 264
kbartelds is on a distinguished road
Baan: B40c4 - DB: Oracle 7 - OS: Sun Solaris
Please install solution 146489 for session tisfc0408m000, which solves message "no data within selection" in case of using AFS and having more reports than the covering note.

Regards,
Klaas
Reply With Quote
  #6  
Old 5th January 2005, 13:33
Danny Leolux's Avatar
Danny Leolux Danny Leolux is offline
Member
 
Join Date: Jan 2005
Location: Venlo, the Netherlands
Posts: 36
Danny Leolux is on a distinguished road
Baan: B40c4 - DB: SQL - OS: Windows
Hi Klaas,

This solution is not installed yet on our system.
Due to customisation in this script I cann't install this one yet.
I'll request our support partner to build this solution into our object and try it.
Thanks for the tip. I will report the results back via this Board.

Regards
Danny
Reply With Quote
  #7  
Old 5th January 2005, 14:50
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Danny,

If you have a customization on the script you should be able to debug the tisfc0408 script. You could see exactly what is causing the problem. It may be a quick and simple fix. I also still recommend using the other report(rtisfc040801000) instead of the one you selected in your second script. This is one that looks just like one I have for tdilc4201m000 - I always set the main outbound report even if I just want to print the shortages. It may not be right, but it works. Just some thoughts.

Mark
Reply With Quote
  #8  
Old 5th January 2005, 15:05
Danny Leolux's Avatar
Danny Leolux Danny Leolux is offline
Member
 
Join Date: Jan 2005
Location: Venlo, the Netherlands
Posts: 36
Danny Leolux is on a distinguished road
Baan: B40c4 - DB: SQL - OS: Windows
Hi Mark,

Since this customisation is made by a third party (our support partner) and we only get the objects and not the scripts from them, debugging is no option. I already tried using the main report of the session as you already suggested earlier, but that didn't change the outcome.

When the solution is delivered by our support partner and it still doesn't work I will try the main report again. Till then I'll let the matter rest.

Thank you again for the suggestions,

Danny
Reply With Quote
  #9  
Old 5th January 2005, 17:11
kbartelds kbartelds is offline
Senior Member
 
Join Date: Feb 2003
Location: Netherlands
Posts: 264
kbartelds is on a distinguished road
Baan: B40c4 - DB: Oracle 7 - OS: Sun Solaris
In the script the solution states:
| Also read the reportname from reportgroup 1
| otherwise AFS is not able to determine which report to print

So, to solve the problem, only installing the solution will help.

Regards,
Klaas
Reply With Quote
  #10  
Old 14th January 2005, 21:11
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Hi, I was just doing this. Mark has the clue, as does the solution #146489, but I got it to work without installing. You have to set the report as Mark provided, to report: 040801000, even though you are picking other reports with your enumerated choices. The correct report seems to print despite setting that number to what seems to be the cover note. I got it to print the material list. Maybe that will work for you.
Reply With Quote
  #11  
Old 20th January 2005, 14:54
Danny Leolux's Avatar
Danny Leolux Danny Leolux is offline
Member
 
Join Date: Jan 2005
Location: Venlo, the Netherlands
Posts: 36
Danny Leolux is on a distinguished road
Baan: B40c4 - DB: SQL - OS: Windows
Hi Everybody,

I already tried using the first report 040801000 but I didn't get it to work.
Yesterday I received the object containing solution #146489.

IT WORKS !!!!!

See the final (and working) version of my program script:
Code:
|****************************** DECLARATION SECTION ***************************
declaration:
	
	table	ttisfc012

	extern	domain	tccwoc		e.cwoc
	extern	domain	tcdate		e.date.f
	extern	domain	tcdate		e.date.t
	extern	domain	tcmcs.str20	e.device

	#pragma used dll ottstpapihand
|****************************** PROGRAM     SECTION ***************************
|****************************** ZOOM FROM   SECTION ***************************
|****************************** FORM	     SECTION ***************************
|****************************** CHOICE      SECTION ***************************
choice.cont.process:
on.choice:
	read.main.table()
|****************************** FIELD       SECTION ***************************
field.e.date.f:
when.field.changes:
	e.date.t = e.date.f

|****************************** MAIN TABLE  SECTION ***************************
|****************************** FUNCTION    SECTION ***************************
functions:

function read.main.table()
{
	domain	tcmcs.str100	errm
	domain	tcdate		l.date

	l.date = date.num() + 1000
	spool.device = e.device

	select	tisfc012.*
	from	tisfc012
	where	tisfc012._index1 inrange {:e.cwoc, :e.date.f}
				 and	 {:e.cwoc, :e.date.t}
	order by tisfc012._index1
	selectdo
		errm = ""	
		stpapi.put.field("tisfc0408m000", "order.sorted", 
				 str$(tisfc.osrt.order))	
		stpapi.put.field("tisfc0408m000","cprj.f", "")
		stpapi.put.field("tisfc0408m000","cprj.t", "ZZZZZZ")
		stpapi.put.field("tisfc0408m000","pdno.f", str$(tisfc012.pdno))
		stpapi.put.field("tisfc0408m000","pdno.t", str$(tisfc012.pdno))
		stpapi.put.field("tisfc0408m000","opno.f", "")
		stpapi.put.field("tisfc0408m000","opno.t", "999") 
		stpapi.put.field("tisfc0408m000","prdt.t", str$(l.date)) 
		stpapi.put.field("tisfc0408m000", "document.sorted", 
				 str$(etol(tisfc.dsrt.doc.by.order)))
		stpapi.put.field("tisfc0408m000", "print.org", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "print.dupl", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "print.modi", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "covn.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "roul.b", 
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "oprn.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "matl.b",
				 str$(etol(tcyesno.yes)))
		stpapi.put.field("tisfc0408m000", "matn.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "subn.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "chel.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "sawl.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "collect.sawl", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "cutl.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "collect.cutl", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "recn.b", 
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "insn.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "pcdl.b",
				 str$(etol(tcyesno.no)))
		stpapi.put.field("tisfc0408m000", "print.config", 
				 str$(etol(tcyesno.no)))
		stpapi.set.report("tisfc0408m000", "rtisfc040801000",
				  spool.device, errm)
		stpapi.continue.process("tisfc0408m000", errm)
		stpapi.end.session("tisfc0408m000")
	endselect
}
Thanks everybody,
Danny
Reply With Quote
  #12  
Old 20th January 2005, 15:35
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,903
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Glad to see you got it working. I just checked our test company and our test service pack companies - it works in both companies. The solution 146489 is only installed in the new service pack company. Just goes to show how much fun this can be!!!!!!

Mark
Reply With Quote
Sponsored Links
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
Can't get tisfc0408m000 to work through AFS Kevin_Rell AFS/DDC/OLE: Function servers 7 1st November 2011 15:31
Main and sub work center setup FransG Manufacturing & Supply Chain 4 20th September 2006 11:56
AFS - Print Order Documents BurghMan AFS/DDC/OLE: Function servers 5 29th October 2004 21:07
Printing orderdocuments Pieter van de L AFS/DDC/OLE: Function servers 5 1st September 2004 08:52
Work center & calendar setup issue Bryan Manufacturing & Supply Chain 1 28th June 2002 09:51


All times are GMT +2. The time now is 05:51.


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