‎2009 Aug 18 3:44 PM
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!
‎2009 Aug 18 3:50 PM
In the field catalog you may need to provide
ref_fieldname
ref_tabname
a®
‎2009 Aug 18 3:59 PM
‎2009 Aug 18 4:28 PM
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®
‎2009 Aug 19 9:46 AM
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.
‎2009 Aug 19 12:25 PM