on 03-11-2009 11:43 PM
Is it possible to add custom fields for an ALV display which is using SAP's standard structure for display through enhancement framework? We could add fields to the context through the enhancement but as the node refers to the standard structure, these fields are not showing up on the ALV display? Any suggestions?
Thanks,
Ramesh
try adding manual code...in the post methods..
DATA: LR_LINK TYPE REF TO CL_SALV_WD_UIE_LINK_TO_ACTION.
DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
DATA: LR_INTF_CTRL TYPE REF TO IWCI_SALV_WD_TABLE.
DATA: LR_MODEL TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LR_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
LR_INTF_CTRL = WD_THIS->WD_CPIFC_ALV( ).
LR_MODEL = LR_INTF_CTRL->GET_MODEL( ).
WD_THIS->M_MODEL = LR_MODEL.
LR_COLUMN = LR_MODEL->IF_SALV_WD_COLUMN_SETTINGS~CREATE_COLUMN( ID = 'COPY' POSITION = 1 ).
CREATE OBJECT LR_LINK.
LR_LINK->SET_IMAGE_SOURCE_FIELDNAME( 'IMAGE_ATTRIB' ).
LR_LINK->SET_TOOLTIP( 'Copy RR to Claim' ).
LR_COLUMN->SET_CELL_EDITOR( LR_LINK ).
LR_HEADER = LR_COLUMN->CREATE_HEADER( ).
LR_HEADER->SET_TEXT( 'Create Claim' ).
where IMAGE_ATTRIB is your newly added field, instead LINK_TO_ACTION try with INPUT_FIELD
and use SET_VALUE_FIELDNAME method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.