‎2010 Feb 08 11:56 AM
Hi All,
I had table control. In table control ,I had three parameters in the screen. Based on two parameters I need to call material serach help S_MAT1. I extended standard material serach help S_MAT1 so i have desird resuit.
Problem is I want those two variables in default search screen.
I thought I can set set get parameters to get desired result but in table control we can not get this work.
Is there any function module to call search help?
Thanks
Abhishek Purwar
‎2010 Feb 08 12:15 PM
You may use FM [F4IF_FIELD_VALUE_REQUEST|http://forums.sdn.sap.com/search.jspa?threadID=&q=F4IF_FIELD_VALUE_REQUEST&objID=c42&dateRange=all&numResults=30&rankBy=10001] with the standard search help, to change standard behaviour of the search help, fill parameters callback_program and callback_form where you will be able to change the transmitted parameters. A little sample :
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'BSID'
fieldname = 'UMSKZ'
multiple_choice = 'X'
callback_program = gv_repid
callback_form = 'CGS_DEBITOR'
TABLES
return_tab = return_tab
EXCEPTIONS
OTHERS = 1.
*...
*&---------------------------------------------------------------------*
*& Form cgs_debitor
*&---------------------------------------------------------------------*
FORM cgs_debitor TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr_t
callcontrol LIKE ddshf4ctrl.
* Local declaration
DATA: ddshiface TYPE ddshiface,
worklist LIKE lumskz,
dynpfields TYPE TABLE OF dynpread WITH HEADER LINE.
* Filter D-ebitor
LOOP AT shlp-interface INTO ddshiface WHERE shlpfield = 'KOART'.
ddshiface-valtabname = 'BSID'.
ddshiface-valfield = 'KOART'.
ddshiface-value = 'D'.
MODIFY shlp-interface FROM ddshiface.
ENDLOOP.
ENDFORM.To get current value of the screen, use FM [DYNP_GET_STEPL|http://forums.sdn.sap.com/search.jspa?threadID=&q=DYNP_GET_STEPL&objID=c42&dateRange=all&numResults=30&rankBy=10001] (for table control line) and [DYNP_VALUES_READ|http://forums.sdn.sap.com/search.jspa?threadID=&q=DYNP_VALUES_READ&objID=c42&dateRange=all&numResults=30&rankBy=10001] in the POV.
Regards,
Raymond
‎2010 Feb 08 12:45 PM
Hi Raymond,
Thanks for your help.
I am not able to figure out. Do u have any example or any program or sample code?
Thanks,
Abhishek
‎2010 Feb 08 2:15 PM
Read this sample, it contains most functions to use in the POV part of the dynpro :
[DYNAMIC F4 HELP FOR A FIELD IN TABLE CONTROL |http://wiki.sdn.sap.com/wiki/display/sandbox/DYNAMICF4HELPFORAFIELDINTABLECONTROL]
Then in the module/form
- Add the DYNP_VALUES_READ for the other two fields
- Add the 2 parameters for callback form to the F4 FM
- Implement the form adding the two selections fields
Regards,
Raymond