ahmed_timon
6th August 2019, 13:43
i add a field in whinh200 as requisitions to get requisition for purches order

function extern void insert()
{

get.var(pid,"whinh200.orno",****o)

select tdpur402.rqno :prqno from tdpur402 where tdpur402.orno = :****o

selectdo
select * from whinh200 for update where orno = :****o

selectdo
ret2 = stpapi.change.view("whinh2100m100",error2)
ret3 = stpapi.synchronize.dialog("whinh2100m100","modify",error3)
stpapi.put.field( "whinh2100m100", "whinh200.rqno", prqno )

ret4 = stpapi.update( "whinh2100m100",true, error4 )
stpapi.end.session( "whinh2100m100",error5 )
endselect


endselect


}

no error ... but can not update

mark_h
6th August 2019, 14:57
Sorry had to move it a couple of times since I did not realize it was around stpapi code. Is this all of the code? I would expect some put fields before the change.view. Then my next question is whinh200.rqno a character or number field? Also when you do the update do you get any errors?