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
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th June 2003, 10:01
rairai's Avatar
rairai rairai is offline
Junior Member
 
Join Date: May 2002
Location: Atlanta, GA, USA
Posts: 8
rairai is on a distinguished road
Post AFS DLL of tdilc1122s000 is not working (Saving)

I have a typical case here.

Environment : BaanIV c4 on Informix
Porting Set : 6.1c.06.02

As per the requirement, for Transfer Order, I have generated a AFS DLL for session tdilc1120m000 and its subsession tdilc1122s000.

Through my Program I am calling the AFS DLL of tdilc1120m00 and after insert and save of tdilc1120m000 I am calling tdilc1122s000.
(Please see the script below).
For some reason, the records of session tdilc1120m000 gets saved, But the records of tdilc1122s000 Never gets saved. and I don't get Error Messages while saving records of tdilc1122s000.

I think I am missing something (probably stpapi command) in the called SubSession.

Please let me know the changes I need to do........

Regards
Rai



function Transfer.Order()
{
......................
......................
......................

znilcdll1120fs.put.Order_Date(tdinv100.odat)
znilcdll1120fs.put.Planned_Date(tdinv100.pdat)
znilcdll1120fs.put.Planned_Quantity(tdinv100.pqan)
znilcdll1120fs.put.tdinv100.dwar(tdinv100.dwar)
err.mesg = ""
znilcdll1120fs.insert(false, err.mesg)
if (not isspace(err.mesg)) then
message(err.mesg) |Display the Error Message
err.mesg = ""
|Recover the Record to Original
znilcdll1120fs.recover(err.mesg)

if (not isspace(err.mesg)) then
message(err.mesg)
err.mesg = ""
endif
else
znilcdll1120fs.save(err.mesg) | Data Commit

| Subsession tdilc1122s000

start.location.session.tdilc1122s000()
znilcdll1120fs.end(err.mesg)
endif

}

function start.location.session.tdilc1122s000()
{
err.mesg = ""

| Start Choice.Continue of Session tdilc1120m000
stpapi.application.option("tdilc1120m000", 1, 38, err.mesg)

| Handle Sub-Process
znilcdll1120fs.handle.sub.process("tdilc1122s000", "add")

| Start Sub-Process
stpapi.zoom.option("tdilc1120m000", 1,
"tdilc1122s000", err.mesg)

znilcdll1122fs.put.From_Location(tdilc103.lcfr)
znilcdll1122fs.put.Storage_Unit(tdilc103.sufr)
znilcdll1122fs.put.From_Quantity(tdilc103.qstr)

znilcdll1122fs.put.To_Location(tdilc103.lcto)
znilcdll1122fs.put.To_Storage_Unit(tdilc103.suto)
| znilcdll1122fs.put.To_Storage_Quantity(tdilc103.strt)

err.mesg = ""

znilcdll1122fs.insert(false, err.mesg)

if (not isspace(err.mesg)) then
message(err.mesg) | Display the Error Message
else
znilcdll1122fs.save(err.mesg) | Commit
endif

err.mesg = ""
| Kill SubProcess
znilcdll1122fs.handle.sub.process("tdilc1122s000", "kill")
znilcdll1122fs.end(err.mesg)
}
Reply With Quote
  #2  
Old 17th June 2003, 16:59
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,933
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Stpapi.handle

Below is a copy of my code. Notice the first step is setting the 1122s000 sub-process. Then I do a insert and continue on 1120. Then I just start putting 1122 fields.

Mark

Code:
| Handle sub session
		dll1120.handle.sub.process("tdilc1122s000","add")
| Put Data
		dll1120.put.item(xfer.item)
		dll1120.put.Input_Date(date.num())

| Attempt to put default
		dll1120.put.warehouse(xfer.fwh)
		dll1120.put.tdinv100.kowt(tckowt.wrh.transfer)
		dll1120.put.reason_code("   ")
		dll1120.put.Order_date(date.num())
		dll1120.put.Planned_Quantity(pqty)
		dll1120.put.tdinv100.dwar(xfer.twh)

| Now add record.
		dll1120.insert(1,err)
		if(strip$(err)<>"") then
			sess_error("Insert: "& strip$(err),"tdilc1120m000")
			continue
		endif

| Continue and init sub-session.
		dll1120.continue(err)
		if(strip$(err)<>"") then
			sess_error("Continue: "& strip$(err),"tdilc1120m000")
			continue
		endif

| Put info on subsession.
		dll1122s.put.From_Location(xfer.floc)
		dll1122s.put.To_Location(xfer.tloc)
| Put Lot if needed.
		if(tiitm001.kltc = tckltc.batch) then
			dll1122s.put.From_lot(xfer.lots)
		endif
		dll1122s.insert(1,err)
		if(strip$(err)<>"") then
			sess_error("Insert Sub: "& strip$(err),"tdilc1122s000")
			continue
		endif

| Save subsesssion data to proc it.
		dll1122s.save(err)
		if(strip$(err)<>"") then
			sess_error("Save: "& strip$(err),"tdilc1122s000")
			continue
		endif

| Stop and kill subsessions before next record.
		dll1122s.end()	
		dll1120.handle.sub.process("tdilc1122s000","kill")
		dll1120.end()
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
Problem of Saving View Field using AFS ayushkumar AFS/DDC/OLE: Function servers 5 17th November 2004 00:13
Sales order AFS not working in tdslsl101s002 session sns0707 AFS/DDC/OLE: Function servers 1 29th December 2003 23:12
AFS dll error vishbaan AFS/DDC/OLE: Function servers 2 12th July 2003 05:16
Find not working in AFS pinakin AFS/DDC/OLE: Function servers 2 29th November 2002 07:43


All times are GMT +2. The time now is 17:12.


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