Professional Documents
Culture Documents
Abap Statments For Defining The Selection Screens
Abap Statments For Defining The Selection Screens
1>parameters
2>select-options
3>selection-screen
the standard selection screen of the executable program is predefined and has
screen number 1000.
if the parameter refers to data types from the dictionary, it adopts all the
attributes of the dictionary field.
parameters can only refer to the fields of database tables views and structures.
F1 = field help
F4 = possible entries help
the user can only enter the company code that are in t001.
the possible entries help of the input field for p_bukrs display the allowed values.
parameter <name> is created with type C and length 1, and assigned to group
<g1>.
each radiobutton group has atleast 2 radionuttons and by default the first radio
button from the group is selected.
select-options:
range of input
4 components of select-options
low =lower value
high = higher value
sign = I -> inclusive and E ->exclusive
option = these are possible operations
-if high is empty you can use EQ,NE,GT,LE,LT,CP,NP
-if high is filled you can use BT(between) NB(not between)
EX:
the selection screens that you define when you use the PARAMETERS or SELECTOPTIONS statments on their own has a standard layout in which all parameters
apper line by line.
this type of layout may not be always sufficent.
SELECTION-SCREEN statment has its own formating option that you can use to
define the layout of the parameter and selection criteria and display comments
and underline on the screen .
comments:
selection-screen comment [[/]<pos(length)> <comment here> {for field <f1>}].
BLOCKS of ELEMENTS.
SELECTION-SCREEN BEGIN OF BLOCK <BLOCK> [WITH FRAME [] TITLE
<title>].
-----
REPORT ZDEMO1.
if rb_raw = 'X'.
v_mtart = 'ROH'.
ENDIF.
if cb_disp = 'X'.
WRITE : / 'material no', 20 'material type'.
ULINE.
BIN_FILESIZE
filename
=
= 'D:\material.txt'
FILETYPE
= 'ASC'
APPEND
=''
WRITE_FIELD_SEPARATOR
= 'X'
HEADER
= '00'
TRUNC_TRAILING_BLANKS
WRITE_LF
= 'X'
=''
COL_SELECT
COL_SELECT_MASK
DAT_MODE
CONFIRM_OVERWRITE
NO_AUTH_CHECK
CODEPAGE
IGNORE_CERR
= ABAP_TRUE
REPLACEMENT
= '#'
WRITE_BOM
TRUNC_TRAILING_BLANKS_EOL
WK1_N_FORMAT
WK1_N_SIZE
WK1_T_FORMAT
WK1_T_SIZE
*
*
=''
=''
=''
=''
=''
=''
=''
= 'X'
=''
=''
=''
=''
IMPORTING
FILELENGTH
tables
data_tab
*
*
= it_mara
FIELDNAMES
EXCEPTIONS
FILE_WRITE_ERROR
=1
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
HEADER_NOT_ALLOWED
=2
=3
=4
=5
=6
=7
SEPARATOR_NOT_ALLOWED
=8
FILESIZE_NOT_ALLOWED
HEADER_TOO_LONG
DP_ERROR_CREATE
DP_ERROR_SEND
= 12
DP_ERROR_WRITE
= 13
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
FILE_NOT_FOUND
DATAPROVIDER_EXCEPTION
= 20
CONTROL_FLUSH_ERROR
= 21
OTHERS
=9
= 10
= 11
= 14
= 15
= 16
= 17
= 18
= 19
= 22
.
IF sy-subrc = 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
ENDIF.