Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Match code for an editable ALV field

Former Member
0 Kudos

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

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

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'.

narin_nandivada3
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thank you very much, it works now!

Diana

0 Kudos

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