2009 Jan 29 5:02 PM
Guys , Im creating a ALV using the following code ,
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'CAUFVD'
is_variant = gs_variant
is_layout = gs_layout
i_save = x_save
CHANGING
it_outtab = ti_saida[].However I want to change the text of the fields ( columns ) , they come assigned for texts of CAUFVD , a friend told me that maybe is neccesary to change the fieldcat , how is that?
2009 Jan 30 12:31 PM
Hi,
If you want to change column heading means you have to set field catalog coltext field not reptext field.
Hope you have understand
Hi,
If you want to change column heading means you have to set field catalog coltext field not reptext field.
Hope you have understand
2009 Jan 29 5:13 PM
Try thsi way
v_structure = 'CAUFVD'.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = v_structure
i_client_never_display = c_x
changing
ct_fieldcat = i_fieldcat[].
loop at i_fieldcat where fieldname eq 'PROD' .
move : text-008 to i_fieldcat-scrtext_m,
" Product code
text-008 to i_fieldcat-reptext,
" Product code
text-008 to i_fieldcat-coltext.
" Product code
modify i_fieldcat index sy-tabix.
endloop.
...
...
...
call method grid1->set_table_for_first_display
exporting
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
it_toolbar_excluding = i_exclude[]
changing
it_outtab = i_output[]
it_fieldcatalog = i_fieldcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
a®
2009 Jan 30 11:37 AM
Hi, I did it this way,
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'CAUFVD'
i_client_never_display = 'X'
changing
ct_fieldcat = fieldcat[].
LOOP AT fieldcat where fieldname eq 'GSTRP' .
fieldcat-reptext = 'Data solicitação'.
modify fieldcat index sy-tabix.
ENDLOOP.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
* i_structure_name = 'CAUFVD'
is_variant = gs_variant
is_layout = gs_layout
i_save = x_save
CHANGING
it_outtab = ti_saida[]
it_fieldcatalog = fieldcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
ENDIF.but it still shows the old text. any idea please?
2009 Jan 30 11:45 AM
Hi,
Try like this...
field-symbols: <lwa_fcat> type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'CAUFVD'
changing
ct_fieldcat = fieldcat[]
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
loop at fieldcat assigning <lwa_fcat>.
case <lwa_fcat>-fieldname.
when 'STATUS'.
<lwa_fcat>-outputlen = 25.
<lwa_fcat>-coltext = 'STATUS'.
endcase.
endloop.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
* i_structure_name = 'CAUFVD'
is_variant = gs_variant
is_layout = gs_layout
i_save = x_save
CHANGING
it_outtab = ti_saida[]
it_fieldcatalog = fieldcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
ENDIF.
Hope it will helps
2009 Jan 30 12:13 PM
2009 Jan 30 12:31 PM
Hi,
If you want to change column heading means you have to set field catalog coltext field not reptext field.
Hope you have understand
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |