Compare the stock code at stock item maintenance. The stock in item maintenance is A123S, not A123X.
Get confirmation from user which code is correct. User want A123X.
Go to File -> General Maintenance -> Change Code -> Change stock code. Change from A123S to A123X.
If user want the code is A123S. So search all the transaction using QnEManagementTool that used A123X.
Then run script:
update purchaseorderdetailset stockcode = 'A123S 'where stockcode = 'A123X'