Kevin_Rell
23rd May 2002, 17:55
I have a function that uses Baan API function calls to update a receipt in Baan using the Maintain Receipts session (tdpur4120m000). We are on Baan IVc4. Everything works except I cannot get the backorder quantity to be anything other than the form default quantity.

My script is attached.

Can anyone tell me why the back order quantity (tdpur045.bqua) is not "sticking" when I set it?

Thanks,
Kevin

popeye
23rd May 2002, 19:50
Hi Kevin,
Here is the reason ...
Your code is fine.

The session itself does not let you modify the Back Order Qty.
The Function Server simulates the session.
Hence if the Session does not allow a field to be changed, the Function Server will behave in the same way.

Hope this helps.
Cheers,
p!

Kevin_Rell
23rd May 2002, 20:18
The backorder can be changed when going through the user interface. The field defaults to what's remaining but I can enter a new value (i.e. 0.00) if I want to.

There is a variable called api.mode that shows up in the source code for certain sessions. This variable is being used to exclude or include functionality only when using api's. I think this is what is happening in my case.

popeye
23rd May 2002, 20:22
Kevin
I am not sure what version you are working on.
I have IVc3 at this client. The script for IVc3 has an attr.input = false as the very first statement. It might be a customization without the relevant comments.

Anyways ... api.mode will be true if u r trying thru Function Server.
Could you please paste the relevant lines of code?
It'll be easier to zero in on the problem.

Cheers,
Popeye !

Kevin_Rell
23rd May 2002, 20:30
I attached a file with screen shots of the sections of Baan source code that I am looking at.

popeye
23rd May 2002, 20:43
Kevin,
In the attached script, there are couple of conditions which could fire the "attr.input = false" stmt.

Try this ... Call the DLL thru a 3 GL and debug it.
(Compile the session script in debug mode)

This would enable you to determine which condition is executing the attr.input = false stmt.

Hope this helps.
Cheers,
Popeye!