on 08-28-2014 12:33 PM
Hi All,
I am enhancing 'HRRCF_C_SEARCH_UI' dynpro of erec and want to hide country & reference code column in view VW_UNREG_HITLIST.
I tried using CALL METHOD LR_TABLE->REMOVE_COLUMN in wodomodifyview in post-exit, but it is not working.
Please help me.
Regards,
Rajan Jain
Hi,
try with below coding
data : gs_table type ref to cl_wd_table,
gs_abs_column type ref to cl_wd_abastr_table_column.
gs_table ?= view->get_element( id = 'TABLE' ). "Table ID
call method gs_table->remove_column
exporting
id = 'REF_CODE'
index = 1
importing
the_column = gs_abs_col.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use remove_grouped_column() method to achieve this.
Code snippet:
DATA: lr_table TYPE REF TO cl_wd_table,
lr_abs_col TYPE REF TO cl_wd_abstr_table_column.
lr_table ?= view->get_element( id = 'TABLE ). " ID of Table UI
CALL METHOD lr_table->remove_grouped_column
EXPORTING
id = 'COL1' " column
index = 1 " index
RECEIVING
the_grouped_column = lr_abs_col.
hope this helps u,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
I tried the code mentioned by you, but it is giving error.
Runtime Errors OBJECTS_OBJREF_NOT_ASSIGNED
Exception CX_SY_REF_IS_INITIAL
Detail:
You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: "LR_TABLE").
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement.
Regards,
Rajan Jain
Hi Kiran,
Dump Analysis :
method _PST_4YWBYG6OI6AO3EJY7A2KK1NI4 . "Exit of WDDOMODIFYVIEW (in ZHR_EREC_UNREG_SRCH_ENH
DATA lo_nd_job_hits TYPE REF TO if_wd_context_node.
DATA lt_job_hits TYPE wd_this->elements_job_hits.
data:lr_table type ref to cl_wd_table,
lr_column type ref to CL_WD_TABLE_COLUMN,
lr_abs_col TYPE REF TO cl_wd_abstr_table_column.
lr_table ?= view->get_element( 'JOB_HITS' ).
CALL METHOD lr_table->remove_grouped_column
EXPORTING
id = 'COUNTRY_TXT' " column
index = 3 " index
RECEIVING
the_grouped_column = lr_abs_col.
Its showing error on Call method statement.
Hi,
Seems, lr_table is Initial here!! Please keep a break point at Call Method statement and check that lr_table has reference or not. And please make sure the table ID is JOB_HITS in the Layout
Edit: I see that the Id of the table is 'TABLE' in the view VW_UNREG_HITLIST, so please change it
Your code should be as below:
lr_table ?= view->get_element( 'TABLE' ).
CALL METHOD lr_table->remove_grouped_column
EXPORTING
id = 'TABLE_COUNTRY_TXT' " column
index = 3 " index
RECEIVING
the_grouped_column = lr_abs_col.
hope this helps,
Regards,
Kiran
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.