abdulk_bg
14th December 2002, 12:38
I Have doubt in using AFS for updating sales order.I am able to update sales order header.But in sales order lines, i am not able to insert record.The code has been written in VB and Baan libraries.Can anyone help in this regard?...

Thanking you inadvance

Abdulk_bg:)

mark_h
14th December 2002, 20:58
Post your code and maybe someone who is familiar with these sessions might see what the problem is. Also do you get an error on the insert or does it just not do anything? You might also want to search this forum I believe these sessions have been mentioned before.

Good Luck!

Mark

Renegade
15th December 2002, 09:40
maybe u can ask Jeyaseelan or Arun Prasath.
Perosnally, I know they have done AFS/BOI work on Sales Order generation in BCBE environment.

abdulk_bg
17th December 2002, 10:52
Hi Mark,

Herewith i am posting the latest script which inserts the sales order header.But in lines it hangs.After inserting the header,i am finding the particular record in sales order header. If it is successful then i am starting the handle.subproc then zoom point.But in zoom point it hangs.The code is in VB Script and i am calling Baan library in VB script.This is field by field updation.In zoompoint when the baan library is being called at that point it hangs.Should i have to put any patches...

Looking forward to hearing from you....

Thanks very much in advance.

Abdulk_bg.

abdulk_bg
17th December 2002, 10:56
Hi Mark,

Sorry in my previous mail eventhough i attached the file did not come in the posting.Again i am sending.

Herewith i am posting the latest script which inserts the sales order header.But in lines it hangs.After inserting the header,i am finding the particular record in sales order header. If it is successful then i am starting the handle.subproc then zoom point.But in zoom point it hangs.The code is in VB Script and i am calling Baan library in VB script.This is field by field updation.In zoompoint when the baan library is being called at that point it hangs.Should i have to put any patches...

Looking forward to hearing from you....

Thanks very much in advance.

Abdulk_bg.

Renegade
17th December 2002, 10:57
R u prepared to touch the source code?

sometimes it would be necessary for complex business processes like sales orders that u may have to touch the source code, particularly if u have localization objects also in the picture.

like u will have to check the before.zoom sections of UI code

arunprasath
18th December 2002, 05:16
Hi,
what you have posted is the intermediate dll created using ttstpcreatdll session.
can you post your vb code, where in you are calling the baan sessions? That would help.

abdulk_bg
19th December 2002, 10:06
Hi Arun,

Thanks for your prompt reply.

First of all i am regret for the delay because i was away from the office for 2 days.

Herewith i am sending the source code as an attachment.


Thanks
Abdulk_bg :)

arunprasath
19th December 2002, 10:39
Hi,
I have seen your code.
From the main session tdsls4101m000, if you want to go to subsession tdsls4105s000, you should use
stpapi.continue.process()

In your code, you have just created the handle for the subsession but the command to start the subsession is missing.
so add this line stpapi.continue.process() in your code after you do an insert or update.

This will start the subsession.
hope this helps

abdulk_bg
19th December 2002, 11:51
Hi Arun,

Thank you very much for your prompt and fast reply.

But i have tried all the possibilitues previously, any how i will try once again.And i will post the results after trying.

Thanks & regards
Abdulk_bg

gentercz
19th December 2002, 12:14
Hi all,

i have the same problem with a baan script writing sls lines.

here are some details:
when inserting a line in a sls order, we use session tdsls4102s000.
inserting a stock-controlled item is NOT working when there is not enough stock.

This is what happens in the baan standard program, called via afs.

it goes to function "handle.stock.shortage(...)" then loops in a repeat...until loop.
beacause in that loop a zoom.menu is activated "mtdsls000090461". here could (e.g.) choose "No action", then the session would continue.
as i am using afs i can not interact with this zoom.menu, thus my session loops forever. (variable choice.4801 never gets a correct value!)

is there a way to default the action in the zoom.form by afs, so the session exits this loop.

hope you got my problem, if needed i can post some code
jochen

arunprasath
19th December 2002, 15:34
hi,
I have seen the same error when running the session using AFS.

when we set some parameter somewhere(dont know where) this menu pops up in the sales order lines session(tdsls4102s000)

and we need to give some values to this menu. if not a while loop keeps going on without ending.

I had the source code. so I have added this line in the session script.


if api.mode then
| code to give the action, cancel in the menu.
endif

This has solved the problem for me.

gentercz
19th December 2002, 18:28
thanks for your idea, but we do not want to modify the original baan code ... :(
so, is there no other way ???

jochen

abdulk_bg
19th December 2002, 20:10
Hi Arun,

Thanks very much for your prompt reply.But if we change the source code then if some some patches are installed then all the previous code will be re-written to original source code.
Do you have any other alternative.Right now i don't have source code with me.Could you please send one.

Thanks and Regards
Abdulk_bg

mark_h
19th December 2002, 20:29
Please do not request source code. If you need source code to solve a problem please contact Baan or your implementation partner.

Mark

arunprasath
20th December 2002, 06:18
I agree with Mark.
Can you plz try the same with Baan or implementation partner?

It varies upon service packs..

abdulk_bg
21st December 2002, 10:05
Hi all,

Thank you i will try with Baan for source code.

Thanks
Abdulk_bg