ABAP CALL TRANSACTION MM03选择特定的视图

ABAP程序中使用CALL TRANSACTION ‘MM03’显示物料主数据,但物料主数据有很多视图,如果要跳过第一个界面必须默认选择好视图才行。

网上查了下,的确可以通过设置set parameter的方式选择视图。

Normally, to open a document in its transaction you would first set document parameter id and then do CALL TRANSACTION .. AND SKIP FIRST SCREEN.

Opening a specific tab in MM03 is also specified by a parameter id. You can call transaction MM03 and open a specific tab by setting parameter id MXX.

For example to call MM03 with material code and open Basic Data 1 table you can do.

ABAP CALL TRANSACTION MM03选择特定的视图

Below is list of values you can specific for parameter id MXX and tab it will open. Note that to open tab you will have to set org data if needed by that tab. For example to open Purchasing tab you not only have to specify material code but also plant code.

MM03 (Display Matetrial) Tabs

MXX Parameter
id code

Sample code

Basic Data 1

K

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘MXX’ FIELD ‘K’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Classification

C

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘MXX’ FIELD ‘C’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Sales: Sales Org. Data 1

V

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘VKO’ FIELD sales_org .

SET PARAMETER ID ‘VTW’ FIELD dist_chanl .

SET PARAMETER ID ‘MXX’ FIELD ‘V’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Purchasing

E

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘WRK’ FIELD plant .

SET PARAMETER ID ‘MXX’ FIELD ‘E’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

MRP 1

D

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘LAG’ FIELD storg_loc .

SET PARAMETER ID ‘MXX’ FIELD ‘D’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Forecasting

P

 

Work Scheduling

A

 

Production Resources/Tools

F

 

General Plant Data / Storage 1

L

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘WRK’ FIELD plant .

SET PARAMETER ID ‘LAG’ FIELD storg_loc .

SET PARAMETER ID ‘MXX’ FIELD ‘L’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Warehouse Management 1

S

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘WRK’ FIELD plant .

SET PARAMETER ID ‘LGN’ FIELD warehouse .

SET PARAMETER ID ‘MXX’ FIELD ‘S’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Quality Management

Q

 

Accounting 1

B

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘WRK’ FIELD plant .

SET PARAMETER ID ‘MXX’ FIELD ‘B’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Costing 1

G

SET PARAMETER ID ‘MAT’ FIELD material_code .

SET PARAMETER ID ‘WRK’ FIELD plant .

SET PARAMETER ID ‘MXX’ FIELD ‘G’ .

CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN .

Plant Stock

X

 

Storage Location Stock

Z

 

At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.

原文:https://www.samplecodeabap.com/call-transaction-mm03-with-specific-tab/

本文作者: GavinDong

版权属于: GavinDong博客

文章链接: https://www.gavindong.com/9999.html

如果使用过程中遇到问题,可 **点击此处** 交流沟通。

版权所有,转载时必须以链接形式注明作者和原始出处及本声明。

发表评论

登录后才能评论
email