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 11th September 2013, 12:20
patwanirav patwanirav is offline
Member
 
Join Date: May 2011
Posts: 38
patwanirav is on a distinguished road
Baan: Baan 4 - DB: Infor - OS: Xp
Smile How to press "OK" button through AFS in ERP LN FP7.

I am unable to press "OK" button of the attached session "tfacp1210m000" through AFS.

When i use the "stpapi.continue.process" or "stpapi.save", it gives me error "Command Disable".

When i use stpapi.end.session, the data is not populated into the parent session. My code is as bolow.
Code:
stpapi.form.command("tfgld1101m100", 5, "enter.transactions", error)
ret = stpapi.synchronize.dialog("tfacp1110s000", "add", error)		
stpapi.form.command("tfacp1110s000", 5, "copy.from.preregistration", error)
if isspace(error) then
    stpapi.put.field("tfacp1210m000","tfacp100.ninv",str$(lpbpm501.ninv))
    ret = stpapi.find("tfacp1210m000",error)
    if isspace(error) then
	ret_1 =stpapi.mark("tfacp1210m000", error)
	stpapi.enum.answer("tfacp1210m000", "tfacps1110.3", tcyesno.yes)
	stpapi.end.session("tfacp1210m000")
    endif
endif
Now if the above code is perfect then why it is not populating data to the parent session "tfacp1110s000" through AFS. Because after writing the above code when i write code

ret = stpapi.insert("tfacp1110s000", 1, error )

it gives me error "Cash Flow reason must be filled."

Please help...

Thanks in advance...
Attached Images
File Type: jpg AFS_OK_PROB1.JPG (57.5 KB, 68 views)
File Type: jpg AFS_OK_PROB2.JPG (29.0 KB, 60 views)

Last edited by mark_h : 14th September 2013 at 22:26. Reason: add code tags for readability.
Reply With Quote
  #2  
Old 14th September 2013, 22:32
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Typically the okay button is the same as the continue button. At least in 4c4 that is what it usually is - and I just use the continue command. So try just using the stpapi.form.command for continue - that might work. Having said that sometimes there is code in a standard session that might prevent AFS code from working. I am not familiar enough with LN to know how these sessions work or what would work with these sessions.
__________________
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 15th September 2013, 08:06
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
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,

As Mark said, LN works the same way. You need to use continue command to press the OK button.

Try this:-

stpapi.form.command( "tfacp1110s000", 5, "exec.cont.process", error )
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #4  
Old 7th March 2014, 08:11
vaishrii's Avatar
vaishrii vaishrii is offline
Junior Member
 
Join Date: Mar 2004
Posts: 22
vaishrii is on a distinguished road
Baan: Baan4c4 - DB: SQL7 - OS: Windows 2003
Arrow

This is in regard with the same case stated above..

I am facing the issue in AFS of Purchase Invoice Entry (tfacp2600m000) on ERP LN FP9 version.
From this session i want to zoom to subsession tfacp1210m000 to copy the Received Invoice...

The standard script of (tfacp2600m00) calls the function copy.from.preregistration()

and in this function the command to get the zoom.ninv value is ;
zoom.ninv = lval(start.session(MODAL,"tfacp1210m000", prog.name$,"tfacp100.ninv"))

and based on value returned from the zoom session the copy record function is executed i.e record from Received invoice(tfacp1210m000) is copied to main session tfacp2600m000
(table tfacp100 record is copied to tfacp200 and status is updated in tfacp100 to copied.)

The afs works fine for main session i.e Batch creation (tfgld1101m000) / transaction type entry. (tfgld1101m100)
but once tfacp2600m000 starts, it fails for copy.preregistration fucntion()
no value returned from zoom sesssion and i get the afs error 'Record not found' and hence unable to save the invoice in tfacp2600m000 session.

please refer the afs code below:
stpapi.put.field("tfgld1101m000", "tfgld100.year", str$(year))
stpapi.put.field("tfgld1101m000", "tfgld100.btno", str$(btno))
ret = stpapi.find("tfgld1101m000", error)
if ret then
stpapi.handle.subproc("tfgld1101m000","tfgld1101m100","add")
stpapi.put.field("tfgld1101m100", "tfgld101.year", str$(year))
stpapi.put.field("tfgld1101m100", "tfgld101.btno", str$(btno))
stpapi.put.field("tfgld1101m100", "tfgld101.ttyp", str$(ttyp)) ret_1 = stpapi.find("tfgld1101m100", error)
if ret_1 = 1 then
ret_1 = stpapi.mark("tfgld1101m100",error)
stpapi.form.command("tfgld1101m100", 5, "enter.transactions", error)
if ret_1 = 1 then
ret = stpapi.insert("tfacp2600m000", 1, error) stpapi.put.field("tfacp2600m000","tfacp200.ttyp",str$(ttyp))
stpapi.form.command("tfacp2600m000", 5, "copy.from.preregistration", error)
if isspace(error) then
stpapi.put.field("tfacp1210m000","tfacp100.ninv",str$(ninv))
ret = stpapi.find("tfacp1210m000", error)
if ret then
ret = stpapi.mark("tfacp1210m000",error)
if ret then
stpapi.form.command("tfacp1210m000", 5, "exec.end.program",
error)
(tried to end the session with above command ) and even stpapi.form.command("tfacp1210m000", 5, "exec.cont.process", error) does not work
stpapi.end.session("tfacp1210m000", error) - with this sesion ends
once we come out of session tfacp1210m000 , system gives the message (tfacp1210.02) , just press ok and invoice is copied , but this message is also not seen in backend when afs is executed. infact error messcode says "Record not found"
err = stpapi.get.mess.code("tfacp2600m000", error)
I dont understand where the afs goes wrong.

Please guide / suggest !

v.v.urgent....

Regards,
Vaishali
Reply With Quote
  #5  
Old 7th March 2014, 21:36
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Do you have source code where you can debug what happens? That would be best in determining where it is failing.


I am not an LN person - so this is just best guess. I would make sure this command stpapi.form.command("tfacp2600m000", 5, "copy.from.preregistration", error) really starts the tfacp1210m000 session. In your session you should be able to watch and see what processes are starting - and see the parent process id. What I am not sure about since this launches another session if you need a stpapi.handle.subproc before you issue the form command to launch copy.from.preregistration. So I might even try what is below - please keep in mind I am basing this off my 4c4 experience and it might be completely wrong. I removed the mark record commands because a find makes the record current.
Code:
	if ret_1 = 1 then
		stpapi.handle.subproc("tfgld1101m100", "tfacp2600m000", "add")
		stpapi.form.command("tfgld1101m100", 5, "enter.transactions", error)
		if ret_1 = 1 then
			stpapi.put.field("tfacp2600m000","tfacp200.ttyp",str$(ttyp))
			ret = stpapi.insert("tfacp2600m000", 1, error)				
			stpapi.handle.subproc("tfacp2600m000", "tfacp1210m000", "add")
			stpapi.form.command("tfacp2600m000", 5, "copy.from.preregistration", error)
			if isspace(error) then 
				stpapi.put.field("tfacp1210m000","tfacp100.ninv",str$(ninv))
				ret = stpapi.find("tfacp1210m000", error)
				if ret then 
					stpapi.form.command("tfacp1210m000", 5, "exec.cont.process", error)

Now for the returned message it will probably not be in the error, but you might be get it with stpapi.get.mess.code to get the last message from the session.
__________________
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
  #6  
Old 8th March 2014, 06:45
vaishrii's Avatar
vaishrii vaishrii is offline
Junior Member
 
Join Date: Mar 2004
Posts: 22
vaishrii is on a distinguished road
Baan: Baan4c4 - DB: SQL7 - OS: Windows 2003
unfortunately, I cannot the debugg the source script ....

I tried the steps listed above, but same error code m getting.
Earlier I had tried with handle subproc, but i got same result so ignored..
Reply With Quote
  #7  
Old 9th March 2014, 13:44
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
In debug mode does this stpapi.form.command("tfacp2600m000", 5, "copy.from.preregistration", error) actually launch the tfacp1210m000 session?
__________________
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
  #8  
Old 10th March 2014, 05:29
vaishrii's Avatar
vaishrii vaishrii is offline
Junior Member
 
Join Date: Mar 2004
Posts: 22
vaishrii is on a distinguished road
Baan: Baan4c4 - DB: SQL7 - OS: Windows 2003
Yes, I could see tfacp1210m000 opening as a subsession to tfacp2600m000.
Also after find command the required invoice was captured, but as i end the subsession, data is lost...
Reply With Quote
  #9  
Old 10th March 2014, 14:41
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I am not sure what 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.
Reply With Quote
  #10  
Old 10th March 2014, 18:08
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
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,

When you copy the record, a message tfacp1210.02 pops up. Verify if you are handling those messages in your AFS. Else, the session tfacp1210m000 wont end.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #11  
Old 11th March 2014, 09:16
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
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
And yes its an MMT session which could cause possible issues.

Check this thread!
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #12  
Old 11th March 2014, 15:23
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,930
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Thumbs up Good catch Bhushan

Good catch Bhushan. I forgot all about MMT sessions having issues. That was actually one of the reasons I have a mantra that recommends exploring DAL2 functionality.
__________________
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
Sponsored Links
  #13  
Old 11th March 2014, 16:56
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
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
Exactly Mark. This session will need some manual table updations wherever required. Its not a big deal though. Sometimes, you really have to find other ways as its also a "solution" in urgent situations.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #14  
Old 12th March 2014, 09:05
vaishrii's Avatar
vaishrii vaishrii is offline
Junior Member
 
Join Date: Mar 2004
Posts: 22
vaishrii is on a distinguished road
Baan: Baan4c4 - DB: SQL7 - OS: Windows 2003
The script to handle the message is already written. But I am not getting the above message code, infact the message code which i get is of 'Record not found' error after end of session tcap1210m000 and before end if i try to check message code its blank.

currently I have written afs to manually insert record in tfacp2600m000 and update the record of tfacp1210m000 (tfacp100) session through dal.

no dal2 found for tfacp200 table in LN FP9.
Reply With Quote
  #15  
Old 12th March 2014, 09:49
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
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
Yes, its a way to do it. AFS has always faced issues with handling MMT session.

One more hint, can you try assigning the values to tfacp200.ifbp, tfacp200.isup before opening session tfacp1210m000?
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!

Last edited by bhushanchanda : 12th March 2014 at 11:39.
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
ERP Ln FP2 FP7 Functional Consultant with 7* Years Experience erpexpert Jobs and Resumes 0 24th August 2013 15:39
Manager - ERP Infor Ln (Logistics Consultant) HYVA India Jobs and Resumes 2 12th July 2013 14:49
Seeking experienced Logistics/Manufacturing for ERP LN FP7 Implementation teocupa Jobs and Resumes 0 17th May 2012 15:13
Seeking experienced Logistics/Manufacturing for ERP LN FP7 Implementation teocupa Jobs and Resumes 0 30th January 2012 23:11
SSA ERP-NL / Baan V6 is it Vaporware ? tjbyfield General Discussion & Chat 18 1st October 2004 11:50


All times are GMT +2. The time now is 00:09.


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