on 11-07-2006 1:50 PM
Hi all,
please help me i am trying to display the values in alv table using below code.But i am getting runtime error as NO_FIELDCATALOG_AVAILABLE.Please explain to me how can i sort it out.
DATA: repid LIKE sy-repid,
alvtitle(30),
fieldcat TYPE SLIS_T_FIELDCAT_ALV,
fieldcat_ln TYPE slis_fieldcat_alv,
layout TYPE slis_layout_alv,
eventcat TYPE slis_t_event,
eventcat_ln LIKE LINE OF eventcat,
dvariant TYPE disvariant,
flen type i,
prg LIKE sy-repid.
repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = repid
i_internal_tabname = 'r_fields'
i_inclname = repid
CHANGING
ct_fieldcat = fieldcat.
Format output fields
DO 8 TIMES.
READ TABLE fieldcat INDEX sy-index INTO fieldcat_ln.
CASE sy-index.
WHEN 1.
Hide first field (Selection field 'sel')
fieldcat_ln-no_out = 'X'.
WHEN OTHERS.
Size column heading to width of medium text
flen = strlen( fieldcat_ln-seltext_m ).
fieldcat_ln-outputlen = flen.
*>> Begin of RM insert 20/03/2006 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Allow input of Print Block field
IF sy-index EQ 7.
fieldcat_ln-input = 'X'.
fieldcat_ln-edit = 'X'.
fieldcat_ln-checkbox = 'X'.
ENDIF.
*>> End of RM insert 20/03/2006 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*>> Begin of RM insert 16/05/2006 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Reversal Indicator is a checkbox field
IF sy-index EQ 8.
fieldcat_ln-checkbox = 'X'.
ENDIF.
*>> End of RM insert 16/05/2006 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ENDCASE.
Use Medium field description for all fields
fieldcat_ln-ddictxt = 'M'.
MODIFY fieldcat INDEX sy-index FROM fieldcat_ln.
ENDDO.
eventcat_ln-name = 'TOP_OF_PAGE'.
eventcat_ln-form = 'TOP_OF_PAGE'.
APPEND eventcat_ln TO eventcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'r_fields'
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = layout
IT_FIELDCAT = fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'A'
I_SAVE = 'A'
IS_VARIANT = dvariant
IT_EVENTS = eventcat
TABLES
T_OUTTAB = r_fields.
Thank you,
Giri.
hi giri,
pls chk this excellent link.
http://www.sapdevelopment.co.uk/reporting/alv/alv_variousfcat.htm
then u can find out where u r wrong. u can belive me.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
give like this.
<b>data: fieldcat type slis_fieldcat_alv occurs 0.</b>
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = SY-CPROG
i_internal_tabname = 'R_FIELDS' => in capial letter
i_inclname = 'ZDEMO_ALVGRID_STRUCTURE'
changing
ct_fieldcat = fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
rgds
anver
if hlepd pls mark points
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
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.