2008年(2)
分类: WINDOWS
2008-09-05 14:25:45
1、采购订单显示:
注意:传入采购订单时必须以结构传入
DATA t_LIST_POS LIKE TABLE OF EKPO.
DATA I_LIST_POS LIKE LINE OF t_LIST_POS.
I_LIST_POS-EBELN = '4500014962'.
I_LIST_POS-EBELP = '10'.
CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
EXPORTING
I_EBELN = I_LIST_POS-EBELN
I_EBELP = I_LIST_POS-EBELP
I_ENJOY = 'X'
EXCEPTIONS
NOT_FOUND = 1
NO_AUTHORITY = 2
INVALID_CALL = 3
PREVIEW_NOT_POSSIBLE = 4
OTHERS = 5.
2、MIGO样式的物料凭证显示
DATA: BEGIN OF ITAB,
MBLNR LIKE MKPF-MBLNR,
MJAHR LIKE MKPF-MJAHR,
END OF ITAB.
MOVE: '4900030397' TO ITAB-MBLNR,
'2008' TO ITAB-MJAHR.
*SET PARAMETER ID 'MBN' FIELD ITAB-MBLNR.
*SET PARAMETER ID 'MJA' FIELD ITAB-MJAHR.
CALL FUNCTION 'MIGO_DIALOG'
EXPORTING
I_ACTION = 'A04' "显示
I_REFDOC = 'R02' "物料凭证
I_NOTREE = 'X'
I_SKIP_FIRST_SCREEN = 'X'
I_OKCODE = 'OK_GO'
I_MBLNR = ITAB-MBLNR
I_MJAHR = ITAB-MJAHR
EXCEPTIONS
ILLEGAL_COMBINATION = 1
OTHERS = 2.
3、采购订单物料显示
DATA: BEGIN OF ITAB,
MATNR LIKE EKPO-EMATN,
END OF ITAB.
MOVE: '20007655' TO ITAB-MATNR.
CALL FUNCTION 'MMPUR_MATERIAL_DISPLAY'
EXPORTING
IM_MATNR = ITAB-MATNR.
4、供应商显示
CALL FUNCTION 'MMPUR_VENDOR_DISPLAY'
EXPORTING
IM_LIFNR = ITAB-LIFNR
IM_EKORG = ITAB-EKORG.