prashant
6th June 2008, 08:46
HI ALL,
I want to generate a sales order through afs in table(tdsls400).Firstly i copied the std. session(tdsls4100m900) and make it a customize session(tdmsl4100m900) to tackle the synchronized dialog problem for multi occurrence session.After that i write the simple afs coding which is given below,
function gen.orno(domain tcseri v.seri) {
string v.time(25),error.msg(100)
long v.dat
v.time = dte$()
v.time = v.time(7;2) & ":" & v.time(9;2) & ":" & v.time(11;2)
message("time %s",v.time)
stpapi.put.field("tdmsl4100m900","tdsls400.ofbp","CDMA00031")
stpapi.put.field("tdmsl4100m900","tdsls400.ofad","BUP000007")
stpapi.put.field("tdmsl4100m900","tdsls400.orno","800 ")
stpapi.put.field("tdmsl4100m900","tdsls400.sotp","S01")
stpapi.put.field("tdmsl4100m900","tdsls400.cofc","SLS001")
stpapi.put.field("tdmsl4100m900","tdsls400.odat",str$(date.num()))
stpapi.put.field("tdmsl4100m900","tdsls400.odat","v.time")
stpapi.put.field("tdmsl4100m900","tdsls400.ddat",str$(date.num() + 2))
stpapi.put.field("tdmsl4100m900","tdsls400.ddat","v.time")
stpapi.put.field("tdmsl4100m900","tdsls400.ccur","INR")
stpapi.insert("tdmsl4100m900",true,error.msg)
if isspace(error.msg) then
message("ORDER NO. %s is SUCCESSFULLY GENERATED",o.name)
else
message("Error %s",error.msg)
endif
stpapi.end.session("tdmsl4100m900")
}
But at the time of insertion a error is given which is "PLANNED DELIVERY DATE IS BEFORE OF ORDER DATE" after that insertion is aborted. :confused:
So,Pls. give some focus over this Problem.....
I want to generate a sales order through afs in table(tdsls400).Firstly i copied the std. session(tdsls4100m900) and make it a customize session(tdmsl4100m900) to tackle the synchronized dialog problem for multi occurrence session.After that i write the simple afs coding which is given below,
function gen.orno(domain tcseri v.seri) {
string v.time(25),error.msg(100)
long v.dat
v.time = dte$()
v.time = v.time(7;2) & ":" & v.time(9;2) & ":" & v.time(11;2)
message("time %s",v.time)
stpapi.put.field("tdmsl4100m900","tdsls400.ofbp","CDMA00031")
stpapi.put.field("tdmsl4100m900","tdsls400.ofad","BUP000007")
stpapi.put.field("tdmsl4100m900","tdsls400.orno","800 ")
stpapi.put.field("tdmsl4100m900","tdsls400.sotp","S01")
stpapi.put.field("tdmsl4100m900","tdsls400.cofc","SLS001")
stpapi.put.field("tdmsl4100m900","tdsls400.odat",str$(date.num()))
stpapi.put.field("tdmsl4100m900","tdsls400.odat","v.time")
stpapi.put.field("tdmsl4100m900","tdsls400.ddat",str$(date.num() + 2))
stpapi.put.field("tdmsl4100m900","tdsls400.ddat","v.time")
stpapi.put.field("tdmsl4100m900","tdsls400.ccur","INR")
stpapi.insert("tdmsl4100m900",true,error.msg)
if isspace(error.msg) then
message("ORDER NO. %s is SUCCESSFULLY GENERATED",o.name)
else
message("Error %s",error.msg)
endif
stpapi.end.session("tdmsl4100m900")
}
But at the time of insertion a error is given which is "PLANNED DELIVERY DATE IS BEFORE OF ORDER DATE" after that insertion is aborted. :confused:
So,Pls. give some focus over this Problem.....