‎2011 Jul 25 12:41 PM
Hi Experts ,
i need dispaly header in BOLD ,in order i used ALV containers but for which an unexpected error occured.
can anyone pls guide me with this.
error:
Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
A RAISE statement in the program "CL_GUI_ALV_GRID===============CP" raised
exception
condition "NO_FIELDCATALOG_AVAILABLE".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
code:
CREATE OBJECT l_lock
EXPORTING
side = cl_gui_docking_container=>lock_at_top
extension = 200 .
CREATE OBJECT l_lop
EXPORTING
parent = l_lock
orientation = 1 .
g_cont1 = g_split->top_left_container.
g_cont2 = g_split->bottom_right_container.
CREATE OBJECT l_lock1
EXPORTING
i_parent = l_keyt1 .
CREATE OBJECT l_lock2
EXPORTING
i_parent = l_key2 .
CALL METHOD l_lock1->set_table_for_first_display
EXPORTING
i_structure_name = 'pt_ctx'
CHANGING
it_outtab = t_am[] .
CALL METHOD l_lock2->set_table_for_first_display
EXPORTING
i_structure_name = 'pt_vat'
CHANGING
it_outtab = t_PM[] .
‎2011 Jul 25 12:47 PM
call method g_grid0100->set_table_for_first_display
EXPORTING
is_variant = gs_variant
i_save = gc_save
is_layout = g_lout0100
changing
it_fieldcatalog = gi_fcat0100
it_outtab = gi_outtab100
it_sort = gi_sort0100.
have you defined the catalog? it_fieldcatalog = gi_fcat0100
lw_fcat0100-tabname = 'GI_OUTTAB100'.
lw_fcat0100-fieldname = 'STATUS'.
lw_fcat0100-coltext = 'Status'.
lw_fcat0100-icon = 'X'.
append lw_fcat0100 to gi_fcat0100.
clear lw_fcat0100.
g_lout0100-edit = 'X'.
g_lout0100-cwidth_opt = 'X'. "Optimize column width
g_lout0100-keyhot = 'X'. "Hotspot on key fields
g_lout0100-grid_title = 'Overview'.
g_lout0100-CTAB_FNAME = 'COLOR'.
g_lout0100-excp_led = 'X'.
g_lout0100-excp_fname = 'STATUS'.
Edited by: ssm on Jul 25, 2011 5:18 PM
‎2011 Jul 25 12:47 PM
call method g_grid0100->set_table_for_first_display
EXPORTING
is_variant = gs_variant
i_save = gc_save
is_layout = g_lout0100
changing
it_fieldcatalog = gi_fcat0100
it_outtab = gi_outtab100
it_sort = gi_sort0100.
have you defined the catalog? it_fieldcatalog = gi_fcat0100
lw_fcat0100-tabname = 'GI_OUTTAB100'.
lw_fcat0100-fieldname = 'STATUS'.
lw_fcat0100-coltext = 'Status'.
lw_fcat0100-icon = 'X'.
append lw_fcat0100 to gi_fcat0100.
clear lw_fcat0100.
g_lout0100-edit = 'X'.
g_lout0100-cwidth_opt = 'X'. "Optimize column width
g_lout0100-keyhot = 'X'. "Hotspot on key fields
g_lout0100-grid_title = 'Overview'.
g_lout0100-CTAB_FNAME = 'COLOR'.
g_lout0100-excp_led = 'X'.
g_lout0100-excp_fname = 'STATUS'.
Edited by: ssm on Jul 25, 2011 5:18 PM
‎2011 Jul 25 12:54 PM
hi SSM, thnx for your quick response.
but can i use that above logic so that i can display the header in BOLD letters ,
my actual requirement is to display the HEADER in BOLD letters,can you help me wit that.
Regards,
Krrish.
‎2011 Jul 25 1:06 PM
First, declare the structure name in UPPERCASE characters, that should give a better result.
CALL METHOD l_lock1->set_table_for_first_display
EXPORTING
i_structure_name = 'pt_ctx' " <= 'PT-CTX'
CHANGING
it_outtab = t_am[] .
CALL METHOD l_lock2->set_table_for_first_display
EXPORTING
i_structure_name = 'pt_vat' " <= 'PT_VAT'
CHANGING
it_outtab = t_PM[] You can also create a field catalog via function module LVC_FIELDCATALOG_MERGE and using the results in parameter it_fieldcatalog of method set_table_for_first_display.
Regards,
Raymond.
‎2011 Jul 25 1:06 PM
‎2011 Jul 25 7:51 PM
Hi TGP,
i_structure_name = <DDIC structure in uppercase letters>.
The ALV will generate it's own field catalog if you specify a name you can see in dictionary using SE11 transaction.
If you use CL_SALV_TABLE (search for it!) you can use any internal table for display.
This is not about the bold header as I do not know what you want. Can you please copy the code from your program and post it
formatted as codeAnd please tell us what aouy want in what header for what.
Regards
Clemens
‎2011 Jul 28 7:21 AM
‎2011 Jul 27 7:46 AM