User login
|
|
Frontpage Sponsor
|
|
Poll
|
As a Customer What would do to keep your ERP Implementation intact Proactively define Business Process-- Take the Project Ownership 45% Handover everything to System Integrator from drawing BP till implementation of ERP 18% Hire more inhouse skilled & capable IT Resource to work directly with SI 36% Rely on SI Architects/Consultants 0% Total votes: 11 |
Baanboard at LinkedIn
|

|
|
|
 |

17th June 2013, 07:33
|
Member
|
|
Join Date: May 2013
Posts: 63
|
|
Baan: Baan IV -
DB: Oracle10g -
OS: Unix
|
To save record via tab cursor
Hi All
field.tsrep124.plan is last input field. So in after.field, i execute(update.db) or execute(start.set).Both executes save the record but the cursor moved to seq no 2 which already in table.
Cursor should move to new record and ready for new record.
1) field.tsrep124.plan:
after.input:
execute(update.db) or execute(start.set)
=> record save but cursor moved to seq 2.
2) Also try to use execute(add.set), but error recursion not implemented pop up.
If I added to.field after the update.db, cursor will moved to tsrep124.prin but at 1st seqn record.
field.tsrep124.plan:
after.input:
execute(update.db)
to.field("tsrep124.prin")
current record save but cursor moved to field prin at 1st seqn record
I need cursor moved to next seqn and save previous record.
Please assist me.
i attached the code in attachment.
Last edited by nolihayati isma : 17th June 2013 at 07:42.
|

18th June 2013, 10:30
|
Junior Member
|
|
Join Date: Oct 2006
Location: Germany
Posts: 19
|
|
Baan: LN 10.2.1 -
DB: Oracle 12c -
OS: RHEL
|
Hi,
as I understand your problem, you will force your session to save data on every change in occurrence.
Following code might be right for you:
after.form.read:
enable.save.on.occ.change()
Regards
|

18th June 2013, 11:23
|
Member
|
|
Join Date: May 2013
Posts: 63
|
|
Baan: Baan IV -
DB: Oracle10g -
OS: Unix
|
Hi,
Thank you for your feedback but there still no luck of me.
may be this suggestion option not available in Baan IV. I having compilation error.
The error is:
Unresolved reference to function 'enable.save.on.occ.change'
|

18th June 2013, 11:58
|
Member
|
|
Join Date: May 2013
Posts: 63
|
|
Baan: Baan IV -
DB: Oracle10g -
OS: Unix
|
Hi,
Thank you for your feedback but there still no luck of me.
may be this suggestion option not available in Baan IV. I having compilation error.
The error is:
Unresolved reference to function 'enable.save.on.occ.change'
|

18th June 2013, 16:09
|
Member
|
|
Join Date: May 2013
Posts: 63
|
|
Baan: Baan IV -
DB: Oracle10g -
OS: Unix
|
Hi,
problem resolved by myself by using db.insert and refresh.cur.occ in the after field.
The issue rectified as per code below:
Code:
field.tsrep124.plan: | This is last input field
after.input:
if tsrep124.plan = tcyesno.yes then
refresh.curr.occ()
tracking()
db.insert(ttsrep124)
commit.transaction()
endif
Special thanks to Bhushan Chanda & Bartman for your help and give me the idea to resolved it.
Last edited by mark_h : 18th June 2013 at 16:41.
Reason: add code tags.
|

18th June 2013, 16:41
|
 |
Guru
|
|
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,543
|
|
Baan: Baan 4C4 A&D1 -
DB: Oracle -
OS: Sun Solaris
|
Thanks for posting the solution. What does the tracking routine do?
The reason I ask is because I have a situation where moving between forms is not to clean. Even the baan standard sessions don't work the way they want me to code it - so anything might give me something else to try.
__________________
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.
|

18th June 2013, 18:09
|
 |
Guru
|
|
Join Date: Sep 2012
Location: India
Posts: 2,501
|
|
Baan: LN FP 1-9, 10.4, a little bit of Baan IV -
DB: SQL Server 2008, Oracle -
OS: Windows Server 2008 R2, Unix
|
Well done!
Glad to see this. Finally you managed to solve it! 
__________________
Regards,
Bhushan
Unless you try to do something beyond what you have already mastered, you will never grow!
|

19th June 2013, 05:40
|
Member
|
|
Join Date: May 2013
Posts: 63
|
|
Baan: Baan IV -
DB: Oracle10g -
OS: Unix
|
Hi Bhushan,
Thank you to you too.
Hi Mark,
The requirement is to block duplicate serial number during data entry. The problem is this serial no not defined as index.
What i do is, i create function to check the existing serial number entered.
and the last of input field, i code as above code.
Before i added refresh.curr.occ(), when the cursor move into the last field(in current seqn), I get message "record already exist (Ok/help) and when i clicked ok, cursor moved to next seqn ready for new data entry but prev seqn which just entered, not display. I just get to see the prev seqn by click edit, fresh.
Bartman advise me to add after.form.read: enable.save.on.occ.change() but this not available in Baan IV c4. and found this refresh.curr.occ in google.
With this stamement, the message disappear, record displayed and new entry not able to enter the same duplicate serial number.
Waiting customer to test hope not other impact to other module since this screen having a lot of 6 subsession/link.
Thank you to all.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Linear 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
|
|
|
|