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
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 January 2002, 10:52
srinivas's Avatar
srinivas srinivas is offline
Senior Member
 
Join Date: Nov 2001
Location: South India
Posts: 213
srinivas is on a distinguished road
Baan: Baan4,Baan ERP - DB: Oracle, Informix, SQL Server, Baanbase - OS: Unix, Solaris, NT, Win 2K
How to generate receipt number

Hi,

I am trying to generate a receipt using STPAPI. In the child process I am getting error message as 1. What does it mean?
Finally I am getting error "Command cancelled". That means the receipt number is not generated and hence update is not possible. How to generate this number? In manual process as you close tdpur4224s000 receipt number would be generated. but this is not happening here with API. Pls tell me where the problem is lying.

Thanks & Regards,
Srinivas

Code:
      	       
       	stpapi.put.field("tdpur4120m000", "tdpur045.reno", reno)
	stpapi.put.field("tdpur4120m000", "form.dino", dino)
	stpapi.put.field("tdpur4120m000", "tdpur045.orno", orno)
	stpapi.put.field("tdpur4120m000", "tdpur045.pono", pono)

	stpapi.handle.subproc( "tdpur4120m000", "tdpur4224s000", "add")
	stpapi.put.field("tdpur4224s000", "form.orno", orno)
	stpapi.continue.process("tdpur4224s000", error.msg)

	Message("Child process error = %s",error.msg)
	
	stpapi.end.session("tdpur4224s000")

		
	chview=stpapi.change.view("tdpur4120m000")
	
	stpapi.end.session("tdpur4224s000")


	stpapi.put.field("tdpur4120m000", "tdpur045.orno", orno)
	stpapi.put.field("tdpur4120m000", "tdpur045.pono", pono)

	
	stpapi.save("tdpur4120m000",err)
	
	ret.code = stpapi.find("tdpur4120m000")




	stpapi.put.field("tdpur4120m000", "tdpur045.diqu", diqu)
	stpapi.put.field("tdpur4120m000", "tdpur045.date", str$(work.date))
	stpapi.put.field("tdpur4120m000", "tdpur045.dqua", dqua)


	stpapi.update("tdpur4120m000", 1, err)

	Message(err)

	stpapi.save("tdpur4120m000",err)

	stpapi.end.session("tdpur4120m000")

Last edited by patvdv : 3rd January 2002 at 11:34.
Reply With Quote
Sponsored Links
  #2  
Old 4th January 2002, 17:42
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 6,906
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Updating or Creating Receipts

Hi srinivas,

I am not sure I understand - are you creating or updating a receipt? From your questions it appears you are trying to create a receipt. Below is some sample code that creates a receipt on our system(too lazy to format it):
Code:
         string err(50),reno(20)
	 long	ret

        stpapi.put.field("tdpur4120m000", "form.dino", "1")
	stpapi.handle.subproc( "tdpur4120m000", "tdpur4224s000", "add")
| This activates the tdpur4224s000 session.
	ret = stpapi.change.view("tdpur4120m000")
        stpapi.put.field("tdpur4224s000", "form.orno", "411310")
        stpapi.continue.process("tdpur4224s000", err)
	if(strip$(err)<>"" and strip$(err)<>"Process is gone") then
		Message("Child process error = %s",err)
	endif
| No matter what kill the session.	
        stpapi.end.session("tdpur4224s000")
| Now get the receipt number just created.	
	stpapi.get.field("tdpur4120m000","tdpur045.reno",reno)
| At this point you could update receipt fields.	
	stpapi.end.session("tdpur4120m000")
The above code creates a receipt on our system. I did this as a test and I hope this helps you. Notice how I ignore the process is gone error. I have run into this before and even though I get an error it appears to have worked. That may not always be true and I always check it out.

I warned you that this was a tough one to start on.

Good Luck!

Mark
Reply With Quote
  #3  
Old 7th January 2002, 05:35
srinivas's Avatar
srinivas srinivas is offline
Senior Member
 
Join Date: Nov 2001
Location: South India
Posts: 213
srinivas is on a distinguished road
Baan: Baan4,Baan ERP - DB: Oracle, Informix, SQL Server, Baanbase - OS: Unix, Solaris, NT, Win 2K
Thumbs up Update is already done....

Hi Mark,

I already successfully finished the update receipt part and I have posted it already as my reply in an earlier thread. I generated a receipt number manually and the updated the receipt quantity using STPAPI calls. Now I am creating a new receipt and for this I am stuckup during generating the receipt number.

I successfully tried making an Inventory adjustment also .

Let me try your suggestion and revert.

Thanks and Regards,
Srinivas
Reply With Quote
  #4  
Old 7th January 2002, 07:20
srinivas's Avatar
srinivas srinivas is offline
Senior Member
 
Join Date: Nov 2001
Location: South India
Posts: 213
srinivas is on a distinguished road
Baan: Baan4,Baan ERP - DB: Oracle, Informix, SQL Server, Baanbase - OS: Unix, Solaris, NT, Win 2K
Unhappy Not Working.......

Hi Mark,

I used your code. But it is not working. get.field is getting the already existing receipt number but I want to generate a new receipt number and update the other fields like quantity, date etc.

Using my earlier code if I try to insert a record by supplying the First free number for Receipts and Packing Slip number System is not accepting and saying that "Record already exists".

In the Child process I am getting an error message as "1" what does it mean?

If one wants to do a receipt manually then he would give a first free number, then pack slip number then order number in the session which pops up. When he presses continue a Receipt number is generated. How to achieve this ? I am getting a message "Record already exists" with my code. But that record is for serial number Zero. This serial number has to generated by the system it self.

Thanks and Regards,
Srinivas
Reply With Quote
  #5  
Old 24th September 2016, 09:09
Vignesh T Vignesh T is offline
Newbie
 
Join Date: Sep 2016
Posts: 1
Vignesh T is on a distinguished road
Baan: 7.1.d.03.155 - DB: Inventory - OS: Windows 7
Unhappy Need Code File

Hi Srinivas

I am doing the receipt update in Baan Daily. I am searching for some code that can be used to copy the receipt Number or Issue number from the excel sheet and update the same in the Baan. Can you please send me the file to my mail vignesh.thana@gmail.com.

Thanks in advance
T. Vignesh
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
Receipt Number in Collect orders sandeep_Kumar Distribution, Transportation & Warehousing 1 28th September 2004 00:51
Generate report for each SOR number seperatly mostrightfuture Tools Development 26 25th June 2004 11:14
Cheque number for preparing receipt mukeshl11 Finance, Invoicing and Integration 2 19th February 2003 18:42
Lot Number Vs Receipt Number in BaaN IV C4 Abuibra Distribution, Transportation & Warehousing 2 11th October 2002 17:22
Problem: increment of purchase receipt line tbrault Distribution, Transportation & Warehousing 5 3rd July 2002 09:20


All times are GMT +2. The time now is 13:55.


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