SAP Query步骤

QUERY是SAP的一项简单报表工具,它可为没有编程基础的用户用来生成简单的报表。第一次接触QUERY的时候,感觉也不是很复杂,因为它有图形化的界面,你可在上面托托拽拽,然后就可以见到你要的报表,可是这只是简单的应用,其实每个工具功能都是比较完善的,QUERY也不例外。

1)查表做query之前,关于找表的方法,F1,然后点那个小工具图标,找字段与表,表的方法,网上有专门的SAP表的文章(http://www.sap-img.com)。主要模块的表,MM(Mara,mrac),Purchase(EKKO,EKPO),  GR( MKPF,MSEG), FI( BKPF,BSEG) ....,实际上这两种方法交错在一起使用,如果你经常做query或对SAP的表有研究,你将会直接使用表,se16N直接查表,可以输入一些条件,相妆于SQL Server的select 语句,这对你分析解决SAP标准屏幕中无法显示的字段大有帮助

要全面的理解QUERY,首先看一下QUICKVIWER。
事务代码:SQVI。
我感觉这是QUERY的一个简化,大体流程基本一致,但是在许多方面的功能都“缩水“了。体现如下:
1。Quick Viewer所生成的报表是用户自定义的报表,只能由此用户自己使用、维护
2。Quick Viewer只能使用存于数据库内的数据,不能进行计算(除小计、累计)
3。提供与SAP内部工具如EIS,ABC,ALV及外部工具如Word,Excel借口
4。无须也无法利用用户组、Functional area统一管理
5。无法传输

比较而言,QUERY就比较完善了,可是做起来也比较麻烦一下:
1。生成用户组
SAP菜单→工具→ABAP工作台→实用程序→SAP查询→用户组
T-Code:SQ03
2。创建Functional area(功能区)
SAP菜单→工具→ABAP工作台→实用程序→SAP查询→信息集
T-Code:SQ02
3。创建SAP Query
SAP菜单→工具→ABAP工作台→实用程序→SAP查询→查询
T-Code:SQ01

这些组件之间的关系有:
1。Query的管理包括建立Functional area(功能区)和User Group(用户组),并将功能区分配到相应的用户组中去。
2。Functional area(功能区)中定义query中需引用的表和字段。
3。只有当一个用户属于至少一个用户组才可以创建、运行分配到该用户组的Queries。一个用户可以属于几个用户组。用户组中的用户享有相同的权力。因此,要想让一个用户使用某个Query,必须将该用户分配到对应的用户组。
4。当Functional area(功能区)分配给了某用户组,该用户组的成员即可以访问此功能区。

SAP Query总体思路

1.sq02建立功能区域

  a.选择table

  b.建立条件

  c..选择字段

2.sql01建立query,可把query的使用分配给你建立的使用者群组(权限的控制)

3.使用query,可定义格式,使用那些栏位进行选择

具体步骤如下:

1.        Example by query for Scrap reason;

2.        T-code SQ02 for create a query;

3.        Input the report name then click “Create”;

4.        If the information that show in final report include in one table than choice “Direct read of table”, if need got from more than one table than choice “Table join by basis table” and maintained major table name. In our example, the major table is MSEG; 

5.        After save, you can choice additional table from “Insert table”;

6.        Fill the addition table name, in our example, the secondly table is “MKPF”; 

7.       System will automatic create the relation between two table, in our example the key field is “MBLNR (material document number);

8.        After all related table is chose and create the relation, then click back, in our example we just need use two table;

9.        Then choice “include key fields”; 

10.    After click √, you can see below screen;   

11.    Expanded the field group;

12.    Then you can choice the required information from left side to right side;

13.    Our report structure is GL account / Material document number / Material number / posting date / Quantity / Unit / Amount / Currency / Profit center / Cost center / Movement type / Reason / Reason text / User name, after choice;

14.    Then generate the report;

15.     After you got the green notice from system, then you can save and back;

16.    After back;

17.    Using T-code SQ03 for assign user;

18.    Choice user group from the list, in our example, we choice Group MM; 

19.    Then click “Assign users and Infosets”; 

20.    Then you can specific choice who can use the report;

21.    Add user in the screen then save and back; 

22.    Then back to SQ02, choice user group assignment;

23.    Choice user group “MM”, then save and back;  

24.    User T-code SQ01, fill the query name then click “Create”;

25.    Find the new “Query” then double click;  

26.    Then filled the column “Title” then choice “Basic list”;

27.    After choice “Basic list”;

28.    Expanded the field group, and choice “Text: Material number” and “Text: Reason for movement” then we can show the description for material code and reason code in final report, the filed that already chose will use green to highlight;

29.    Then you can choice which field in Left side should show in final report by click column “List field”;

30.    Then you need choice which field is the Filter conditional in this report by click column “Selection fields”;

31.    Then you can test the report by click icon “Test”;

32.    You can ignore the system dialogue box choice continue directly;

33.    System will display a choice box then you can fill the condition that you want; 

34.    Result after execute the report;

35.    If anything is ok, then you back and save;

36.    Use T-code SQ00 to execute the report and save by EXCEL。


  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值