Chinaunix首页 | 论坛 | 博客
  • 博客访问: 42384
  • 博文数量: 15
  • 博客积分: 610
  • 博客等级: 上士
  • 技术积分: 170
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-14 07:31
文章分类

全部博文(15)

文章存档

2011年(1)

2009年(14)

我的朋友
最近访客

分类:

2009-08-11 11:04:43

在ABAP中可以用SUBMIT 关键字来实现程序之间的调用,是很好用的一个关键字
(1)调用另一个程序
     比如:
        SUBMIT ZHR_UPDATE_IT0008. "调用更新信息类型0008的程序
(2)一个程序在调用另一个程序的时候,需要进行数据的传递。
      一种是被调用的程序的屏幕有输入参数。可以用以下方法来传递数据:
                SUBMIT ZHR_UPDATE_IT0008 WITH P_BETRG = '1000.00' . "调用程序,并给P_BETRG 赋值为1000.00.
     还有一种情况是要传递一个内表的数据。这样需要用SAP MEMORY或者ABAP MEMORY。
在调用程序中
EXPORT T_ITAB TO MEMORY 'ZHR_IT0008'.
在被调用程序中
IMPORT T_ITAB FROM MEMORY 'ZHR_IT0008'.
(3)如果数据更多更复杂一些,可以用文件来临时存储数据。
 带select-options程序的Submit的用法
*Code used to populate 'select-options' & execute report
DATA: seltab type table of rsparams,
      seltab_wa like line of seltab.
  seltab_wa-selname = 'PNPPERNR'.
  seltab_wa-sign    = 'I'.
  seltab_wa-option  = 'EQ'.
* load each personnel number accessed from the structure into
* parameters to be used in the report
  loop at pnppernr.
    seltab_wa-low = pnppernr-low.
    append seltab_wa to seltab.
  endloop.
  SUBMIT zreport with selection-table seltab
                                via selection-screen.
带parameters程序的Submit的用法
*Code used to populate 'parameters' & execute report
SUBMIT zreport with p_param1 = 'value'
                with p_param2 = 'value'.
其他情况
*Submit report and return to current program afterwards
SUBMIT zreport AND RETURN.
*Submit report via its own selection screen
SUBMIT zreport VIA SELECTION-SCREEN.
*Submit report using selection screen variant
SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
阅读(1322) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~