‎2006 Nov 02 7:14 AM
hi experts,
please tell explain to me how i can put the restriction in the search help.I want to get only the values which i want from the search help when i press f4 on that particular fied where this field takes the search help from the pedefined table.
Thanx in advance,
Mamatha.
‎2006 Nov 02 7:21 AM
‎2006 Nov 02 7:21 AM
‎2006 Nov 02 7:23 AM
U can use F4if_int_table_value_request Fm to create your own f4 help.
This function module displays a value list that you created in an ABAP program. The
value list is passed to the function module as the table parameter VALUE_TAB. If you
specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the users
selection is returned to the corresponding field on the screen. If you specify the table
parameter RETURN_TAB, the selection is returned into the table instead.
REPORT DEMO_DYNPRO_F4_HELP_MODULE.
TYPES: BEGIN OF VALUES,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
END OF VALUES.
DATA: PROGNAME LIKE SY-REPID,
DYNNUM LIKE SY-DYNNR,
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB TYPE TABLE OF VALUES.
CALL SCREEN 100.
MODULE INIT OUTPUT.
PROGNAME = SY-REPID.
DYNNUM = SY-DYNNR.
CLEAR: FIELD_VALUE, DYNPRO_VALUES.
FIELD_VALUE-FIELDNAME = 'CARRIER'.
APPEND FIELD_VALUE TO DYNPRO_VALUES.
ENDMODULE.
MODULE CANCEL INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE VALUE_CONNECTION INPUT.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = PROGNAME
DYNUMB = DYNNUM
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = DYNPRO_VALUES.
READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
SELECT CARRID CONNID
FROM SPFLI
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB
WHERE CARRID = FIELD_VALUE-FIELDVALUE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'CONNID'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'CONNECTION'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB.
ENDMODULE.
Screen Flow Logic:
PROCESS BEFORE OUTPUT.
MODULE INIT.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
PROCESS ON VALUE-REQUEST.
FIELD CONNECTION MODULE VALUE_CONNECTION.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
‎2006 Nov 02 9:55 AM
give the check table name as well as the field name then that particular f4 field takes the value from that check table