‎2008 Apr 29 2:13 PM
Hello. Probably a simple answer here, but can you add additional fields to your V.02 output list? If so, how? Thanks.
‎2008 Apr 29 7:11 PM
Hi,
You are correct. The simple answer is, no, you cannot add additional fields (at least in ECC 5.0). If any of the standard eight fields are hidden then you can add those using the layout functions of the ALV. The "no" answer assumes that you are talking about adding new fields in addition to the eight standard fields.
This can be verified by looking at the source code of program RVAUFERR, form fieldcat_init. Here you will see that there is no dynamic user-exit/BADI type code that allows us to add fields to the ALV field catalog.
Of course you could modify the standard code, but that is usually a bad idea (i.e. don't do that!).
Regards,
Jamie
‎2008 Apr 29 7:11 PM
Hi,
You are correct. The simple answer is, no, you cannot add additional fields (at least in ECC 5.0). If any of the standard eight fields are hidden then you can add those using the layout functions of the ALV. The "no" answer assumes that you are talking about adding new fields in addition to the eight standard fields.
This can be verified by looking at the source code of program RVAUFERR, form fieldcat_init. Here you will see that there is no dynamic user-exit/BADI type code that allows us to add fields to the ALV field catalog.
Of course you could modify the standard code, but that is usually a bad idea (i.e. don't do that!).
Regards,
Jamie
‎2008 Apr 29 7:19 PM
Thanks.. That's what I thought, but wanted to be sure I had not missed any unknown opportunity.
‎2013 Nov 29 9:32 AM
Hi,
is possible to add for example fields from table VBAK using 2 enhancement.
Example to add field AUART:
data: end of xvbak.
data: begin of etab occurs 50,
selk(1) value '_',
text(40),
vbeln like vbuv-vbeln,
ernam like vbak-ernam,
erdat like vbak-erdat,
vkorg like vbak-vkorg,
vtweg like vbak-vtweg,
spart like vbak-spart,
vkbur like vbak-vkbur,
vkgrp like vbak-vkgrp,
vbtyp like vbak-vbtyp,
fehler(5) type n,
uvall like tvuvs-uvall,
uvvlk like tvuvs-uvvlk,
uvfak like tvuvs-uvfak,
uvprs like tvuvs-uvprs,
col(3) type c, " Farbfeld für ALV
tabix like sy-tabix,
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Strutt. ETAB, Fine S
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
enhancement 1 zrvauferr. "active version
data: auart type auart.
endenhancement.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
end of etab.
data: vbtyp like dd07v-domvalue_l.
...
...
clear ls_fieldcat.
ls_fieldcat-fieldname = 'COL'.
ls_fieldcat-datatype = 'CHAR'.
ls_fieldcat-outputlen = 3.
ls_fieldcat-tech = 'X'.
append ls_fieldcat to u_er_fieldcat.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2) FORM FIELDCAT_INIT, Fine A
*$*$-Start: (2)---------------------------------------------------------------------------------$*$*
enhancement 2 zrvauferr. "active version
clear ls_fieldcat.
ls_fieldcat-fieldname = 'AUART'.
ls_fieldcat-ref_tabname = 'VBAK'.
ls_fieldcat-ddictxt = 'L'.
ls_fieldcat-sp_group = 'A'.
append ls_fieldcat to u_er_fieldcat.
endenhancement.
*$*$-End: (2)---------------------------------------------------------------------------------$*$*
endform. " FIELDCAT_INIT
*&---------------------------------------------------------------------*
*& Form EVENTTAB_BUILD
*&---------------------------------------------------------------------*
* Ereignistabelle Bilden
* EVENTS TABLE BUILD
*----------------------------------------------------------------------*
* -->U_ER_EVENTS[] text
*----------------------------------------------------------------------*
form eventtab_build using u_er_events type slis_t_event.
Regards
Emiliano Merli