SAP ABAP中标准程序是通过下面的接口导航到VA03显示销售订单,ME23N显示采购订单:
if not lf_destination is initial.
call function 'SD_SALESDOCUMENT_DISPLAY'
destination
lf_destination
exporting
i_vbeln = lf_vgbel
i_vbtyp_l = IF_SD_DOC_CATEGORY=>PURCHASE_ORDER
exceptions
no_authority = 1
others = 2.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endif.
else.
call function 'ME_DISPLAY_PURCHASE_DOCUMENT'
exporting
i_ebeln = lf_vgbel
i_enjoy = 'X'
exceptions
not_found = 1
no_authority = 2
invalid_call = 3
preview_not_possible = 4
others = 5.
if sy-subrc <> 0.
message id sy-msgid type 'S' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
endif.
阅读(521) | 评论(0) | 转发(0) |