Retirement Notice
|
|
User login
|
|
Frontpage Sponsor
|
|
Poll
|
What do you expect from your SI Implementation partner for the success of ERP implementation. Bring best practices - Not to offer more CR's Leveraging standard functions 20% Need more honesty to work with the Users until their processes are fully mapped & Users are trained 40% Focus on process automation/ integrations/ Real time data/ BI analytics 13% Stick to basics 27% Total votes: 15 |
|
|
 |

6th December 2022, 04:50
|
Junior Member
|
|
Join Date: Dec 2021
Posts: 11
|
|
Baan: erpln 10 -
DB: oracle -
OS: windows 7
|
tdsls4101m000 does not show errors
hello
when inserting a row, if there are errors in the data, then afs does not show errors.
for example, if there is no such product in the database.
Code:
session = "tdsls4101m000"
stpapi.put.field(session, "tdsls401.orno", orno.o)
error.msg = get.string.arg(1)
retval = stpapi.change.view(session, error.msg)
put.string.arg(1, error.msg)
IF retval = 0 THEN
retval = stpapi.synchronize.dialog(session, "add", error.msg)
session1 = "tdsls4101m000"
IF retval THEN
stpapi.put.field(session1, "tdsls401.item.segment.1", "")
stpapi.put.field(session1, "tdsls401.item.segment.2", zrsfc121.item(1;38))
SELECT *
FROM zazir101
WHERE zazir101.onum = :onum.i
SELECTDO
effn.i = zazir101.effn
ENDSELECT
stpapi.put.field(session1, "tdsls401.effn", str$(effn.i))
stpapi.put.field(session1, "tdsls401.cprj", cprj.i)
stpapi.put.field(session1, "tdsls401.cact", "1")
stpapi.put.field(session1, "tdsls401.qoor", "1")
| stpapi.put.field(session1, "tdsls401.odat", str$(ddat))
stpapi.put.field(session1, "tdsls401.stbp", stbp)
stpapi.put.field(session1, "tdsls401.stad", ofad)
stpapi.put.field(session1, "tdsls401.pric", "10000")
stpapi.put.field(session1, "tdsls401.oamt", "10000")
stpapi.put.field(session1, "tdsls401.ccty", "1")
stpapi.put.field(session1, "tdsls401.cvat", cvat)
retval = stpapi.insert(session1, true, error.msg)
IF not isspace(error.msg) THEN
print.errors(
"1",
session1,
error.msg,
trim$(zrsfc121.item),
orno.o)
ENDIF
IF retval THEN
session2 = "tdsls4830s000"
stpapi.put.field(session2, "inventory.short", str$(etol(tdsls.ssop.no.action)))
stpapi.end.session (session2, error.msg)
retval = stpapi.save(session1, error.msg)
IF not isspace(error.msg) THEN
print.errors(
"2",
session1,
error.msg,
trim$(zrsfc121.item),
orno.o)
ENDIF
ENDIF
ENDIF
ENDIF
stpapi.end.session(session1, error.msg)
stpapi.end.session(session, error.msg)
Last edited by zhilenko_myu : 7th December 2022 at 05:18.
|

6th December 2022, 14:13
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,819
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
I typically validate data before I insert a record. Is there anything in error message when you do the stpapi.synchronize.dialog? From the example in the documentation looks like you put the fields to the session opened and then do an insert on the main session.
Code:
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)
__________________
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.
|

7th December 2022, 05:15
|
Junior Member
|
|
Join Date: Dec 2021
Posts: 11
|
|
Baan: erpln 10 -
DB: oracle -
OS: windows 7
|
Quote:
Originally Posted by mark_h
I typically validate data before I insert a record. Is there anything in error message when you do the stpapi.synchronize.dialog? From the example in the documentation looks like you put the fields to the session opened and then do an insert on the main session.
Code:
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)
|
that's just the point the error message does not give
|

6th December 2022, 14:19
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,819
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
I recommend searching the AFS/DDC/OLE: Function servers forum for tdsls4101m000. Lots of threads and it appears DAL might be best. Just some sample threads below - one talks dal and the other mentions a main and sub with same name - no solution.
http://www.baanboard.com/baanboard/s...=tdsls4101m000
http://www.baanboard.com/baanboard/s...=tdsls4101m000
__________________
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.
|

7th December 2022, 05:16
|
Junior Member
|
|
Join Date: Dec 2021
Posts: 11
|
|
Baan: erpln 10 -
DB: oracle -
OS: windows 7
|
Quote:
Originally Posted by mark_h
|
DAL cannot be used, there are extensions for this session
|

11th January 2023, 15:26
|
 |
Guru
|
|
Join Date: Mar 2002
Location: NetherBelgium
Posts: 1,376
|
|
Baan: Infor LN 6.1 10.2.1 > 10.7 -
DB: MS SQL2017 -
OS: VM WindowsServer2016
|
Quote:
Originally Posted by zhilenko_myu
DAL cannot be used, there are extensions for this session
|
And consider to move the extensions on the session to extensions on the table tdsls401, then use the DAL method and the table extension will also work
__________________
Also read Luke 24:4-8
After that you can find many answers on Infor, LN, BaanIV, BaanV, InforLN and ION and even some questions asked here on baanboard.com
|

7th December 2022, 15:05
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,819
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
I still recommend you search the threads. I do not have access to LN and I have never used it. The first thread - shows a where they copied the session and turned something off. That technique might work for you. The next thread has in the final post something that someone else did - not sure it will work on LN I did not look closely.
http://www.baanboard.com/baanboard/s...=tdsls4101m000
http://www.baanboard.com/baanboard/s...=tdsls4101m000
__________________
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.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|