03-30-2015 2:51 PM
Hi Experts.
I'm working with grid->set_table_for_first_display to develop ALV in module pool .My question is:
I can´t use 'REUSE_ALV_FIELDCATALOG_MERGE' to create my fieldcat what function can i use compatible with grid->set_table_for_first_display
to create my fieldcat ?
Thansk for help.
03-30-2015 5:15 PM
On the long run, you may be better using CL_SALV_TABLE=>CREATE as you just don't have to create the field catalog.
Regards,
Clemens
03-30-2015 3:08 PM
03-30-2015 5:15 PM
On the long run, you may be better using CL_SALV_TABLE=>CREATE as you just don't have to create the field catalog.
Regards,
Clemens
03-31-2015 6:28 AM
create field catalog as below
it_fcat TYPE lvc_t_fcat, (Table Type ALV control: Field catalog)
wa_fcat TYPE lvc_s_fcat (Structure ALV control: Field catalog)
assign the values to field catalog as below...
wa_fcat-row_pos = row.
wa_fcat-col_pos = col.
wa_fcat-fieldname = field.
wa_fcat-tabname = tabnm.
wa_fcat-coltext = text. you can add other properties also... like editable, drop down.. etc...
append wa_fcat to it_fcat.
then pass this field catalog to set_table_for_first_display as below..
CALL METHOD g_grid->set_table_for_first_display
CHANGING
it_fieldcatalog = it_fcat
it_outtab = it_final.
03-31-2015 9:37 PM
Thanks Kunal and how could i use a user_command in this case?do you have examples?
04-01-2015 6:28 AM
Hi Ronaldo,
If you are using set_table_for_first_display method then you must have created container for it..
Once the screen is created there are two events created those are- PBO & PAI..
User Commands are handled in PAI event..
GOTO -> SE38 -> do F4 on BCALV* , you will get lots of examples.. SAP has covered all the topics related to ALV.. like tree, editable, etc.. etc..
Please check