Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th September 2014, 09:57
rajib.koley rajib.koley is offline
Junior Member
 
Join Date: Dec 2008
Location: Kolkata, India
Posts: 17
rajib.koley is on a distinguished road
Baan: Baan IV, V, ERP LN FP2 - DB: MS SQL 2005 - OS: Windows2003
Add Multiple line in Warehouse Receipt Line By AFS
Baan: ERP LN 6.1 FP5
DB: SQL Server 2008 R2
OS: Windows 2008
C/S: Client

Dear Gurus and All,
Can please guide, I can create receipt for single records. If there is multiple inbound line for any order , I am able to create receipts for individual line. But If I want to create single receipt with multiple receipt lines, could not succeed.
Code:
stpapi.put.field("whinh2110m000", "whinh210.oorg", str$(oorg))
stpapi.put.field("whinh2110m000", "whinh210.orno", orno)
stpapi.put.field("whinh2110m000", "whinh210.pono", str$(pono1))
stpapi.put.field("whinh2110m000", "whinh210.seqn", str$(seqn1))
stpapi.put.field("whinh2110m000", "whinh210.oset", str$(oset1))
		
ret = stpapi.change.view("whinh2110m000")
err.msg = stpapi.get.mess.code("whinh2110m000")
	
if ret = 1 then
	ret = stpapi.mark("whinh2110m000")
	stpapi.form.command("whinh2110m000", 5, "receive.order.lines", err.msg)
	if isspace(err.msg) then
		stpapi.put.field("whinh3512m000", "whinh310.cwar", "WHZCE1")
		stpapi.put.field("whinh3512m000", "whinh310.sfbp", "")
		stpapi.put.field("whinh3512m000", "whinh310.dino", pack.slip)
		stpapi.enum.answer("whinh3512m000", "whinh0064", tcyesno.yes)	

		stpapi.put.field("whinh3512m000", "whinh310.crdt", str$(date.f))
		retval1 = stpapi.update("whinh3512m000", false, error.msg) 	
		if retval1 then
			retval2 = stpapi.save("whinh3512m000", error.msg)
		endif
		if not retval1 or not retval2 then      		
			retval3 = stpapi.recover("dtfsa1101s000", recover.msg)		
		endif 		
				
		if isspace(error.msg) then
			stpapi.get.field("whinh2110m000", "whinh210.rcno", rec.no)
			if not isspace(rec.no) then
				update.rec.line()
				message("Warehouse Receipt no %s has generated",rec.no)
			endif
		endif
		stpapi.end.session("whinh3512m000")
		stpapi.end.session("whinh2110m000")
	else
		message("Warehouse Receipt no has not generated")
		message("Error: %s",err.msg)
	endif
endif


This part is working perfectly. When I tried to add receipt line, there is no runtime error, no error messages. But line is not added.


Code:
stpapi.put.field("whinh3512m000", "whinh310.rcno",rec.no)
ret1 = stpapi.find("whinh3512m000", err.msg)
if ret1 = 1 then
	stpapi.synchronize.dialog("whinh3512m000","MODIFY",err.msg)
	if isspace(err.msg) then
		stpapi.form.command( "whinh3512m100", 5, "option.add.new.orders", err.msg )
		stpapi.handle.subproc( "whinh3512m100", "whinh3820m000", "add" )
		if isspace(err.msg) then
		stpapi.put.field("whinh3820m000","whinh210.oorg",str$(oorg))
				stpapi.put.field("whinh3820m000","whinh210.orno",orno)
				stpapi.put.field("whinh3820m000","whinh210.oset",str$(oset1))
				stpapi.put.field("whinh3820m000","whinh210.pono",str$(pono1))
				stpapi.put.field("whinh3820m000","whinh210.seqn",str$(seqn1))
				stpapi.change.view("whinh3820m000",err.msg)
				ret = stpapi.find("whinh3820m000",err.msg)
				if ret then
					ret = stpapi.mark("whinh3820m000",err.msg)
					if ret then
						stpapi.form.command( "whinh3820m000", 5, "link.to.receipt.and.exit", err.msg )
						if not isspace(err.msg) then
							message("Error is %90s",err.msg)
						else
							ret = stpapi.insert("whinh3512m100",TRUE, err.msg)
							stpapi.get.field("whinh3512m100", "whinh312.rcln",rec.ln)
							update.rec.line()|Pack slip no & date update
						endif
					endif
				endif
			endif
			stpapi.end.session("whinh3820m000")
			stpapi.end.session("whinh3512m100")
			
		endif
	endif
	stpapi.end.session("whinh3512m000")



Thanks

Regards-
Rajib Koley
Reply With Quote
  #2  
Old 17th September 2014, 10:21
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,355
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,

AFAIK, you cannot do an AFS for MMT Sessions. Your first part works as there is not involvement of MMT Session. So, rather than going by old ways, you can try using DLL's to add new receipt line or DAL (in case you know the tables & values to be updated).
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 17th September 2014, 18:52
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,061
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
Quote:
AFAIK, you cannot do an AFS for MMT Sessions.
fyi... Bhushan,
Quote:
MMT handling in AFS implemented
--------------------------------------------------------------------------
TOOLS VERSION(S): 7.6_a7

SITUATION IDENTIFIED IN: "functionserver" (ttstpapihand)

SITUATION DESCRIPTION: Handling of MMT sessions not possible via AFS

SOLUTION DESCRIPTION:MMT session handling with AFS implemented
SPECIAL INSTRUCTIONS: None.

PATH NAME IN DIAL-UP DIRECTORY/WEB SITE: Below are the supported VRC's based on the Baan standard derivation structures.

If your Current Tools VRC is: 7.6_a7 (ES8.7): /download/updates/7.6_a7_tt/1017235tt.tar.gz
__________________
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 17th September 2014, 18:58
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,355
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 Prashant,

Yes. I went through this solution quite a time ago. Seems like it doesnt help. There are a lot of MMT sessions still , which do not support AFS. You have to end up using DAL or DLL's.

With FP7, some sessions are poorly implemented that you need DLL's even for normal sessions.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #5  
Old 18th September 2014, 16:47
kathuria's Avatar
kathuria kathuria is offline
Senior Member
 
Join Date: May 2004
Posts: 134
kathuria is on a distinguished road
Baan: BaaN IV, BaaN V, SSA ERP LN6.1(BaaN VI) - DB: SQL , Oracle - OS: UNIX, WIndow Server 2000/2003
Thumbs up Dal

I will say DAL is simple and reliable method to do it. I have done in FP3 and above. it's working perfectly fine.

Regards,
Sanjay Kumar
Reply With Quote
Sponsored Links
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
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Multiple receipt for one PO line item ashishj Distribution, Transportation & Warehousing 1 20th November 2013 17:32
Handling Unit functionality baazigar Distribution, Transportation & Warehousing 4 19th February 2012 15:54
How to CLOSE the Pending Inbound Warehouse Receipt Line ? BhushanPatil Distribution, Transportation & Warehousing 6 7th January 2008 04:03
Report with output with more than 255 char. Jaap Roos Tools Development 5 9th February 2007 21:37


All times are GMT +2. The time now is 16:30.


©2001-2018 - Baanboard.com - Baanforums.com