资源描述:
《abap submit使用方法》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ABAPSUBMIT的使用方法1、最普通的用法*CodeusedtoexecuteareportSUBMITZreport.2、带select-options程序的Submit的用法*Codeusedtopopulate'select-options'&executereportDATA:seltabtypetableofrsparams,seltab_walikelineofseltab.seltab_wa-selname='PNPPERNR'.seltab_wa-sign='I'.seltab_wa-option='EQ'.*loadea
2、chpersonnelnumberaccessedfromthestructureinto*parameterstobeusedinthereportloopatpnppernr.seltab_wa-low=pnppernr-low.appendseltab_watoseltab.endloop.SUBMITzreportwithselection-tableseltabviaselection-screen.3、带parameters程序的Submit的用法*Codeusedtopopulate'parameters'&executerep
3、ortSUBMITzreportwithp_param1='value'withp_param2='value'.4、其他情况*SubmitreportandreturntocurrentprogramafterwardsSUBMITzreportANDRETURN.*SubmitreportviaitsownselectionscreenSUBMITzreportVIASELECTION-SCREEN.*SubmitreportusingselectionscreenvariantSUBMITzreportUSINGSELECTION-SE
4、T'VARIANT1'.*Submitreportbutexportresultantlisttomemory,ratherthan*itbeingdisplayedonscreenSUBMITzreportEXPORTINGLISTTOMEMORY.*Oncereporthasfinishedandcontrolhasreturnedtocalling*program,usefunctionmodulesLIST_FROM_MEMORY,WRITE_LISTand*DISPLAY_LISTtoretrieveanddisplayreport
5、.*ExampleCode(Retrievinglistfrommemory)DATABEGINOFitab_listOCCURS0.INCLUDESTRUCTUREabaplist.DATAENDOFitab_list.DATA:BEGINOFvlistOCCURS0,filler1(01)TYPEc,field1(06)TYPEc,filler(08)TYPEc,field2(10)TYPEc,filler3(01)TYPEc,field3(10)TYPEc,filler4(01)TYPEc,field4(3)TYPEc,filler5(
6、02)TYPEc,field5(15)TYPEc,filler6(02)TYPEc,field6(30)TYPEc,filler7(43)TYPEc,field7(10)TYPEc,ENDOFvlist.SUBMITzreportEXPORTINGLISTTOMEMORY.CALLFUNCTION'LIST_FROM_MEMORY'TABLESlistobject=itab_listEXCEPTIONSnot_found=4OTHERS=8.CALLFUNCTION'LIST_TO_ASCI'EXPORTINGlist_index=-1TAB
7、LESlistasci=vlistlistobject=itab_listEXCEPTIONSempty_list=1list_index_invalid=2OTHERS=3.IFsy-subrcNE'0'.WRITE:/'LIST_TO_ASCIerror!!',sy-subrc.ENDIF.5、Submit为后台执行*Submitreportasjob(i.e.inbackground)data:jobnameliketbtcjob-jobnamevalue'TRANSFERTRANSLATION'.data:jobcountliketb
8、tcjob-jobcount,hostlikemsxxlist-host.data:beginofstarttime.includestructuretbtcstr