3 weeks ago
hi All,
I am facing issue in selection dynamic creation.
Here requirement is to add find option, since the dynamic selection is created using FREE_SELECTION_DAILOG. here I am not able to add any find option.
any help is highly appreciated.
thanks in advance!
Request clarification before answering.
No issue for me. I have created the GUI status by copying RSSYSTDB %_FS_DOC_ (the status used by FREE_SELECTIONS_DIALOG by default) and adding the function code ZZFIND, assigned it to Ctrl+F, and I could use Ctrl+F successfully.
As you didn't post your code, maybe your question is "how to add a custom button to the free selections dialog". Here's one way:
TYPES tt_table TYPE STANDARD TABLE OF rsdstabs WITH EMPTY KEY.
TYPES tt_event TYPE STANDARD TABLE OF rsdsevents WITH EMPTY KEY.
TYPES tt_field TYPE STANDARD TABLE OF rsdsfields WITH EMPTY KEY.
DATA(tables) = VALUE tt_table( ( prim_tab = 'SFLIGHT' ) ).
DATA(events) = VALUE tt_event( ( event = 'A'
prog = sy-repid
form = 'AT_SELECTION_SCREEN_INPUT' ) ).
DATA(l_selection_id) = VALUE rsdynsel-selid( ).
CALL FUNCTION 'FREE_SELECTIONS_INIT'
IMPORTING selection_id = l_selection_id
TABLES tables_tab = tables
events = events
EXCEPTIONS OTHERS = 1.
IF sy-subrc = 0.
DATA(pfkey) = VALUE rsdspfkey( pfkey = 'FREE_SEL_STATUS'
program = sy-repid ).
DATA(where_clauses) = VALUE rsds_twhere( ).
DATA(fields_dummy) = VALUE tt_field( ).
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING selection_id = l_selection_id
pfkey = pfkey
IMPORTING where_clauses = where_clauses
TABLES fields_tab = fields_dummy
EXCEPTIONS OTHERS = 1.
IF sy-subrc = 0.
DATA(where_clause_first_table) = where_clauses[ 1 ].
SELECT * FROM sflight INTO TABLE (lt_sflight) WHERE (where_clause_first_table-where_tab).
ENDIF.
ENDIF.
FORM at_selection_screen_input TABLES g_seldyn STRUCTURE rsseldyn
g_fldnum STRUCTURE rsdsfldnum.
CASE sy-ucomm.
WHEN 'ZZFIND'.
" Do whatever you want
ENDCASE.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did try PFKEY parameter . it is not helping in find option within my tree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.