REPORT Z. data: begin of inttab occurs 10, bukrs like t001-bukrs, butxt like t001-butxt, ort01 like t001-ort01, end of inttab. data: fieldname like dd03l-fieldname, ind like sy-tabix. data: fields like help_value occurs 10 with header line, shrinkfields like dynpread occurs 0 with header line. data: begin of list_of_fields occurs 10, fieldname like dd03l-fieldname, end of list_of_fields. start-of-selection. select bukrs butxt ort01 from t001 into table inttab. fieldname = 'BUKRS'. * list of table fields list_of_fields-fieldname = 'T001-BUKRS'. append list_of_fields. list_of_fields-fieldname = 'T001-BUTXT'. append list_of_fields. list_of_fields-fieldname = 'T001-ORT01'. append list_of_fields. * list of table fields with selection restrictions move 'T001-BUKRS' to shrinkfields-fieldname. move 'S*' to shrinkfields-fieldvalue. append shrinkfields. * prepare formatted table within table fields for further use call function 'TRANSFER_NAMES_TO_FIELDS' exporting selectfield = fieldname tables fields = fields namelist = list_of_fields exceptions wrong_format_given = 01. if sy-subrc <> 0. write: / 'Wrong format.'. exit. endif. * popup window call function 'HELP_VALUES_GET_NO_DD_NAME' exporting selectfield = fieldname titel = 'Select Company Code' use_user_selections = 'S' importing ind = ind tables fields = fields full_table = inttab user_sel_fields = shrinkfields exceptions full_table_empty = 01 no_tablestructure_given = 02 no_tablefields_in_dictionary = 03 more_than_one_selectfield = 04 no_electfield = 05. if sy-subrc <> 0. write: / 'Error =', sy-subrc. else. write: / '#', ind, 'selected'. read table inttab index ind. write: inttab-bukrs. endif. * end of code