on 06-21-2016 12:43 PM
Hi All,
I am new to webdynpro abap. I have 8 fields in internal table. Inistead of displaying internal table fields, it is displaying all fields in table BKPF. Is there any field catalog to display internal table fields.
Please help me out.
Thanks & Regards,
N. HARISH KUMAR
Hi,
Issue is resolved by myself. In node, we have a option 'Dictionary Structure'.
Here I passed BKPF in Dictionary Structure. So, it is displaying all fields of BKPF in my ALV webdynpro output.
I removed BKPF from that structure. Now it is displaying as per my Node attributes.
I am very thankful for your suggestions and your suggestions helps me to resolve other issues.
Thanks & Regards,
N. HARISH KUMAR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi harish,
fieldcatalog in the sense, we can modify the alv table column names by using below code.
you can select whatever fiels you want in table.
DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
LO_CMP_USAGE = WD_THIS->WD_CPUSE_ALV2( ).
IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
LO_CMP_USAGE->CREATE_COMPONENT( ).
ENDIF.
DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
LO_INTERFACECONTROLLER = WD_THIS->WD_CPIFC_ALV2( ).
DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
).
LO_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_VISIBLE_ROW_COUNT( 5 ).
DATA: LR_TABLE_SETTINGS TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
DATA: LR_HEADER TYPE REF TO CL_SALV_WD_HEADER.
LR_TABLE_SETTINGS ?= LO_VALUE.
LR_HEADER = LR_TABLE_SETTINGS->GET_HEADER( ).
LR_HEADER->SET_TEXT( 'Waiting for Travel Advance Approval ' ).
**lr_table_Settings->set_Read_only( abap_false ).
DATA L_HEADER TYPE REF TO CL_SALV_WD_COLUMN_HEADER.
DATA: LO_COLUMN1 TYPE REF TO CL_SALV_WD_COLUMN.
LO_COLUMN1 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'TRAVELID' ).
L_HEADER = LO_COLUMN1->GET_HEADER( ).
L_HEADER->SET_TEXT( 'Travel Adv ID' ).
DATA: LO_COLUMN2 TYPE REF TO CL_SALV_WD_COLUMN.
LO_COLUMN2 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
L_HEADER = LO_COLUMN2->GET_HEADER( ).
L_HEADER->SET_TEXT( 'Employee Name' ).
.
.
.
.
In get_column you have to pass the attribute name
is this what you are looking?
Thanks,
Veerababu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harish,
The Table UI Element will display as many fields you configure it to. You can do it by binding it to a Context Node or manually creating columns. The framework will only bind the internal tables fields that are present on the table you created.
It is recommended to create a Context Node with the Table structure you wish and then use the table as structure layout for the internal table on run time. You can achieve this with the following example:
itab TYPE wd_this->Elements_YourNodeName.
Thus, you will have a 'itab' internal table with the exact same structure as the Context Node.
Regards,
Felipe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.