您的位置:首页 > 编程语言

如何根据事物代码查找相应BAPI

2013-11-27 14:33 489 查看
如果只知道事物代码,可以通过下面的方式查询相应的BAPI。

例如我们找创建销售订单的BAPI 我们知道事物代码是VA01。

1、 
我们进入VA01 界面,找到系统 --> 状态

2、 
在事物代码位置上双击,找到开发类(PACKAGE)VA

3、 
用SE80打开包VA

4、 
打开业务工程-->业务对象类型。根据我们的业务需求。我们要找销售订单的创建,所以BUS2032 销售订单 的可能性最大。

5、 
双击BUS2032 打开方法 ,寻找和创建销售订单名字相同的方法 这里我们要找的就是SalesOrder.CreateFromDat2。将光标定位在 这一行, 点击上面的 程序 按钮。
即可看见程序源代码找到 BAPI_SALESORDER_CREATEFROMDAT2。同样的我们可以看到修改订单的BAPI,删除的BAPI,也可以使用同样的方法找找。

6、 
同样我们可以双击SalesOrder.CreateFromDat2行,在弹出的窗口中找到 ABAP子屏幕。如果单选按钮是
API功能 ,名称一栏即为我们要找BAPI.,如果是函数模块即为一个FM

     如下图:



 

7、 
通过包我们也可以找到该包下所有的程序和函数组。

 

另附英文原文查找bapi的两种方法:

转自:http://www.sap-img.com/abap/how-to-find-bapi-for-particular-transaction-in-sap.htm

How to Find Bapi for Particular Transaction in SAP

How to find function module or Bapi for particular transaction in sap?

If you mean that you need to know what BAPI's a particular tranx uses, which I can only assume that's what you mean, then you should access the code behind the transaction and search for 'CALL'. That normally is the standard method that think that most people
use. 

Suppose you want to find the bapi for creating a sales order, you usually use transaction VA01 for this. 

1. Find out the package of the transaction.  

Start Va01 go to system --> status.  

Double click on transaction  

Package is VA  

Open this package in SE80  

Open business engineering-->Business object types  

Find the BO which sounds the most appropriate  

I would suggest BUS2032 Sales Order  

Double click.  

Open methods.  

Find the released method with from data or something similar in the name  

, Createfromdat2  

Position the cursor in it and click the program button  

Scroll down to find the bapi used in this method 

With this way you can also find out programs and FM's 

2. Start va01 go to system-->status  

Double click transaction VA01  

Double click on package  

Read the application component. (this is SD-SLS Sales)  

Then open the transaction BAPI  

Sales and distribution-->Sales-->sales order  

createfromdat2 
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  abap bapi