获取生产订单状态
相关表:AUFK~OBJNR, JEST-OBJNR,TJ02-TXT04
***排除已删除的订单 data:lt_status like jstat occurs 0 with header line. loop at gt_out where objnr <> ''. clear:lt_status,lt_status[]. call function 'STATUS_READ' exporting client = sy-mandt objnr = gt_out-objnr * ONLY_ACTIVE = ' ' * IMPORTING * OBTYP = * STSMA = * STONR = tables status = lt_status exceptions object_not_found = 1 others = 2. read table lt_status with key inact = '' stat = 'I0076'. "stat看系统实际的对象状态 if sy-subrc = 0. delete gt_out. endif. endloop.
abap菜鸟,记录学习笔记。才疏学浅,如有错误,请直接在评论区留言。