on 04-13-2010 12:46 PM
Hi,
To delete certain field(s) from ALV output Im using Delete_field as follows:
DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE,
LR_IF_CONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
LR_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE,
LR_FIELD TYPE REF TO CL_SALV_WD_FIELD,
LR_AGGR_RULE TYPE REF TO CL_SALV_WD_AGGR_RULE.
LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALVTEST( ).
IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LR_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
LR_IF_CONTROLLER = WD_THIS->WD_CPIFC_ALVTEST( ).
LR_VALUE = LR_IF_CONTROLLER->GET_MODEL( ).
CALL METHOD LR_VALUE->IF_SALV_WD_FIELD_SETTINGS~DELETE_FIELD
EXPORTING
FIELDNAME = 'AUART'.
However it is throwing me error "Method IF_SALV_WD_FIELD_SETTINGS~DELETE_FIELD of class CL_SALV_WD_CONFIG_TABLE cannot be called at this time"
Can anybody please tell me the reason and what i supposed to do to avoid it.
Rgds
Sudhanshu
From the online help of this method:
You cannot use this method at the moment as it causes an error.
So that sounds like the method simply isn't supported yet (and this was in a 7.02 based system).
Do you really want to delete the field? Generally you just hide columns in the ALV.
data l_column type ref to cl_salv_wd_column.
l_column = LR_VALUE->if_salv_wd_column_settings~get_column( 'AUART'' ).
l_column->set_visible( cl_wd_uielement=>e_visible-none ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.