on 11-14-2011 5:08 PM
Hi,
Can any one tell me how to change the column positions and column name .. of a powl table and how to add custom fields into that?
Hi
To change column positions and column name, you need to enhance method GET_FIELD_CATALOG.
COLPOS and HEADER fields can be used to specify the the column position and column name.
To add custom fields, you need to enhance method GET_FIELD_CATALOG.
1. Create an append structure for the final POWL result table. You need to find the standard structure used by POWL for the final result table. This is generally found in method GET_OBJECTS_DEFINITION
2. Enhance method GET_FIELD_CATALOG to add the new fields from append structure to field catalog. Code would be something like this.
data : l_wa type line of powl_fieldcat_tty.
CLEAR l_wa.
l_wa-colid = 'COLID'.
l_wa-allow_filter = 'X'.
l_wa-enabled = 'X'.
l_wa-allow_sort = 'X'.
l_wa-col_visible = 'X'.
l_wa-header = 'Column Name Name'.
l_wa-header_by_ddic = abap_false..
INSERT l_wa INTO TABLE c_fieldcat.
Note colid is name of column added to append structure
3. To populate data in the newly added fields, add your logic to method GET_OBJECTS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.