SAP常用对话框应用Word格式文档下载.docx
- 文档编号:16703397
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:10
- 大小:16.86KB
SAP常用对话框应用Word格式文档下载.docx
《SAP常用对话框应用Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《SAP常用对话框应用Word格式文档下载.docx(10页珍藏版)》请在冰豆网上搜索。
N'
ELSEIFanswer='
ENDIF.
3.Dialogboxforchoosingfromalistwithoutdiagnosis(提供選擇列表供用戶選擇)
*填充選項列表:
selectlist-varoption='
A.WalMart'
APPENDselectlist.
B.COLE'
C.Privatelable'
*顯示列表dialog供用戶選擇
POPUP_TO_DECIDE_LIST'
mark_flag='
X'
mark_max=0
textline1='
請選擇執行標准'
titel='
請選擇執行標准:
'
TABLES
t_spopli=selectlist
EXCEPTIONS
not_enough_answers=1
too_much_answers=2
too_much_marks=3
OTHERS=4.
IFsy-subrc=0.
ENDIF.
4.上載文件(自帶路徑選擇對話框的上載函數UPLOAD,下載DOWNLOAD)
PARAMETER:
P_FILELIKERLGRAP-FILENAME.
CALLFUNCTION'
WS_UPLOAD'
FILENAME=P_FILE
FILETYPE='
ASC'
DATA_TAB=IN_PRO.
5.選擇屏幕的值選擇對話框(按F4出現)
DATA:
BEGINOFfieldsOCCURS3.
INCLUDESTRUCTUREhelp_value.
ENDOFfields.
BEGINOFvaluetabOCCURS3,
atwrtLIKEcawn-atwrt,
atwtbLIKEcawnt-atwtb,
ENDOFvaluetab.
SELECT-OPTIONS:
p_costFORcawn-atwrt.
ATSELECTION-SCREENONVALUE-REQUESTFORp_cost-low.
PERFORMget_value.
HELP_VALUES_GET_WITH_TABLE'
title_in_values_list='
成本分類﹕'
請選擇成本分類:
select_value=p_cost-low
fields=fields
valuetab=valuetab.
FORMget_value.
CLEARfields.REFRESHfields.
CLEARvaluetab.REFRESHvaluetab.
fields-tabname='
CAWN'
fields-fieldname='
ATWRT'
fields-selectflag='
APPENDfields.CLEARfields.
SELECTb~atwrtc~atwtb
INTOCORRESPONDINGFIELDSOFTABLEvaluetab
FROMcabnASaINNERJOINcawnASbON
a~atinn=b~atinnINNERJOINcawntASc
ONb~atinn=c~atinnANDb~atzhl=c~atzhl
WHEREa~atnam='
ADDITIONAL_MATERIAL_CHAR'
ANDc~spras='
M'
ENDFORM."
get_value
6.選擇屏幕日期選擇對話框(F4)
DATA:
week_sLIKEsy-datum,
week_eLIKEsy-datum.
s_weekLIKEscal-weekOBLIGATORY.
ATSELECTION-SCREENONVALUE-REQUESTFORs_week.
PERFORMget_week.
FORMget_week.
sel_weekLIKEscal-week.
CLEAR:
week_s,week_e.
F4_DATE'
select_week=sel_week
select_week_begin=week_s
select_week_end=week_e
calendar_buffer_not_loadable=1
date_after_range=2
date_before_range=3
date_invalid=4
factory_calendar_not_found=5
holiday_calendar_not_found=6
parameter_conflict=7
OTHERS=8.
IFsy-subrc=0.
s_week=sel_week.
get_week
7.信息List提示框:
DATAw_display1(70)TYPEc.
DATAw_display2(70)TYPEc.
POPUP_TO_DISPLAY_TEXT'
還有尚未確認的單據:
textline1=w_display1
textline2=w_display2
start_column=10
start_row=6.
8.DialogBoxfortheDisplayofaTextList(TextsinaTable)顯示文本List
t_lineLIKETABLEOFtlineWITHHEADERLINE.
COPO_POPUP_TO_DISPLAY_TEXTLIST'
task='
DISPLAY'
titel=text-004
text_table=t_line.
9.文件路徑選擇對話框
t_pathLIKErlgrap-filename."
文件路徑
**取文件路徑
PARAMETERS:
p_fileLIKErlgrap-filename.
ATSELECTION-SCREENONVALUE-REQUESTFORp_file.
PERFORMget_filename.
FORMget_filename.
KD_GET_FILENAME_ON_F4'
mask='
*.XLS'
static='
CHANGING
file_name=P_FILE
mask_too_long=1.
IFsy-subrc<
>
0.
MESSAGEe999WITH'
路徑不正確或選擇文件錯誤'
ENDFORM.
10.調用方法產生文件路徑對話框
p_fileLIKErlgrap-filename.
FIELD-SYMBOLS<
fs>
TYPEfile_table.
f>
f_tableTYPEfiletable.
rcTYPEi.
user_actionTYPEi.
l_indexTYPEi.
CALLMETHODcl_gui_frontend_services=>
file_open_dialog
window_title='
請選擇要匯入的文件'
file_filter='
Excelfiles(*.XLS)|*.XLS'
initial_directory='
D:
\'
file_table=f_table
rc=rc
user_action=user_action
cntl_error=1
file_open_dialog_failed=2
error_no_gui=3.
CALLMETHODcl_gui_cfw=>
flush
EXCEPTIONScntl_system_error=1
cntl_error=2.
CLEARp_file.
READTABLEf_tableASSIGNING<
INDEX1.
p_file=<
-filename.
11.提示信息dialog
POPUP_TO_INFORM'
匯入文件說明'
txt1=text-004
txt2=text-005
txt3=text-006
txt4=text-007.
12.程序運行時狀態欄提示
callfunction'
SAPGUI_PROGRESS_INDICATOR'
exporting
percentage=0
text=t_text.“t_text:
數據處理中
13.Dialogboxfordisplayingatextwithparameters(例程:
RGUREP01)
INITIALIZATION.
PERFORMREADME_FIRST.
FORMREADME_FIRST.
CLEARSAVE_TCODE.
MOVESY-TCODETOSAVE_TCODE.
CLEARSY-TCODE.
IFSY-BATCHEQSPACE.
IFSAVE_TCODEEQ'
SE38'
POPUP_DISPLAY_TEXT_WITH_PARAMS'
LANGUAGE=SY-LANGU
POPUP_TITLE=TEXT-400
*START_COLUMN=10
*START_ROW=3
TEXT_OBJECT='
GLX_TABLE_REPAIR'
CANCELLED=ANSWER
PARAMETERS=TEXT_PARAMS
ERROR_IN_TEXT=1
TEXT_NOT_FOUND=2
OTHERS=3.
IFANSWERNESPACE.
CLEARANSWER.
LEAVETOTRANSACTIONSAVE_TCODE.
ELSE.
*EXIT.
ENDFORM.
14.文件路徑get
WS_FILENAME_GET'
DEF_FILENAME=FILENAME
DEF_PATH='
MASK='
*.*,*.csv;
*.txt.'
MODE='
O'
TITLE=TEXTDAW
*'
Dateiauswahl'
(flw)
FILENAME=FILENAME
INV_WINSYS=01
NO_BATCH=02
SELECTION_CANCEL=03
SELECTION_ERROR=04.
IFSY-SUBRC<
0.ENDIF."
ok
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SAP 常用 对话框 应用
![提示](https://static.bdocx.com/images/bang_tan.gif)