06-19-2008 9:14 AM
Hello together,
I'm searching for a solution to display dynamic "select-options".
I' ve tried to find a solution with the search function but could not find one for my problem.
What i want to reach is this:
I have one field in which i could enter one or more table-names
I want to count each entered table (how much tabels have been entered)
for each table should be displayed automatically one special field to upload a CSV-file
Thank you for your help
06-19-2008 9:20 AM
Hi,
Combine these 2 FM
FREE_SELECTIONS_INIT
FREE_SELECTIONS_DIALOG.
I had done this like this -
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
kind = 'F'
IMPORTING
selection_id = g_sel
TABLES
fields_tab = t_dyn
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 NE 0.
MESSAGE e717(db).
ENDIF.
ENDIF.
*Dialog for Selection.
REFRESH t_ranges.
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = g_sel
title = 'Extended Selection'(s12)
as_window = true
start_row = 5
start_col = 20
tree_visible = space
IMPORTING
field_ranges = t_ranges
TABLES
fields_tab = t_dyn
EXCEPTIONS
internal_error = 1
no_action = 2
selid_not_found = 3
illegal_status = 4
OTHERS = 5.
IF sy-subrc NE 0.
CHECK sy-subrc NE 2.
MESSAGE e717(db).
ENDIF.
Thanks
Vikranth
06-19-2008 9:20 AM
Hi,
Check this link also
Refer to this code sample ... might be of some help
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abapProgramtogenerateselect-options+dynamically&
Thanks
VIkranth
06-19-2008 9:23 AM
Look this link :
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abapProgramtogenerateselect-options+dynamically&