SAP中程式間的相互調用,SUBMIT關鍵字的用法

來源:互聯網
上載者:User
在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 reportSUBMIT zreport with p_param1 = 'value'
                with p_param2 = 'value'.
其他情況*Submit report and return to current program afterwardsSUBMIT zreport AND RETURN.*Submit report via its own selection screenSUBMIT zreport VIA SELECTION-SCREEN.*Submit report using selection screen variantSUBMIT zreport USING SELECTION-SET 'VARIANT1'.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.