09-11-2008 9:32 AM
Hi everyone,
I have an ALV with an editable field. I want to add matchcode with predefined 2 values to it.
I used EDIT option for field catalog to make this field editable.
I defined this field as a custom field in one of the DB table.
The possible values of the field are in the declaration of the DOMAIN. But I still can't see the matchcode with those values when I want to enter a value into this field in ALV.
What should I do?
Thank you in advance,
Diana
09-11-2008 10:00 AM
if you mention these two you get the F4 help automatically.
You need to mention the REF_FIELD and REF_TABLE name.
x_fieldcat-ref_field = 'ZFIELDNAME'.
x_fieldcat-ref_table = 'TABLENAME'.
09-11-2008 10:07 AM
Hi Diana,
Welcome to SDN
When you set the field catalog you have to set option F4AVAILABL to 'X'.
If w_fcat is the field catalog structure then set as
w_fact-F4AVAILABL = 'X'
w_fact-CHECKTABLE = 'SCARR'
w_fact-REF_TABLE = 'SPFLI'
w_fact-REF_FIELD = 'CARRID'.
Refer the standard program BCALV_TEST_GRID_F4_HELP and BCALV_GRID_EDIT_DELTA
Please go through this thread for sample code
Hope this would help you.
Good luck
Narin
09-11-2008 10:47 AM
04-28-2011 12:54 PM
Hi,
the reports/functions are no longer required and F4AVAILABL is not supported (as in ECC 6.0).
examle:
fieldcatalog-ref_fieldname = 'FRGKZ'.
fieldcatalog-ref_tabname = 'EBAN'.
is sufficient if the field has a correponding matchcode.
Edited by: Peter Kamenik on Apr 28, 2011 1:56 PM