kishoremeher
26th December 2011, 11:43
Dear Baanboard,
I have made a AFS programme for session whwmd2570m000 and
whwmd2170s000.
First I am calling session whwmd2570m000, applying synchronize dialog and session whwmd2170s000 get opened.
I am passing quantity and reason code and from specific selecting "Destroy Good".
It is giving error message:- "The quantity to process must be greater than zero." even if i ma passing value to that.
Any suggestion please.
Also find the script.
select whwmd270.*
from whwmd270
where whwmd270._index1 = {"UIG-01", "REJ-01 ", " VZ30ALR762", "V01S11000820A28"}
selectdo
reason.code = "1001"
stpapi.put.field( "whwmd2570m000", "whwmd270.cwar", whwmd270.cwar )
stpapi.put.field( "whwmd2570m000", "whwmd270.loca", whwmd270.loca )
stpapi.put.field( "whwmd2570m000", "whwmd270.item.segment.1", whwmd270.item(1; 9) )
stpapi.put.field( "whwmd2570m000", "whwmd270.item.segment.2", whwmd270.item(10; 38) )
stpapi.put.field( "whwmd2570m000", "whwmd270.clot", whwmd270.clot )
stpapi.put.field( "whwmd2570m000", "whwmd270.idat", str$(whwmd270.idat) )
stpapi.put.field( "whwmd2570m000", "whwmd270.rcno", whwmd270.rcno )
stpapi.put.field( "whwmd2570m000", "whwmd270.rcln", str$(whwmd270.rcln) )
stpapi.put.field( "whwmd2570m000", "whwmd270.serl", whwmd270.serl )
stpapi.put.field( "whwmd2570m000", "whwmd270.huid", whwmd270.huid )
ret = stpapi.find( "whwmd2570m000" , error )
ret = stpapi.mark( "whwmd2570m000" , error )
to.process = whwmdf2570m000.get.To_be_Handled()
stpapi.synchronize.dialog("whwmd2570m000", "modify" , err.mesg)
to.process = whwmdf2170s000.get.To_be_Processed( )
whwmdf2170s000.put.Quantity( to.process )
unit = whwmdf2170s000.get.inp.unit( )
whwmdf2170s000.put.Reason( reason.code )
whwmdf2170s000.put.Quantity( to.process )
to.process = whwmdf2170s000.get.Quantity( )
stpapi.put.field( "whwmd2170s000", "whwmd270.resp", str$(3) )
stpapi.put.field( "whwmd2170s000", "inp.qty", str$(to.process) )
to.process1 = whwmdf2170s000.get.Quantity( )
stpapi.get.field( "whwmd2170s000", "reason.code", reason.code1 )
stpapi.form.command( "whwmd2170s000", 5, "exec.user.0", error )
stpapi.enum.answer("whwmd2170s000", "whinh0056",whinh.emsg.ok)
stpapi.end.session( "whwmd2170s000" )
stpapi.end.session( "whwmd2570m000" )
endselect
Thanks & Regards,
Kishore
I have made a AFS programme for session whwmd2570m000 and
whwmd2170s000.
First I am calling session whwmd2570m000, applying synchronize dialog and session whwmd2170s000 get opened.
I am passing quantity and reason code and from specific selecting "Destroy Good".
It is giving error message:- "The quantity to process must be greater than zero." even if i ma passing value to that.
Any suggestion please.
Also find the script.
select whwmd270.*
from whwmd270
where whwmd270._index1 = {"UIG-01", "REJ-01 ", " VZ30ALR762", "V01S11000820A28"}
selectdo
reason.code = "1001"
stpapi.put.field( "whwmd2570m000", "whwmd270.cwar", whwmd270.cwar )
stpapi.put.field( "whwmd2570m000", "whwmd270.loca", whwmd270.loca )
stpapi.put.field( "whwmd2570m000", "whwmd270.item.segment.1", whwmd270.item(1; 9) )
stpapi.put.field( "whwmd2570m000", "whwmd270.item.segment.2", whwmd270.item(10; 38) )
stpapi.put.field( "whwmd2570m000", "whwmd270.clot", whwmd270.clot )
stpapi.put.field( "whwmd2570m000", "whwmd270.idat", str$(whwmd270.idat) )
stpapi.put.field( "whwmd2570m000", "whwmd270.rcno", whwmd270.rcno )
stpapi.put.field( "whwmd2570m000", "whwmd270.rcln", str$(whwmd270.rcln) )
stpapi.put.field( "whwmd2570m000", "whwmd270.serl", whwmd270.serl )
stpapi.put.field( "whwmd2570m000", "whwmd270.huid", whwmd270.huid )
ret = stpapi.find( "whwmd2570m000" , error )
ret = stpapi.mark( "whwmd2570m000" , error )
to.process = whwmdf2570m000.get.To_be_Handled()
stpapi.synchronize.dialog("whwmd2570m000", "modify" , err.mesg)
to.process = whwmdf2170s000.get.To_be_Processed( )
whwmdf2170s000.put.Quantity( to.process )
unit = whwmdf2170s000.get.inp.unit( )
whwmdf2170s000.put.Reason( reason.code )
whwmdf2170s000.put.Quantity( to.process )
to.process = whwmdf2170s000.get.Quantity( )
stpapi.put.field( "whwmd2170s000", "whwmd270.resp", str$(3) )
stpapi.put.field( "whwmd2170s000", "inp.qty", str$(to.process) )
to.process1 = whwmdf2170s000.get.Quantity( )
stpapi.get.field( "whwmd2170s000", "reason.code", reason.code1 )
stpapi.form.command( "whwmd2170s000", 5, "exec.user.0", error )
stpapi.enum.answer("whwmd2170s000", "whinh0056",whinh.emsg.ok)
stpapi.end.session( "whwmd2170s000" )
stpapi.end.session( "whwmd2570m000" )
endselect
Thanks & Regards,
Kishore