SAP中程序间的相互调用,SUBMIT关键字的用法
生活随笔
收集整理的這篇文章主要介紹了
SAP中程序间的相互调用,SUBMIT关键字的用法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在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'.
與50位技術專家面對面20年技術見證,附贈技術全景圖
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'.
與50位技術專家面對面20年技術見證,附贈技術全景圖
總結
以上是生活随笔為你收集整理的SAP中程序间的相互调用,SUBMIT关键字的用法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SUBMIT - selscreen_p
- 下一篇: SUBMIT 的使用方法