sharma
6th October 2005, 14:53
Dear friends.

I want run PDSO through AFS , We have 50 Baan Company & I want run pdso in all compay through one session. Has any one done it before ,please guide , I have written a script but is gettting stcuk, while in same logic it is working fine for calculate taxes after deliveries in distribution.


Thanks

mark_h
6th October 2005, 15:22
Not sure what you mean by PDSO, but if you post your script and tells us the errors and where it is hanging someone may be able to help you.

Paul P
7th October 2005, 06:01
PDSO is Process Delivered Sales Orders, one nifty acronym invented by functional consultants :) . Sometimes I wish we'll all stop talking in acronyms too, but it's irresistibly practical. Like how we all technical consultants like to talk using terms like CRDD, which probably means absolutely nothing to functional consultants.

And, yes, sharma, do post your code for us to help troubleshoot. And please also fill in your user profile so that we'll be able to easily identify your Baan version

Rgds,
Paul

sharma
7th October 2005, 07:31
Sir
Sorry for inconvience .I am posting my scipt.
function read.main.table()
{
curr.ncmp = get.compnr()

select tdcus900.*
from tdcus900
where tdcus900.ncmp<>0
and tdcus900.cgrp=:curr.ncmp
order by tdcus900._index1
selectdo
switch.to.company(tdcus900.ncmp)
mess(" %s",0,tdcus900.ncmp)
proceed()
selectempty
message(" %s not group company ",curr.ncmp )
endselect
}
function proceed()
{
extern long dd
extern long mm
extern long yy
dd = val(sprintf$("%D(%2d)",dt.f))
mm = val(sprintf$("%D(%2m)",dt.f))
yy = val(sprintf$("%D(%04Y)",dt.f))

xcuno.f =" "
xcuno.t ="ZZZZZZ"
xorno.f = 0
xorno.t =999999
xcotp.f =" "
xcotp.t ="ZZZ"
error.msg =" "
extern long x.date
x.date =date.to.num(yy,mm,dd)

stpapi.put.field("tdsls4223m000","cuno.f",str$(xcuno.f))
stpapi.put.field("tdsls4223m000","cuno.t",str$(xcuno.t))
stpapi.put.field("tdsls4223m000","orno.f",str$(xorno.f))
stpapi.put.field("tdsls4223m000","orno.t",str$(xorno.t))
stpapi.put.field("tdsls4223m000","cotp.f",str$(xcotp.f))
stpapi.put.field("tdsls4223m000","cotp.t",str$(xcotp.t))

stpapi.put.field("tdsls4223m000","upto.date",str$(x.date))

stpapi.set.report("tdsls4223m000","rtdpur199901000","D",error.msg)
if isspace(error.msg) then
stpapi.continue.process("tdsls4223m000",error.msg)
endif
if not isspace(error.msg) then
message(" %s " ,error.msg)
stpapi.recover("tdsls4223m000",error.msg)
else
|message( "ok")
endif
|if not isspace(error.msg) then
| message(" %s " ,error.msg)
|endif
stpapi.end.session("tdsls4223m000")
}
Rgds

sharma
7th October 2005, 07:36
Sir ,
while debugging the session it get stucks on the line.
stpapi.continue.process("tdsls4223m000",error.msg)

Regd

Paul P
7th October 2005, 11:04
Hi sharma,
When you perform PDSO manually on the same data set, does the system perform it slowly because there are so much SO to be processed?

Rgds,
Paul

sharma
10th October 2005, 07:11
Sir,
While i do PDSO Manualy , it works fine & quickly.


Thanks

manojsharma
11th October 2005, 08:37
Dear Sharma,

Just try the below code & let me know.

I think it will work. Best of luck.


function read.main.table()
{
curr.ncmp = get.compnr()

select tdcus900.*
from tdcus900
where tdcus900.ncmp<>0
and tdcus900.cgrp=:curr.ncmp
order by tdcus900._index1
selectdo
switch.to.company(tdcus900.ncmp)
mess(" %s",0,tdcus900.ncmp)
proceed()
selectempty
message(" %s not group company ",curr.ncmp )
endselect
}
function proceed()
{
extern long dd
extern long mm
extern long yy
dd = val(sprintf$("%D(%2d)",dt.f))
mm = val(sprintf$("%D(%2m)",dt.f))
yy = val(sprintf$("%D(%04Y)",dt.f))

xcuno.f =" "
xcuno.t ="ZZZZZZ"
xorno.f = 0
xorno.t =999999
xcotp.f =" "
xcotp.t ="ZZZ"
error.msg =" "
extern long x.date
x.date =date.to.num(yy,mm,dd)

stpapi.put.field("tdsls4223m000","cuno.f",str$(xcuno.f))
stpapi.put.field("tdsls4223m000","cuno.t",str$(xcuno.t))
stpapi.put.field("tdsls4223m000","orno.f",str$(xorno.f))
stpapi.put.field("tdsls4223m000","orno.t",str$(xorno.t))
stpapi.put.field("tdsls4223m000","cotp.f",str$(xcotp.f))
stpapi.put.field("tdsls4223m000","cotp.t",str$(xcotp.t))

stpapi.put.field("tdsls4223m000","upto.date",str$(x.date))

stpapi.continue.process("tdsls4223m000",error.msg)
if not isspace(error.msg) then
stpapi.recover("tdsls4223m000",error.msg)
endif
stpapi.end.session("tdsls4223m000")
}

avm204
11th October 2005, 17:53
Hi,

If you can post your error message then it will be easy to identify your problem

regards,

ajay

sharma
22nd October 2005, 07:39
Sir ,
I tried it but it is not working & there is no error message.It stuck on the above mention line.

Thanks

mark_h
22nd October 2005, 17:44
Since I am not familiar with the tdsls4223m000 session I have some questions - Does tdsls4223m000 really generate a report? If so does it generate this report from tdsls4223m000 or does it zoom to something? Also when you do it manually are there any questions that pop up or warnings? When it locks have you started a option dialog box and looked at what processes are running, by doing a ps? Sorry about all the questions, but I am not familiar with that session.

Also do you own source code? If so put the session in debug mode and step through it. You should be able to see what is causing it to lock.

Juergen
24th October 2005, 12:28
Hi,

a report (Tax Provider Error Report) will only be generated if the tax provider interface is used (normally only in U.S or Canada).
Have a look to session tccom6150m000 "Maintain Tax Provider Parameters".

Juergen

sharma
25th October 2005, 11:57
Sir,
Using Tax Provider = No in parameter.


thanks

sharma
26th November 2005, 11:37
Hello friends,
Can anybody help me, I am facing same problem while running the session tfgld4201m000 " Post integration transaction to finance" for mulicompany. Session get stuck on the line stpapi.continue.process("tfgld4201m000",error.msg).
Please let me know how to handle while any dialogue box ( error message) populated through the session which is being executed through AFS for example Error message like " Invoice header can not be written to finance "in Processes delivered sales order lines ( tdsls4223m000 ) and Error message "like Cannot define ledger account "in the session tfgld4201m000 )

Thanks

mark_h
29th November 2005, 15:42
Was hoping that someone came along that had experience with this session. I have not done one on this session and it may be like the manual transfer session. The manual transfer session really does not return any errors or messages that require some type of answer. The problem I ran into was trapping the messages for the user.

Since I do not know about this session and how the messages are given(warnings or errors) the best I can tell you is if you have a range, do your own select to get the records to process. Then you can test for some errors before calling the session. This way you can trap the errors from the session for a specific record. This is kind of how I do a range manual transfers. And if you have already solved it let us know.

manojsharma
30th November 2005, 10:17
Dear Sharma

Can you post your script that will help us to understand better

sharma
1st December 2005, 10:39
After proper debugging I found that session works for the pending entries but it do not come to end after completion . Session remain hanged . while working on debugging mode we can come out through x ( intrupting session )


thanks

ssabaan
3rd March 2006, 15:43
just try it manually for one company with all the given valus which r u suppling to AFS. Now if it works fine and slowly. then put suspend(5000) after continue.

if not working fine then pass on the error messae.

sharma
6th March 2006, 10:06
thanks a lot ,
Now the problem is over after installing latest solution for tools .

Thanks