‎2010 Oct 25 8:05 AM
Hi,
I need to get input template id from selection screen, for that I need to create one f4 search help.
F4 search help shul contain 2 field Template_id and description, that I am getting from dictional table and inserting into a internal table lt_apr_tmplt.
I need to select multiple template from search help and retunr a list of template only to generate one report.
Please provide some samplt code to fulfill this requirement.
Thanks,
‎2010 Oct 25 9:21 AM
hi
try this if it helps you...
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'PLANT' "Key field from it_plants
dynpprog = sy-cprog "Program
dynpnr = sy-dynnr "Dynpro number
dynprofield = 'P_PLANT' "Select-options field
value_org = 'S' "Value return: C: cell by cell,
"S: structured
display = 'F' "Override readiness for input
TABLES
value_tab = it_plants "table with selection values
return_tab = t_return "Return value
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " show_f4_help
thanks
‎2010 Oct 25 9:23 AM
hi
try even this one....i guess this wil help you..
CALL FUNCTION 'TR_F4_HELP' "General F4 help (with single/multiple selection)
EXPORTING
iv_title = " c Dialog box title
is_sel_title1 = ' ' " First header line of the list
is_sel_title2 = ' ' " Second header line of the list
iv_start_column = 0 " sy-cucol Column in which the dialog box begins
iv_start_row = 3 " sy-curow Line in which the dialog box begins
iv_number_of_rows = 8 " sy-tabix No. of lines on the dialog box (not exact)
iv_no_of_key_columns = 0 " sy-tabix No. of key fields in table
iv_width_of_titles = ' ' " trpari-flag Take into account title length for output width
iv_without_selection = ' ' " trpari-flag Without selection option
iv_multiple_selection = ' ' " trpari-flag With multiple selection
iv_with_sort_icon = ' ' " trpari-flag With sort icon
iv_with_printer_icon = ' ' " trpari-flag With print icon
iv_with_filter_icon = ' ' " trpari-flag With filter icon
iv_with_search_icon = ' ' " trpari-flag With find icon
iv_extended_display = ' ' " trpari-flag X = Detail display possible
iv_show_also_1 = ' ' " trpari-flag Also display list with only one entry
IMPORTING
ev_ext_display_selected = " trpari-flag 'X': Detail display requested
TABLES
it_sel_table = " Table
CHANGING
cv_first_index = 1 " sy-tabix Index of lines that are shown uppermost
cv_selected_index = 0 " sy-tabix Selected table index
ct_sel_lines = " str4_sel_lines Selected lines in multiple selection
EXCEPTIONS
NO_LINES = 1 " Do not transfer line
NO_LINE_PICKED = 2 " No line selected
. " TR_F4_HELP
thanks
‎2010 Oct 25 10:12 AM
Hi,
I am getting return table value correctly from the Funtion but how to return table in parameter
I want p_tmplt is of table with one field tmplt_id
***********************************
DATA: BEGIN OF it_value OCCURS 0,
TEMPLATE LIKE T77S0-GSVAL,
DESCRIPTION LIKE T77ST-etext,
END OF it_value.
DATA : rtab TYPE TABLE OF ddshretval WITH HEADER LINE,
ptab TYPE TABLE OF ddshretval WITH HEADER LINE.
at selection-screen on value-request for p_tmplt.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TEMPLATE'
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
multiple_choice = 'X' " Allows to select multiple records
TABLES
value_tab = it_value
return_tab = rtab.
IF sy-subrc = 0.
ptab[] = rtab[].
ENDIF.
‎2011 Feb 07 6:42 AM