Premahari
4th September 2018, 07:59
Hi,
In particular company it's not allowing to add ICS code to an item in item general. It's giving error i have attached. But the same code is working for other comapany. I have shared the code also.

select tcibd006.*
from tcibd006
where tcibd006.type = tccitt.type.general
as set with 1 rows
selectdo
select tcibd004.*
from tcibd004 for update
where tcibd004._index1 = {:tcibd006.citt, "", :tcibd001.item}
selectdo
if not isspace(tcibd001.dscc) then
tcibd004.aitc = tcibd001.dscc
db.update(ttcibd004, db.retry)
else
db.delete(ttcibd004, db.retry)
endif
selectempty
tcibd004.citt = tcibd006.citt
tcibd004.bpid = ""
tcibd004.item = tcibd001.item
tcibd004.aitc = tcibd001.dscc

db.insert(ttcibd004, db.skip.dupl)

endselect
endselect

Can anyone please why it's not allowing to save for particular company

BChary
4th September 2018, 08:59
try to add db.retry.point() at the beginning of tcibd004 "selectdo" section

JaapJD
4th September 2018, 09:43
Seems that the insert/update/delete on tcibd004 causes another change in tcibd001. Could be because in that particular company the Brazilian localization is active. You can prevent that by calling function disable.ue.dll() (and after your change enable.ue.dll()), so that the other change in tcibd001 will not call the user exit again.

BTW. BChary's suggestion will not work, it would disturb the standard transaction handling and will cause the error 'transaction is on, can't continue'.

Premahari
23rd October 2018, 13:29
Hi Thanks for your reply, Can you please tell how to disable UE in script. What are arguments to be given.Thanks in advance

JaapJD
23rd October 2018, 16:35
See programmer's manual: disable.ue.dll()