rp.chowdary
15th September 2011, 08:19
string err.msg(2024), lino(4), orno(10), rsno(4)
long ret
stpapi.put.field( "tssoc2121m000", "tssoc220.orno", "007000010" )
ret = stpapi.find("tssoc2121m000",err.msg)
if ret = 0 then
message(" Error in Finding %s",err.msg)
else
message("Record Found %d", ret)
endif
if ret = 1 then
err.msg = ""
ret = stpapi.mark("tssoc2121m000",err.msg)
ret = stpapi.change.view( "tssoc2121m000")
ret = stpapi.synchronize.dialog("tssoc2121m000", "add", err.msg)
stpapi.put.field( "tssoc2121m000", "tssoc220.item.segment.1", "" )
stpapi.put.field( "tssoc2121m000", "tssoc220.item.segment.2", str$("TEST-SERVICING-ITEM"))
stpapi.put.field( "tssoc2121m000", "tssoc220.ccmp", str$("1122") )
stpapi.put.field( "tssoc2121m000", "tssoc220.awrh", str$("072501") )
stpapi.put.field( "tssoc2121m000", "tssoc220.ccty", str$("IND") )
stpapi.put.field( "tssoc2121m000", "tssoc220.cvat", str$("ZERO_AGG") )
stpapi.put.field( "tssoc2121m000", "tssoc220.qtdl", str$("10") )
stpapi.put.field( "tssoc2121m000", "tssoc220.rnsc.l", str$("492") )
stpapi.get.field( "tssoc2121m000", "tssoc220.lino", lino )
stpapi.get.field( "tssoc2121m000", "tssoc220.rnsc.l", rsno )
|message("%s, %s", lino, rsno)
ret = stpapi.insert("tssoc2121m000", 1, err.msg)
if not isspace(err.msg) then
message("Error while inserting item - %s",err.msg)
endif
|stpapi.recover("tssoc2121m000",err.msg)
if ret = 1 then
stpapi.get.field( "tssoc2121m000", "tssoc220.orno", orno )
stpapi.get.field( "tssoc2121m000", "tssoc220.lino", lino )
message("Item Inserted at Pos.%s/ %s", orno, lino)
endif
stpapi.end.session("tssoc2121m000")
else
stpapi.end.session("tssoc2121m000")
endif
in the above mentioned one while performing stpapi.insert I am getting Order line 00700010- 30 has zero value for ECC Code message. but i am assigning the value and getting the value for that ECC Code. but still i am getting the same error. previously i did the same thing and that worked for PO Line inserting through AFS.
Please help me in this regard.
long ret
stpapi.put.field( "tssoc2121m000", "tssoc220.orno", "007000010" )
ret = stpapi.find("tssoc2121m000",err.msg)
if ret = 0 then
message(" Error in Finding %s",err.msg)
else
message("Record Found %d", ret)
endif
if ret = 1 then
err.msg = ""
ret = stpapi.mark("tssoc2121m000",err.msg)
ret = stpapi.change.view( "tssoc2121m000")
ret = stpapi.synchronize.dialog("tssoc2121m000", "add", err.msg)
stpapi.put.field( "tssoc2121m000", "tssoc220.item.segment.1", "" )
stpapi.put.field( "tssoc2121m000", "tssoc220.item.segment.2", str$("TEST-SERVICING-ITEM"))
stpapi.put.field( "tssoc2121m000", "tssoc220.ccmp", str$("1122") )
stpapi.put.field( "tssoc2121m000", "tssoc220.awrh", str$("072501") )
stpapi.put.field( "tssoc2121m000", "tssoc220.ccty", str$("IND") )
stpapi.put.field( "tssoc2121m000", "tssoc220.cvat", str$("ZERO_AGG") )
stpapi.put.field( "tssoc2121m000", "tssoc220.qtdl", str$("10") )
stpapi.put.field( "tssoc2121m000", "tssoc220.rnsc.l", str$("492") )
stpapi.get.field( "tssoc2121m000", "tssoc220.lino", lino )
stpapi.get.field( "tssoc2121m000", "tssoc220.rnsc.l", rsno )
|message("%s, %s", lino, rsno)
ret = stpapi.insert("tssoc2121m000", 1, err.msg)
if not isspace(err.msg) then
message("Error while inserting item - %s",err.msg)
endif
|stpapi.recover("tssoc2121m000",err.msg)
if ret = 1 then
stpapi.get.field( "tssoc2121m000", "tssoc220.orno", orno )
stpapi.get.field( "tssoc2121m000", "tssoc220.lino", lino )
message("Item Inserted at Pos.%s/ %s", orno, lino)
endif
stpapi.end.session("tssoc2121m000")
else
stpapi.end.session("tssoc2121m000")
endif
in the above mentioned one while performing stpapi.insert I am getting Order line 00700010- 30 has zero value for ECC Code message. but i am assigning the value and getting the value for that ECC Code. but still i am getting the same error. previously i did the same thing and that worked for PO Line inserting through AFS.
Please help me in this regard.