2006 Mar 15 6:02 AM
Hello people I have a little predicament here. I need to create search help restricting the results.
Like lets say I want to create a search help that select material numbers and name for a specific material group. Then use that as a seach help.
Right now Im playing around with function module <b>HELP_VALUES_GET_WITH_TABLE</b> but it seems to open right when you access call screen.
Also Since this is dialog programming I am using screen painter. And I need to assign the search help in an I/O Field.
Well that's all for now take care guys. Take care to you all.
2006 Mar 15 6:04 AM
Hi Chad,
To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST in the program and add a field statement for the field that should trigger the F4 help. In the mdoule called from PROCESS ON-VALUE-REQUEST, call function module
F4IF_FIELD_VALUE_REQUEST.
Samples code:
PROCESS ON VALUE-REQUEST.
FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.
MODULE f4_help_for_pctr INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'ZSD00003'
fieldname = 'PRCTR'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = 'ZSD00002_BRUGERKONV_LISTE'
dynpnr = '0100'
dynprofield = 'IT_ZSD00003-PRCTR'
STEPL = 0
value = '50*'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this will help you.
ENDMODULE. " F4_help_for_pctr INPUT
Cheers
Sunny
Rewrd points , if found helpful
Message was edited by: Sunny
Hello people I have a little predicament here. I need to create search help restricting the results.
Like lets say I want to create a search help that select material numbers and name for a specific material group. Then use that as a seach help.
Right now Im playing around with function module <b>HELP_VALUES_GET_WITH_TABLE</b> but it seems to open right when you access call screen.
Also Since this is dialog programming I am using screen painter. And I need to assign the search help in an I/O Field.
Well that's all for now take care guys. Take care to you all.
2006 Mar 15 6:04 AM
Hi Chad,
To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST in the program and add a field statement for the field that should trigger the F4 help. In the mdoule called from PROCESS ON-VALUE-REQUEST, call function module
F4IF_FIELD_VALUE_REQUEST.
Samples code:
PROCESS ON VALUE-REQUEST.
FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.
MODULE f4_help_for_pctr INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'ZSD00003'
fieldname = 'PRCTR'
SEARCHHELP = ' '
SHLPPARAM = ' '
dynpprog = 'ZSD00002_BRUGERKONV_LISTE'
dynpnr = '0100'
dynprofield = 'IT_ZSD00003-PRCTR'
STEPL = 0
value = '50*'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
RETURN_TAB =
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this will help you.
ENDMODULE. " F4_help_for_pctr INPUT
Cheers
Sunny
Rewrd points , if found helpful
Message was edited by: Sunny
2006 Mar 15 6:11 AM
Hi Chad,
Tell me your e-mail id so that I can send the program to you .
Regards,
Sylendra
2006 Mar 15 6:53 AM
Hi Chad,
Tell me your e-mail id so that I can send the program to you .
Regards,
Sylendra
... gee thats very generous of you its [email protected]
in any event I have other projects to work on all get back to this thanks everybody, points will be awarded accordingly soon enough.
2006 Mar 15 6:17 AM
Hi,
1. Create a module under 'process on value request' in ur flow logic.
2. Then in ur editor put all the values u require in a internal table.
3. pass this internal table to the function module F4IF_INT_TABLE_VALUE_REQUEST called in ur module created under POV.
hope this helps...
madan...
2006 Mar 15 6:27 AM
Hi Chad,
Is your problem been resolved .
If not , just try this code
Copy paste as it is and it will work .
TYPES: BEGIN OF values,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF values.
DATA: carrier(3) TYPE c,
connection(4) TYPE c.
DATA: progname TYPE sy-repid,
dynnum TYPE 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_carrier INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'DEMOF4HELP'
fieldname = 'CARRIER1'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CARRIER'.
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.
<b>For Screen 100 logic:
Copy:</b>
PROCESS BEFORE OUTPUT.
MODULE INIT.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
PROCESS ON VALUE-REQUEST.
FIELD CARRIER MODULE VALUE_CARRIER.
FIELD CONNECTION MODULE VALUE_CONNECTION.
<b>Do design the layout also.</b>
I hope this will help you.
If this satisfy you then please close the thread by rewarding appropriate points to the helpful answers.
Cheers
Sunny
Message was edited by: Sunny
2006 Mar 15 7:41 AM
Hi Chad,
Have you tried that piece of code,Is your problem been resolved or are not just let us know.
As per the form etiquettes .
If you are satisfied,Please close this thread by rewarding appropraite points to the helpful answers .
Cheers
Sunny