Solution : https://service.sap.com/sap/support/notes/894210 (SAP Service marketplace login required)
Key words : 
table /sapapo/ordkey terminate, program /sapapo/om_lc_upgrade_50, call transaction se14, table /sapapo/ordkey, /sapapo/ordkey, accessing table, database table, scm release 4, rsql error 23, solution implement
Related Notes : 
       
| 994518 | Problems implementing upgrade notes | 
| 932837 | /SAPAPO/OM_LC_UPGRADE_50: Problems during upgrade |