abap submit 的使用方法 不同情況
1、最普通的用法
*Code used to execute a report
SUBMIT Zreport.
2、帶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.
3、帶parameters程式的Submit的用法
*Code used to populate 'parameters' & execute report
SUBMIT zreport with p_param1 = 'value'
with p_param2 = 'value'.
4、其他情況
*Submit report and return to current program afterwards
SUBMIT 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'.
*Submit report but export resultant list to memory, rather than
*it being displayed on screenSUBMIT zreport EXPORTING LIST TO MEMORY.
* Once report has finished and control has returned to calling
* program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
* DISPLAY_LIST to retrieve and display report.
*Example Code (Retrieving list from memory)
DATA BEGIN OF itab_list OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA END OF itab_list.
DATA: BEGIN OF vlist OCCURS 0,
filler1(01) TYPE c,
field1(06) TYPE c,
filler(08) TYPE c,
field2(10) TYPE c,
filler3(01) TYPE c,
field3(10) TYPE c,
filler4(01) TYPE c,
field4(3) TYPE c,
filler5(02) TYPE c,
field5(15) TYPE c,
filler6(02) TYPE c,
field6(30) TYPE c,
filler7(43) TYPE c,
field7(10) TYPE c,
END OF vlist.
SUBMIT zreport EXPORTING LIST TO MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = itab_list
EXCEPTIONS
not_found = 4
OTHERS = 8.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = vlist
listobject = itab_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE '0'.
WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.
ENDIF.
5、Submit為後臺執行
*Submit report as job(i.e. in background)
data: jobname like tbtcjob-jobname value
' TRANSFER TRANSLATION'.
data: jobcount like tbtcjob-jobcount,
host like msxxlist-host.
data: begin of starttime.
include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
* Job open
call function 'JOB_OPEN'
exporting
delanfrep = ' '
jobgroup = ' '
jobname = jobname
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit
importing
jobcount = jobcount
exceptions
cant_create_job = 01
invalid_job_data = 02
jobname_missing = 03.
if sy-subrc ne 0.
"error processing
endif.
* Insert process into job
SUBMIT zreport and return
with p_param1 = 'value'
with p_param2 = 'value'
user sy-uname
via job jobname
number jobcount.
if sy-subrc > 0.
"error processing
endif.
* Close job
starttime-sdlstrtdt = sy-datum + 1.
starttime-sdlstrttm = '220000'.
call function 'JOB_CLOSE'
exporting
event_id = starttime-eventid
event_param = starttime-eventparm
event_periodic = starttime-periodic
jobcount = jobcount
jobname = jobname
laststrtdt = starttime-laststrtdt
laststrttm = starttime-laststrttm
prddays = 1
prdhours = 0
prdmins = 0
prdmonths = 0
prdweeks = 0
sdlstrtdt = starttime-sdlstrtdt
sdlstrttm = starttime-sdlstrttm
strtimmed = starttimeimmediate
targetsystem = host
exceptions
cant_start_immediate = 01
invalid_startdate = 02
jobname_missing = 03
job_close_failed = 04
job_nosteps = 05
job_notex = 06
lock_failed = 07
others = 99.
if sy-subrc eq 0.
"error processing
endif.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17204926/viewspace-607275/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP ABAP Application Log 的使用方法APP
- ABAP TEST-SEAM 的使用方法
- RAC控制檔案恢復(三種不同情況)
- SUBMIT 的用法MIT
- Qt QTcpSocket 對連線伺服器中斷的不同情況進行判定QTTCP伺服器
- 介紹一款 ABAP 程式碼搜尋工具 RS_ABAP_SOURCE_SCAN 的使用方法
- JavaScript submit 事件JavaScriptMIT事件
- button和submit的區別MIT
- ABAP report的遞迴submit和在虛擬機器裡再次啟動另一個虛擬機器遞迴MIT虛擬機
- SAP ABAP OData 服務診斷工具 /IWFND/ERROR_LOG 的使用方法Error
- Sprk submit 過程MIT
- spark-submit 提交的引數SparkMIT
- mysql索引不會命中的情況MySql索引
- obey、comply、conform、follow和submit的區別ORMMIT
- Java執行緒池中的execute和submitJava執行緒MIT
- 實驗設計(DOE)的正確使用方法,拿走不謝!
- win10聲音圖示有個紅叉怎麼辦 聲音紅叉兩種不同情況的解決辦法Win10
- 病毒先生:滴滴司機打人事件並不重要,不濫用輿論同情是一種教養事件
- SAP ABAP Netweaver 裡的 ABAP 會話概念會話
- 2024年 為什麼不建議新人學習ABAP
- 在不影響程式使用的情況下新增shellcode
- 5S在非製造單位中的使用方法,拿走不謝!
- PbootCMS內頁打不開的常見情況彙總boot
- SAP ABAP Gateway Client 的 ABAP 實現,重用 HTTP ConnectionGatewayclientHTTP
- spark-submit提交到yarn中執行的log怎麼看?SparkMITYarn
- docker的使用方法Docker
- SerialPort的使用方法
- VIM 的使用方法
- Markdown的使用方法
- ABAP Netweaver 和 ABAP Platform 這兩個名詞的辨析Platform
- Standard ABAP Debugger 和 Classic ABAP Debugger 的實現差異
- ABAP巨集的除錯除錯
- 不應該在沒有 sudo 的情況下執行 Docker 的原因Docker
- 驗證碼不顯示是什麼情況
- bootstrap Table的使用方法boot
- React 路由的使用方法React路由
- axios baseURL 的使用方法iOS
- docker的基本使用方法Docker
- vlookup函式不會用?詳細使用方法就在這兒,用心學!函式