Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

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 3rd November 2014, 20:06
Sandy Blondino's Avatar
Sandy Blondino Sandy Blondino is offline
Senior Member
 
Join Date: Apr 2003
Location: Virginia
Posts: 104
Sandy Blondino is on a distinguished road
Baan: B40c4 - DB: SQL -
bpmdm001 DAL
Baan: Infor10 ERP
C/S: None/Unknown

Hello,
I have a question about writing a session using the DAL for bpmdm001.

I'm writing a session to input data from PeopleSoft into the employee and people tables in LN. I've used the tccom001 DAL and the tccom130 DAL to input data, but I cannot get the bpmdm001 DAL to work.

Has anyone had any luck using the bpmdm001 DAL?
Do you think I would have better luck trying to insert a record by using the AFS method?

Any help is appreciated.
Thanks,
Sandy
Reply With Quote
  #2  
Old 3rd November 2014, 20:24
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,287
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

What problems are you facing with bpmdm001 DAL? Pointing some out might help. Have used quite time back. Didn't had any issue.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 3rd November 2014, 20:36
Sandy Blondino's Avatar
Sandy Blondino Sandy Blondino is offline
Senior Member
 
Join Date: Apr 2003
Location: Virginia
Posts: 104
Sandy Blondino is on a distinguished road
Baan: B40c4 - DB: SQL -
reply

Hello,
I don't get an error, but the record is just not there in the bpmdm001 table. The data to be inserted is stored in the tccgs001 table.

Here is the code snippet:
Code:
error.found = dal.new.object("bpmdm001")
if error.found then
     error.mess = "Could not insert record"
     error.mess = dal.error.file
     return
endif

dal.set.field("bpmdm001.emno", tccgs001.emno)		| employee id code
dal.set.field("bpmdm001.cadr", temp.addr.code)		| address code from 
dal.set.field("bpmdm001.sexe", bpmdm.sexe.not.appl)	| 3 - gender 
dal.set.field("bpmdm001.emtp", bpmdm.emtp.internal)	| 1 - employee type
dal.set.field("bpmdm001.msty", tccom.mestype.na)	| 10 - messenger pe				
| convert hwem from string to float 
temp.hwem = lval(tccgs001.hwem)
dal.set.field("bpmdm001.hwem", temp.hwem)		
domain 	tcmcs.str2 str.monthno, str.dayno
domain	tcmcs.str4 str.yearno
STRING  str.date(8,1)				
str.date(1,1;8) = tccgs001.sdte
str.monthno = str.date(1,1;2)
str.dayno = str.date(3,1;2)
str.yearno = str.date(5,1;4)
domain	tcmcs.str8  temp.sdte
temp.sdte = str.monthno & str.dayno & str.yearno	 	
| convert string to long
long.sdte = lval(temp.sdte)
dal.set.field("bpmdm001.sdte", long.sdte)					
if error.found then
	error.mess = dal.error.file
else
	commit.transaction()
endif

Last edited by bhushanchanda : 3rd November 2014 at 21:23. Reason: Added code tags
Reply With Quote
Sponsored Links
  #4  
Old 3rd November 2014, 21:21
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,287
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi,

Please add dal.save.object("bpmdm001") before commit.
I guess you missed it.

Code:
long ret
error.found = dal.new.object("bpmdm001")
if error.found then
error.mess = "Could not insert record"
error.mess = dal.error.file
return
endif

dal.set.field("bpmdm001.emno", tccgs001.emno)	| employee id code
dal.set.field("bpmdm001.cadr", temp.addr.code)	| address code from 
dal.set.field("bpmdm001.sexe", bpmdm.sexe.not.appl)	| 3 - gender 
dal.set.field("bpmdm001.emtp", bpmdm.emtp.internal)	| 1 - employee type
dal.set.field("bpmdm001.msty", tccom.mestype.na)	| 10 - messenger pe	
| convert hwem from string to float 
temp.hwem = lval(tccgs001.hwem)
dal.set.field("bpmdm001.hwem", temp.hwem)	
domain tcmcs.str2 str.monthno, str.dayno
domain	tcmcs.str4 str.yearno
STRING str.date(8,1)	
str.date(1,1;8) = tccgs001.sdte
str.monthno = str.date(1,1;2)
str.dayno = str.date(3,1;2)
str.yearno = str.date(5,1;4)
domain	tcmcs.str8 temp.sdte
temp.sdte = str.monthno & str.dayno & str.yearno	
| convert string to long
long.sdte = lval(temp.sdte)
dal.set.field("bpmdm001.sdte", long.sdte)	
ret = dal.save.object("bpmdm001")
if ret = 0 then
    commit.transaction()
endif

endif
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #5  
Old 6th November 2014, 15:12
Sandy Blondino's Avatar
Sandy Blondino Sandy Blondino is offline
Senior Member
 
Join Date: Apr 2003
Location: Virginia
Posts: 104
Sandy Blondino is on a distinguished road
Baan: B40c4 - DB: SQL -
thank you

That was it. I did just forget to add that statement.

Thanks for your help,
Sandy
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
Inactivate a DAL (?) zardoz Tools Development 3 21st October 2014 10:13
DAL big problem - doesn't insert in tirou102 simona Tools Development 4 19th January 2012 13:50
tdsls4122m000 and tdsls401 DAL Sandy Blondino Tools Development 0 16th September 2011 20:53
When DAL 1 or DAL 2 in Infor LN 6.1 gget79 Tools Development 5 27th May 2009 10:23
DAL activation srinivas Tools Development 5 2nd January 2003 07:07


All times are GMT +2. The time now is 04:54.


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