‎2011 Feb 22 9:51 AM
Hi All,
I have some queries about search help/matchcode object.
How do i do and filtering when I select the company code value eg: MY01, the when i click on F4 Location name, it only display the data for location name for company code MY01 only? The fields need to display in S_NAME are
company code & Location name. Can anyone a
Selection screen:
Company code (s_bukrs)
Location name (s_name)
‎2011 Feb 22 11:16 AM
Hi,
Either you can create a search help and add Both the fields in the help, so you will get the values for both the fields
or you can use FM '4IF_INT_TABLE_VALUE_REQUEST'
chk the link below..
http://sapprograms.blogspot.com/2008/11/f4-help-of-one-field-depends-on-other.html
Thanks
Shankar
‎2011 Feb 22 10:08 AM
HI
you need to write your own code based on company code, put it in one internal table. pass the internal table to the below FM:
F4IF_INT_TABLE_VALUE_REQUEST
‎2011 Feb 22 10:35 AM
Hi,
You have to fetch the data according to the parameters e.g company code in a internal table and pass it back to FM.
F4_INT_TABLE_VALUE_REQUEST.
It WIL WORK, try it.
Thanks
Arbind
‎2011 Feb 22 10:51 AM
In every case you will need to read the value of the other fields (in POV or AT SELECTION-SCREEN ON VALUE-REQUEST) via FM [DYNP_VALUES_READ|http://www.sdn.sap.com/irj/scn/advancedsearch?query=dynp_values_read]
The easiest way is then to use a simple [F4IF_INT_TABLE_VALUE_REQUEST|http://www.sdn.sap.com/irj/scn/advancedsearch?query=f4if_int_table_value_request] after filling an internal table.
Another more user-friendly is to use [F4IF_FIELD_VALUE_REQUEST|http://www.sdn.sap.com/irj/scn/advancedsearch?query=f4if_field_value_request] which will use the standard search help (which can be collective) you wail fill [callback_program and callback_form|http://www.sdn.sap.com/irj/scn/advancedsearch?query=f4if_field_value_requestcallback_programcallback_form] to get program/form that will filter the data.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = <table>
fieldname = <field>
* multiple_choice = 'X'
callback_program = '<callback_program>
callback_form = '<callback_form>
TABLES
return_tab = return_tab
EXCEPTIONS
OTHERS = 1.
FORM <callback_form> TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr_t
callcontrol LIKE ddshf4ctrl.
* Local data
DATA: ddshiface TYPE ddshiface,
worklist LIKE lumskz,
dynpfields TYPE TABLE OF dynpread WITH HEADER LINE.
*Add Filter
LOOP AT shlp-interface INTO ddshiface WHERE shlpfield = <fieldname>.
ddshiface-valtabname = <table>.
ddshiface-valfield = <other field>.
ddshiface-value = <other field value>.
MODIFY shlp-interface FROM ddshiface.
ENDLOOP.
ENDFORM.Regards,
Raymond
‎2011 Feb 22 11:05 AM
HI Blue Sky,
You can either :
Use search help with Imp parameter checked for Company Code.
For this you will have to assign either the parameter ID for Company code field , or the screen field name should correspond to a dictionary field to which this search help is assigned.
Use F4IF_INT_TABLE_VALUE_REQUEST function module
In this case, use DYNP_VALUES_READ to read teh screen field value for company code if necessary and then selct the values using coding to pass it to the function module F4IF_INT_TABLE_VALUE_REQUEST .
Please get back for any further help.
Regards,
Suzie
‎2011 Feb 22 11:16 AM
Hi,
Either you can create a search help and add Both the fields in the help, so you will get the values for both the fields
or you can use FM '4IF_INT_TABLE_VALUE_REQUEST'
chk the link below..
http://sapprograms.blogspot.com/2008/11/f4-help-of-one-field-depends-on-other.html
Thanks
Shankar
‎2011 Feb 22 2:52 PM
Hi All,
Is this FM DYNP_VALUES_READ able to read the select-options value? I did tried it and seem it only work for parameter value. Is there any way to read the selection screen value for select-options? Thanks.
eg:
SELECT-OPTIONS : s_id FOR xx,
SELECT-OPTIONS : s_class for xx.
‎2011 Feb 23 4:51 AM
To get teh LOW and HIGH values.. you can use it, and then you can append it into a ranges table or teh the select options itself manually.. But in case of extensions, i dont think it is possible
Suzie