Code: Alles auswählen.
<loop über feldkatalog>
data H_<feldname> type <rollname>.
select-options <feldname> for h_<feldname>.
<endloop>.
Code: Alles auswählen.
data:
selection_id LIKE RSDYNSEL-SELID,
tables_tab type standard table of RSDSTABS,
fields_tab type standard table of RSDSFIELDS.
append 'VBAP' to tables_tab.
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
KIND = 'T'
* EXPRESSIONS = EXPRESSIONS
* FIELD_RANGES_INT = FIELD_RANGES_INT
* FIELD_GROUPS_KEY = FIELD_GROUPS_KEY
* RESTRICTION = RESTRICTION
* ALV = ALV
* CURR_QUAN_PROG = SY-CPROG
* CURR_QUAN_RELATION = CURR_QUAN_RELATION
IMPORTING
SELECTION_ID = SELECTION_ID
* WHERE_CLAUSES = WHERE_CLAUSES
* EXPRESSIONS = EXPRESSIONS
* FIELD_RANGES = FIELD_RANGES
* NUMBER_OF_ACTIVE_FIELDS = NUMBER_OF_ACTIVE_FIELDS
TABLES
TABLES_TAB = TABLES_TAB
* FIELDS_TAB = FIELDS_TAB
* FIELD_DESC = FIELD_DESC
* FIELD_TEXTS = FIELD_TEXTS
* EVENTS = EVENTS
* EVENT_FIELDS = EVENT_FIELDS
* FIELDS_NOT_SELECTED = FIELDS_NOT_SELECTED
* NO_INT_CHECK = NO_INT_CHECK
* ALV_QINFO = ALV_QINFO
EXCEPTIONS
FIELDS_INCOMPLETE = 1
FIELDS_NO_JOIN = 2
FIELD_NOT_FOUND = 3
NO_TABLES = 4
TABLE_NOT_FOUND = 5
EXPRESSION_NOT_SUPPORTED = 6
INCORRECT_EXPRESSION = 7
ILLEGAL_KIND = 8
AREA_NOT_FOUND = 9
INCONSISTENT_AREA = 10
KIND_F_NO_FIELDS_LEFT = 11
KIND_F_NO_FIELDS = 12
TOO_MANY_FIELDS = 13
DUP_FIELD = 14
FIELD_NO_TYPE = 15
FIELD_ILL_TYPE = 16
DUP_EVENT_FIELD = 17
NODE_NOT_IN_LDB = 18
AREA_NO_FIELD = 19
OTHERS = 20
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
write: / sy-subrc.
ENDIF.
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = selection_id
TITLE = 'Testt enno'
FRAME_TEXT = 'Frame enno'
* STATUS = STATUS
AS_WINDOW = 'X'
* START_ROW = 2
* START_COL = 2
* NO_INTERVALS = ' '
* JUST_DISPLAY = ' '
* PFKEY = PFKEY
ALV = 'X'
* TREE_VISIBLE = 'X'
* DIAG_TEXT_1 = DIAG_TEXT_1
* DIAG_TEXT_2 = DIAG_TEXT_2
* WARNING_TITLE = WARNING_TITLE
* AS_SUBSCREEN = ' '
* NO_FRAME = NO_FRAME
* IMPORTING
* WHERE_CLAUSES = WHERE_CLAUSES
* EXPRESSIONS = EXPRESSIONS
* FIELD_RANGES = FIELD_RANGES
* NUMBER_OF_ACTIVE_FIELDS = NUMBER_OF_ACTIVE_FIELDS
TABLES
fields_tab = fields_tab
* FCODE_TAB = FCODE_TAB
* FIELDS_NOT_SELECTED = FIELDS_NOT_SELECTED
EXCEPTIONS
INTERNAL_ERROR = 1
NO_ACTION = 2
SELID_NOT_FOUND = 3
ILLEGAL_STATUS = 4
OTHERS = 5.