首页 > SAP > ABAP > 常用的Call Transaction,转换为函数调用打开标准事务码的例子
2019
08-29

常用的Call Transaction,转换为函数调用打开标准事务码的例子

一、采购订单:ME23N

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 .

二、物料凭证:MIGO

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.

三、销售订单:VA03

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等

十、会计凭证:FB03

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 .

十一、程序或者函数:SE38

CALL FUNCTION ‘EDITOR_PROGRAM’

EXPORTING

display = ‘X’

program = it_tfdir-incname

EXCEPTIONS

OTHERS = 1.

十二、函数组:SE37

CALL FUNCTION ‘RS_FUNCTION_POOL_CHANGE’

EXPORTING

aktion = ‘SHOW’

function_pool = it_tfdir-fgname

EXCEPTIONS

OTHERS = 9.

最后编辑:
作者:yangsen
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。