Application Development and Automation 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: 
Read only

problem with matchcode in alv for specific field

Former Member
0 Likes
946

Hi,

I have created a customer specific data element ZE_CONFTYPE, with a customer specific domain, and in this domain I have defined a value range with 3 possible single values (partial, final, automatic).

Later, I have defined a field: CTYPE type ZE_CONFTYPE, and I'm showing this field in an ALV.

it_fieldcatalog-fieldname = 'CTYPE'.

it_fieldcatalog-seltext_m = 'Confirmation Type'.

it_fieldcatalog-col_pos = 4.

it_fieldcatalog-edit = 'X'.

APPEND it_fieldcatalog.

CLEAR it_fieldcatalog.

Now I was hoping that a matchcode was going to show up in the ALV with the 3 possible values for this field, but apparently I was wrong. What should I do for this matchcode to show up?

THX!

5 REPLIES 5
Read only

former_member194669
Active Contributor
0 Likes
871

In the field catalog you may need to provide

ref_fieldname

ref_tabname

a®

Read only

0 Likes
871

but I have no table.

Read only

0 Likes
871

Then you may need to use


  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program       = repid
            i_callback_user_command  = 'CALLBACK_FOR_DETAIL'
            is_layout                = is_layout
            it_fieldcat              = ct_fieldcat
       tables
            t_outtab                 = g_itab.

You need to write code in "callback_for_detail" with fm F4IF_INT_TABLE_VALUE_REQUEST

or

Create a structure with the field you mentioned and give structure name as ref_table and field name as ref_fieldname

a®

Read only

0 Likes
871

Thanks for your reply.

I created a structure as you said, with only the field CTYPE,

and defined the structure as ref_tabname and the field as ref_fieldname.

Now when I execute the program, the matchcode does show up,

but when I click on it, I get a dump: "field symbol has not yet been assigned."

Would I have to create a table instead of a structure?

Isn't it weird that I can't show a matchcode with the fixed values of a custom field in an ALV without having to create a table for it?

In a selection screen this would work.

Read only

0 Likes
871

After creating a table, the matchcode doesn't show up either.