Tuesday
Hi there! please how can I show the fields vertically in one column under title "Description"
FORM f_prepare_AFFECT_DATA2.
CALL METHOD obj_test->prepare_affect_resultat2
EXPORTING
it_grp_nature = gt_grp_nature
it_description_a = gt_affect_a2
IMPORTING
et_affect2_alv = gt_alv_affect2
.
ENDFORM.
FORM show_affect2.
DATA: lt_fieldcat TYPE lvc_t_fcat,
ls_fieldcat TYPE lvc_s_fcat,
ls_layout TYPE lvc_s_layo.
g_subscreen = '0107'.
" Define Field Catalog
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'REPORT_NOUVEAU'.
ls_fieldcat-coltext = 'Report Nouveau'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'RESULTAT_NET_I'.
ls_fieldcat-coltext = 'Résultat Net I'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'RESULTAT_NET_E'.
ls_fieldcat-coltext = 'Résultat Net E'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PRELEVEMENT'.
ls_fieldcat-coltext = 'Prélèvement'.
APPEND ls_fieldcat TO lt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'AUTRE_PRELEVEMENT'.
ls_fieldcat-coltext = 'Autre Prélèvement'.
APPEND ls_fieldcat TO lt_fieldcat.
ls_layout-zebra = abap_true.
" Container and Grid Initialization
IF go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'CC_ALV1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
CHECK go_container IS BOUND.
IF go_grid IS NOT BOUND.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = ls_layout
CHANGING
it_outtab = gt_alv_affect2
it_fieldcatalog = lt_fieldcat.
ENDFORM.
Normally it show like this:
But I want to show it like this:
Thank you
Request clarification before answering.
Hi,
I think its not possible to display the fields in vertical lining as fieldcat shows the fields one after the other but not one under the other.
Rgds,
G. Khadeer Basha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
25 | |
22 | |
8 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.