for run c223 in background mode, after you finished input your data, you must press enter before click the save button, otherwise, the bdc will failure.
the ok-code appeared in bdc command list should like this
***first, input material and plant then press enter
BDC_OKCODE =ENTE
***then input your data and press enter
BDC_OKCODE =ENTE
***last, press save button
BDC_OKCODE =SAVE
I hope this will be helpful.