VF01 VF04 vf11开票检查、报错
RV60AFZZ的USEREXIT_NUMBER_RANGE
*vf04 开票检查 ,防止自动发票校验失败 chenyl for suihx 17.10.2017
data lv_lines type i.
data:begin of lt_vbkd occurs 0,
vbeln like vbak-vbeln,
bstkd like VBKD-BSTKD,
end of lt_vbkd.
data lv_msg(255).
data lt_valuetab TYPE STANDARD TABLE OF STRING with header line.
if vbrk-vkorg = '2001' and vbrk-KUNAG = '0000026006'.
describe table xvbrp lines lv_lines.
if lv_lines > 229.
message '行项目大于229' type 'E'.
endif.
if xvbrp[] is not initial.
select vbeln bstkd
into table lt_vbkd
from vbkd
for all entries in xvbrp
where vbeln = xvbrp-AUBEL and posnr = ''.
delete lt_vbkd where bstkd ne ''.
if lt_vbkd[] is not initial.
loop at lt_vbkd.
lt_valuetab = lt_vbkd-vbeln.
append lt_valuetab.
endloop.
call function 'POPUP_WITH_TABLE_DISPLAY_OK'
exporting
endpos_col = 100
endpos_row = 10
startpos_col = 1
startpos_row = 1
titletext = '采购订单编号为空的销售订单'
tables
valuetab = lt_valuetab.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
concatenate '销售订单' '的采购订单编号为空' into lv_msg.
message lv_msg type 'E'.
endif.
endif.
endif.