重要的函数总结。
采購訂單:
1.??????? CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
???????????? EXPORTING
????????????????? i_ebeln????????????? = itab-ebeln
???????????? EXCEPTIONS
????????????????? not_found??????????? = 1
????????????????? no_authority???????? = 2
????????????????? invalid_call???????? = 3
????????????????? preview_not_possible = 4
????????????????? OTHERS?????????????? = 5.
2.??????? SET PARAMETER ID 'BES' FIELD itab-ebeln.
????????? CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
???????????? EXPORTING
????????????????? i_ebeln????? = itab-ebeln
????????????????? i_ebelp????? = itab-ebelp
????????????????? i_enjoy????? = 'X'
*????????? IMPORTING
*?????????????? E_EKKO?????? =
???????????? EXCEPTIONS
????????????????? not_found??? = 1
????????????????? no_authority = 2
????????????????? invalid_call = 3
????????????????? OTHERS?????? = 4?? .
物料憑證:
??????? SET PARAMETER ID 'MBN' FIELD itab-belnr.
??????? SET PARAMETER ID 'MJA' FIELD itab-gjahr.
??????? SET PARAMETER ID 'BUK' FIELD itab-bukrs. 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-belnr
????????????????? i_mjahr???????????? = itab-gjahr
???????????? EXCEPTIONS
????????????????? illegal_combination = 1
????????????????? OTHERS????????????? = 2.
銷售訂單:
??????? SET PARAMETER ID 'AUN' FIELD it_itab-vgbel .
??????? CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
交貨單:
??????? SET PARAMETER ID 'VL' FIELD it_itab-vbeln .
??????? CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN .
PO的物料:
??????? CALL FUNCTION 'MMPUR_MATERIAL_DISPLAY'
???????????? EXPORTING
????????????????? im_matnr = itab-matnr. 物料:
?? ??? SET PARAMETER ID 'MXX' FIELD 'E'. "Table T132,決定顯示哪個視圖
????? ?SET PARAMETER ID 'MAT' FIELD itab-matnr.
?? ??? SET PARAMETER ID 'WRK' FIELD itab-werks.
????? ?SET PARAMETER ID 'LIF' FIELD itab-lifnr.
*????? ?Set parameter id 'KAR' field '001'.
*?????? SET PARAMETER ID 'LAG' FIELD im_lgort.
????? ?CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN. MXX的選擇看表T132 (同時看表MOFF)
A?????????? 工作計劃
B?????????? 會計
C?????????? 分類
D?????????? 物料需求計劃
E?????????? 采購
F?????????? 生產資源/工具
G?????????? 成本核算
K?????????? 基本數據
L?????????? 存儲
P?????????? 預測
Q?????????? 質量管理
S?????????? 倉庫管理
V?????????? 銷售
X???? X???? 工廠庫存
Z???? X???? 存儲位置庫存
供應商:
??????? CALL FUNCTION 'MMPUR_VENDOR_DISPLAY'
???????????? EXPORTING
????????????????? im_lifnr = itab-lifnr
????????????????? im_ekorg = 'B000'. 信息記錄:
?????? CALL FUNCTION 'MMPUR_INFO_RECORD_DISPLAY'
???????? EXPORTING
????????????? im_infnr = itab-infnr
????????????? im_ekorg = 'B000'
????????????? im_werks = itab-werks.
工廠:
???? ??DATA: ls_vt001w TYPE v_t001w.
? ??? ?ls_vt001w-mandt = sy-mandt.
??? ?? ls_vt001w-werks = itab-werks.
??? ?? CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
???? ??? EXPORTING
????? ???? action??? = 'SHOW'
???? ? ??? view_name = 'V_T001W'
??????? ?CHANGING
???????? ??entry???? = ls_vt001w.
????? 注:一般維護視圖的界面可以用這個方法 *幾個關于"Display"的Function Group:CK50,EDI5,MEEXT等 會計憑證: SET PARAMETER ID 'BLN' FIELD '90000046' .
SET PARAMETER ID 'BUK' FIELD '1000'.
SET PARAMETER ID 'GJR' FIELD '2008'.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN . 程序或者函數: CALL FUNCTION 'EDITOR_PROGRAM'
? EXPORTING???????????????????
??? display = 'X'?????????????
??? program = it_tfdir-incname
? EXCEPTIONS??????????????????
??? OTHERS? = 1.??????????????
函數組: CALL FUNCTION 'RS_FUNCTION_POOL_CHANGE'
? EXPORTING???????????????????????????
??? aktion??????? = 'SHOW'????????????
??? function_pool = it_tfdir-fgname???
? EXCEPTIONS??????????????????????????
??? OTHERS??????? = 9.????????????????
1.??????? CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
???????????? EXPORTING
????????????????? i_ebeln????????????? = itab-ebeln
???????????? EXCEPTIONS
????????????????? not_found??????????? = 1
????????????????? no_authority???????? = 2
????????????????? invalid_call???????? = 3
????????????????? preview_not_possible = 4
????????????????? OTHERS?????????????? = 5.
2.??????? SET PARAMETER ID 'BES' FIELD itab-ebeln.
????????? CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
???????????? EXPORTING
????????????????? i_ebeln????? = itab-ebeln
????????????????? i_ebelp????? = itab-ebelp
????????????????? i_enjoy????? = 'X'
*????????? IMPORTING
*?????????????? E_EKKO?????? =
???????????? EXCEPTIONS
????????????????? not_found??? = 1
????????????????? no_authority = 2
????????????????? invalid_call = 3
????????????????? OTHERS?????? = 4?? .
物料憑證:
??????? SET PARAMETER ID 'MBN' FIELD itab-belnr.
??????? SET PARAMETER ID 'MJA' FIELD itab-gjahr.
??????? SET PARAMETER ID 'BUK' FIELD itab-bukrs. 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-belnr
????????????????? i_mjahr???????????? = itab-gjahr
???????????? EXCEPTIONS
????????????????? illegal_combination = 1
????????????????? OTHERS????????????? = 2.
銷售訂單:
??????? SET PARAMETER ID 'AUN' FIELD it_itab-vgbel .
??????? CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
交貨單:
??????? SET PARAMETER ID 'VL' FIELD it_itab-vbeln .
??????? CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN .
PO的物料:
??????? CALL FUNCTION 'MMPUR_MATERIAL_DISPLAY'
???????????? EXPORTING
????????????????? im_matnr = itab-matnr. 物料:
?? ??? SET PARAMETER ID 'MXX' FIELD 'E'. "Table T132,決定顯示哪個視圖
????? ?SET PARAMETER ID 'MAT' FIELD itab-matnr.
?? ??? SET PARAMETER ID 'WRK' FIELD itab-werks.
????? ?SET PARAMETER ID 'LIF' FIELD itab-lifnr.
*????? ?Set parameter id 'KAR' field '001'.
*?????? SET PARAMETER ID 'LAG' FIELD im_lgort.
????? ?CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN. MXX的選擇看表T132 (同時看表MOFF)
A?????????? 工作計劃
B?????????? 會計
C?????????? 分類
D?????????? 物料需求計劃
E?????????? 采購
F?????????? 生產資源/工具
G?????????? 成本核算
K?????????? 基本數據
L?????????? 存儲
P?????????? 預測
Q?????????? 質量管理
S?????????? 倉庫管理
V?????????? 銷售
X???? X???? 工廠庫存
Z???? X???? 存儲位置庫存
供應商:
??????? CALL FUNCTION 'MMPUR_VENDOR_DISPLAY'
???????????? EXPORTING
????????????????? im_lifnr = itab-lifnr
????????????????? im_ekorg = 'B000'. 信息記錄:
?????? CALL FUNCTION 'MMPUR_INFO_RECORD_DISPLAY'
???????? EXPORTING
????????????? im_infnr = itab-infnr
????????????? im_ekorg = 'B000'
????????????? im_werks = itab-werks.
工廠:
???? ??DATA: ls_vt001w TYPE v_t001w.
? ??? ?ls_vt001w-mandt = sy-mandt.
??? ?? ls_vt001w-werks = itab-werks.
??? ?? CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'
???? ??? EXPORTING
????? ???? action??? = 'SHOW'
???? ? ??? view_name = 'V_T001W'
??????? ?CHANGING
???????? ??entry???? = ls_vt001w.
????? 注:一般維護視圖的界面可以用這個方法 *幾個關于"Display"的Function Group:CK50,EDI5,MEEXT等 會計憑證: SET PARAMETER ID 'BLN' FIELD '90000046' .
SET PARAMETER ID 'BUK' FIELD '1000'.
SET PARAMETER ID 'GJR' FIELD '2008'.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN . 程序或者函數: CALL FUNCTION 'EDITOR_PROGRAM'
? EXPORTING???????????????????
??? display = 'X'?????????????
??? program = it_tfdir-incname
? EXCEPTIONS??????????????????
??? OTHERS? = 1.??????????????
函數組: CALL FUNCTION 'RS_FUNCTION_POOL_CHANGE'
? EXPORTING???????????????????????????
??? aktion??????? = 'SHOW'????????????
??? function_pool = it_tfdir-fgname???
? EXCEPTIONS??????????????????????????
??? OTHERS??????? = 9.????????????????
總結
- 上一篇: smartform 中currency
- 下一篇: CLASS ALV Event