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

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd July 2005, 18:48
srinivas's Avatar
srinivas srinivas is offline
Senior Member
 
Join Date: Nov 2001
Location: South India
Posts: 213
srinivas is on a distinguished road
Baan: Baan4,Baan ERP - DB: Oracle, Informix, SQL Server, Baanbase - OS: Unix, Solaris, NT, Win 2K
Editable synchronized dialogue not started

I am trying to create a production order through AFS.

I am on Baan LN.
I could see the production order session tisfc0101m100 getting started in the process window but still I am getting error "Editable synchronized dialogue not started"

Pl. let me know where I am going wrong.

This is the code:

Code:
ret1=tisfc0501m000f.synchronize.dialog("add",error.msg)
If ret1=1 then
	tisfc0501m000f.handle.sub.process("tisfc0101m100","add")
	tisfc0101m100f.put.Production_Order(pdno)
	tisfc0101m100f.put.Item(item)
	tisfc0101m100f.put.Quantity_Ordered(qnty)
	tisfc0101m100f.put.Warehouse(cwar)
	tisfc0101m100f.put.Routing(opro)
	tisfc0101m100f.put.Reference(trdt)
	tisfc0101m100f.put.Planning_Method(plcd)
	tisfc0101m100f.put.Production_Start.tisfc001.prdt( trdt)
	tisfc0101m100f.put.Confirmed_Delivery( trdt)
	tisfc0101m100f.insert(1,error.msg)
	tisfc0101m100f.save(error.msg)
	tisfc0101m100f.end(error.msg)
	tisfc0501m000f.handle.sub.process("tisfc0101m100","kill")
	tisfc0501m000f.end(error.msg)
Endif
__________________
Regards,
Srinivas

Last edited by Paul P : 21st July 2005 at 08:19.
Reply With Quote
  #2  
Old 5th July 2005, 15:25
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,923
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Update Maybe..

I do not know anything about Baan 5, but Paul recommends a patch in this thread. You might want to check into that - Paul also says make sure you command is "add" in all lower case.

Good Luck!
__________________
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
  #3  
Old 5th July 2005, 20:31
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,029
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Srinivas,

Try Mark's suggestion.
Quote:
I am on Baan LN.
I could see the production order session tisfc0101m100 getting started in the process window but still I am getting error "Editable synchronized dialogue not started"
Also, refer to the LN Tools programmer's manual there are differences compared to the BaaN-5 series manuals.
Here are some notes -
Quote:
SSA ERP LN 6.1 Programmers Guide
Editable grid and Synchronized Dialog

--------------------------------------------------------------------------------
This addressess sessions with both an editable grid and a synchronized dialog only.

TIV Behaviour
<1000 By default the synchronized dialog is used to insert a record.
≥1000 By default the grid is used to insert a record.

In both cases the default can be overriden by specifying the 3rd argument of the set.synchronized.dialog() function.
The set.synchronized.dialog() is changed from Reger to Gemini/LN -
Quote:
BaanERP Programmers Guide 7.3_a_sp1
set.synchronized.dialog()

--------------------------------------------------------------------------------
Syntax
void set.synchronized.dialog( string sess_code, [boolean editable.grid] )

SSA ERP LN 6.1 Programmers Guide
set.synchronized.dialog()

--------------------------------------------------------------------------------
Syntax
void set.synchronized.dialog( string sess_code, [ boolean editable.grid, [ boolean use.dialog.for.insert ] ] )
use.dialog.for.insert
Specifies whether or not the dialog should be started for inserting or duplicating records. (The default is false.) Only valid when the editable.grid is set to true.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #4  
Old 6th July 2005, 01:57
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,029
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Srinivas,

Refer to the latest OW/AFS/API-2.5/2.6 manuals for more information.
Quote:
USAGE NOTES
Function in dll created by creatdll:
Function extern long <fs-name>.insert(long do.update, ref string error))
If err.mesg is filled, stpapi.recover() must be called before any other stpapi.* commands are issued to this session, or the record can be inserted into the
database because the stpapi.end.session() call will perform an update.db action.
The error messages returned can be:
* Session not available.
* Command disabled; no insert is possible in the current state of the session.
* Editable synchronized dialog box not started (Baan ERP 5.x and 6.0 only).
* Any error message from the session.
Only use this function with ‘do.save’ 0 if the calling program must distinguish between errors raised by the insert (for example, check.inputs) and the save
(for example, skip.io’s in before.write). Do not use it to buffer inserts, because inserts will not be buffered, as the next stpapi.insert() call will execute an
‘update.db’ for the previously inserted record. If a record is inserted with a type 3 form, the function stpapi.change.view()
must be called to set the correct key field values. Baan ERP 5.x and 6.0 only: If a record must be inserted with a synchronized
single-occurrence dialog box, the dialog box must be synchronized before the first put.field function is called, because otherwise the field buffer is not
present. The stpapi.insert() call must be issued to the multi-occurrence session, but the stpapi.put.field() calls to the single-occurrence session. For
multi-occurrence sessions of type 3, make sure you call the stpapi.change.view() before the synchronization.

Synchronize Multi-occurrence and Single-occurrence sessions
SYNTAX
long stpapi.synchronize.dialog(string session, string mode, ref string err.mesg)
ARGUMENTS
session Name of the multi-occurrence session this command is executed on.
mode The mode in which the synchronized dialog box must be started. The possible values are:
Add – the dialog box is started and synchronized in Edit mode, view fields are sent from the multi-occurrence session
to the single-occurrence session; use this mode before a stpapi.insert() call
Modify – the dialog box is started and synchronized in Edit mode, use this mode before a stpapi.update() call
display – the dialog box is started in Display mode
“ ” – no dialog box is synchronized (for future use when multioccurrence and single-occurrence sessions have the same
code, focus is set to the multi-occurrence session) err.mesg This parameter will contain the text of the error message if the
function cannot complete normally.
DESCRIPTION
This function synchronizes a multi-occurrence session with its registered synchronized dialog box. Depending on the mode, the session with the
editable window is synchronized or the read-only window.
RETURN VALUES
0 Sessions could not be synchronized (err.mesg is filled)
1 Sessions are synchronized (err.mesg is empty)
EXAMPLE
stpapi.put.field("dtfsa1501m000", "dtfsa101.seno", str$(i.seno))
ret = stpapi.find("dtfsa1501m000", error.msg)
if ret then
ret = stpapi.synchronize.dialog("dtfsa1501m000", "modify", error.msg)
if ret then
stpapi.put.field("dtfsa1101s000", "dtfsa101.name", new.name)
ret = stpapi.update("dtfsa1501m000", true, error.msg)
endif
endif
Explanation:
The record is searched in the multi-occurrence session. When found, the
synchronized dialog box is started, the field changed, and the record
updated.

Multi-occurrence / Single-occurrence
Baan ERP 5.x and 6.1 only.
For most inserts and updates in Baan ERP, a combination of a multioccurrence and single-occurrence sessions are used. The programmer is
responsible to get the sessions in a synchronized state. This is not done automatically for better performance and because the AFS cannot determine
whether the editable dialog box or the read-only dialog box must be opened. With the normal interface, synchronizing the multi-occurrence and singleoccurrence
session is an asynchronous process, so the processes do not wait until the other is synchronized. The AFS however, will wait until the
synchronization is ready. The sequence of the stpapi.* calls is as much as possible the same as the
actions performed with the user interface to do actions on a combination of a multi-occurrence and single-occurrence session.
Synchronization is necessary to:
* Insert records.
* Update records.
* Execute a form command of the single-occurrence session.
* Retrieve data from the single-occurrence session.
In the next paragraphs, these actions are described in more detail and for
each an example is given.
Inserting records
To insert a record, the multi-occurrence session must be started and also the editable single-occurrence dialog box. The values for the new record must be
sent to the single-occurrence session. The stpapi.insert() call is sent to the multi-occurrence session, the stpapi.recover() is sent to the singleoccurrence
session. To insert records in a type 3 multi-occurrence session (with view), the view
must first be set.
Example type 2, multi-occurrence:
ret = stpapi.synchronize.dialog("dtfsa1501m000", "add", error.msg)
if ret then
stpapi.put.field("dtfsa1101s000", "dtfsa101.seno", str$(new.seno)
stpapi.put.field("dtfsa1101s000", "dtfsa101.name", new.name)
ret = stpapi.insert("dtfsa1501m000", true, error.msg)
if not ret then
ret = stpapi.recover("dtfsa1101s000", error.msg)
endif
endif
stpapi.end.session("dtfsa1501m000", error.msg)
Explanation:
By calling the stpapi.synchronize.dialog() function, the multi-occurrence and single-occurrence sessions are both started. The fields are filled for the
single-occurrence session. The insert is sent to the multi-occurrence session (the Add button is there). If the insert fails, the recover must be performed on
the single-occurrence session (where the Revert button resides). The synchronized dialog box is killed when the multi-occurrence session is ended.
Example type 3, multi-occurrence:
stpapi.put.field("dtfsa1502m000", "dtfsa102.seno", str$(i.seno)
ret = stpapi.change.view("dtfsa1502m000", error.msg)
if ret = 1 then
ret = stpapi.synchronize.dialog("dtfsa1502m000", "add", error.msg)
if ret then
stpapi.put.field("dtfsa1102s000", "dtfsa102.pono", str$(new.pono)
stpapi.put.field("dtfsa1102s000", "dtfsa102.name", new.name)
ret = stpapi.insert("dtfsa1502m000", true, error.msg)
if not ret then
ret = stpapi.recover("dtfsa1102s000", error.msg)
endif
endif
stpapi.end.session("dtfsa1502m000", error.msg)
Explanation:
Almost the same as the previous example. However, a stpapi.change.view() must be called to fill the View field. During the synchronization, the view
fields are copied to the single-occurrence session.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
Sponsored Links
  #5  
Old 10th July 2005, 18:09
srinivas's Avatar
srinivas srinivas is offline
Senior Member
 
Join Date: Nov 2001
Location: South India
Posts: 213
srinivas is on a distinguished road
Baan: Baan4,Baan ERP - DB: Oracle, Informix, SQL Server, Baanbase - OS: Unix, Solaris, NT, Win 2K
found reason

The session to be used is tisfc0101s000 and not tisfc0101m100.
__________________
Regards,
Srinivas
Reply With Quote
  #6  
Old 20th July 2005, 09:11
brewskizzle's Avatar
brewskizzle brewskizzle is offline
Junior Member
 
Join Date: Oct 2002
Location: client site
Posts: 14
brewskizzle is on a distinguished road
Baan: BaanIVc4, Baan50C - DB: ORACLE8, 9, SQL server - OS: NT, 2000, UNIX
SSA ERP LN 6.1 Programmers Guide

Hi N. Prashanth Rao,

I looked for the documents you mentioned in Baan support site but couldn't find it... Can you please tell me where I can get it, or can you attache it here? I'm looking for both "SSA ERP LN 6.1 Programmers Guide" and "OW/AFS/API-2.5/2.6 manuals"...

Thanks,
Yusuke
Reply With Quote
  #7  
Old 20th July 2005, 09:28
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,029
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Yusuke,

I am not sure if its allowed to attach BaaN/SSA standard documents here due to copyright issues.

"SSA ERP LN 6.1 Programmers Guide" is automatically installed when you install the LN - DFE (Dynamic Form Editor).

"OW/AFS/API-2.5/2.6 manuals" - These documents/software are provided in the latest OW Installations/Documentations CDs.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #8  
Old 20th July 2005, 09:40
Moon Lok's Avatar
Moon Lok Moon Lok is offline
Member
 
Join Date: Mar 2004
Location: HKSAR
Posts: 53
Moon Lok is on a distinguished road
Baan: Triton 3.1b - DB: Tbase - OS: HP-UX 11.11
U8233A US 
SSA® OpenWorldX Studio 2.5 - Developer's Guide for Application Function Sever
__________________
MIS Dept.
Rickson Engineering Limited
Reply With Quote
  #9  
Old 20th July 2005, 10:00
brewskizzle's Avatar
brewskizzle brewskizzle is offline
Junior Member
 
Join Date: Oct 2002
Location: client site
Posts: 14
brewskizzle is on a distinguished road
Baan: BaanIVc4, Baan50C - DB: ORACLE8, 9, SQL server - OS: NT, 2000, UNIX
Cannot find...

Hi Rao,

Thanks for your quick reply.
I have DFE 7.6a.4 installed on my pc but cannot find the document. Can you tell me where I can find it? I started help from DFE menu, but it gives only windows help for SSA Enterprise Studio 7.6, and not showing anything like Programmers Guide...

regards,
Yusuke
Reply With Quote
  #10  
Old 20th July 2005, 10:03
brewskizzle's Avatar
brewskizzle brewskizzle is offline
Junior Member
 
Join Date: Oct 2002
Location: client site
Posts: 14
brewskizzle is on a distinguished road
Baan: BaanIVc4, Baan50C - DB: ORACLE8, 9, SQL server - OS: NT, 2000, UNIX
Found it!

Hi Rao,

I just found it under the help directory!
Thanks for your help.
Reply With Quote
  #11  
Old 21st July 2005, 08:25
Paul P's Avatar
Paul P Paul P is offline
Guru
 
Join Date: Jul 2002
Location: Jakarta, Indonesia
Posts: 797
Paul P is on a distinguished road
Baan: BaanIV, BaanERP - DB: SQL Server, Informix, Oracle - OS: Windows, HP-UX
Aaah, Srinivas, that was an annoying problem wasn't it, working with API DLL ? You actually have to create separate DLLs for tisfc0501m000 and tisfc0101s000. I personally like to code directly in API rather than using API DLL. To me, debugging the script becomes easier that way. Good to hear you got it solved though

Rgds,
Paul
__________________
Pambudi

Visit my technology consulting blog
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
Editable Synchronized Dialog Not Started kathuria AFS/DDC/OLE: Function servers 4 10th May 2005 09:34
set synchronized dialog in synchronized dialog.. en@frrom Tools Development 1 13th August 2004 17:09
Scrolling in multi-occ synchronized dialog en@frrom Tools Development 3 14th January 2004 17:42
synchronized dialog spartacus Tools Development 1 20th March 2003 22:29


All times are GMT +2. The time now is 23:18.


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