2007 Apr 25 1:12 PM
Hi,
Is there any function module for providing search help in the selection screenfor the normal report generation
2007 Apr 25 1:15 PM
Use the below code.. u have to write
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lgart.
*Get the F4 value of Customer Wage Types
PERFORM f_dn_grp_f4 USING 'P_LGART'.
*&---------------------------------------------------------------------*
*& Form f_dn_grp_f4
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_dn_grp_f4 USING p_field TYPE any.
DATA: p_field_name TYPE help_info-dynprofld.
* varaible used to get the value returned by the function module
DATA l_return TYPE ddshretval OCCURS 0 WITH HEADER LINE.
* get the fieldname for F4 help
p_field_name = p_field.
g_repid = sy-repid.
g_dynnr = sy-dynnr.
* Call the function module for the display of F4 values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LGART'
dynpprog = g_repid
dynpnr = g_dynnr
dynprofield = p_field_name
window_title = 'Customer Wage Types'
value_org = 'S'
TABLES
value_tab = g_t_user_help
return_tab = l_return
* FIELD_TAB =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF sy-subrc = 0.
p_lgart = l_return-fieldval.
ENDIF.
ENDFORM. " f_dn_grp_f4
*&------------
Use the below code.. u have to write
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lgart.
*Get the F4 value of Customer Wage Types
PERFORM f_dn_grp_f4 USING 'P_LGART'.
*&---------------------------------------------------------------------*
*& Form f_dn_grp_f4
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_dn_grp_f4 USING p_field TYPE any.
DATA: p_field_name TYPE help_info-dynprofld.
* varaible used to get the value returned by the function module
DATA l_return TYPE ddshretval OCCURS 0 WITH HEADER LINE.
* get the fieldname for F4 help
p_field_name = p_field.
g_repid = sy-repid.
g_dynnr = sy-dynnr.
* Call the function module for the display of F4 values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LGART'
dynpprog = g_repid
dynpnr = g_dynnr
dynprofield = p_field_name
window_title = 'Customer Wage Types'
value_org = 'S'
TABLES
value_tab = g_t_user_help
return_tab = l_return
* FIELD_TAB =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF sy-subrc = 0.
p_lgart = l_return-fieldval.
ENDIF.
ENDFORM. " f_dn_grp_f4
*&------------
2007 Apr 25 1:14 PM
Hi,
Yes.
Go thru this sample code
*DATA: BEGIN OF W_ERNAM,
ERNAM LIKE CATSDB-ERNAM,
END OF W_ERNAM.
*
*DATA: T_ERNAM like STANDARD TABLE OF W_ERNAM.
*
*PARAMETERS ERNAM LIKE CATSDB-ERNAM.
*
*
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR ERNAM.
*
SELECT ERNAM
FROM CATSDB UP TO 500 ROWS
INTO TABLE T_ERNAM.
*
*
*CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'ERNAM'
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = '1000'
DYNPROFIELD = 'ERNAM'
STEPL = 0
WINDOW_TITLE = WINDOW_TITLE
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB = MARK_TAB
IMPORTING
USER_RESET = USER_RESET
TABLES
VALUE_TAB = T_ERNAM
FIELD_TAB = FIELD_TAB
RETURN_TAB = RETURN_TAB
DYNPFLD_MAPPING = DYNPFLD_MAPPING
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.
2007 Apr 25 1:15 PM
Use the below code.. u have to write
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_lgart.
*Get the F4 value of Customer Wage Types
PERFORM f_dn_grp_f4 USING 'P_LGART'.
*&---------------------------------------------------------------------*
*& Form f_dn_grp_f4
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_dn_grp_f4 USING p_field TYPE any.
DATA: p_field_name TYPE help_info-dynprofld.
* varaible used to get the value returned by the function module
DATA l_return TYPE ddshretval OCCURS 0 WITH HEADER LINE.
* get the fieldname for F4 help
p_field_name = p_field.
g_repid = sy-repid.
g_dynnr = sy-dynnr.
* Call the function module for the display of F4 values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LGART'
dynpprog = g_repid
dynpnr = g_dynnr
dynprofield = p_field_name
window_title = 'Customer Wage Types'
value_org = 'S'
TABLES
value_tab = g_t_user_help
return_tab = l_return
* FIELD_TAB =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3
.
IF sy-subrc = 0.
p_lgart = l_return-fieldval.
ENDIF.
ENDFORM. " f_dn_grp_f4
*&------------
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |