Я хочу с помощью 'reuse_alv_fieldcatalog_merge'
заполнить таблицу и нажать на экран. Но выдает такую ошибку:
«Строки программы ABAP шире внутренней таблицы.
Проверил настройки и Downwards-Comp. На участке длины линии (72) знака не было. Так что проблема не в этом. Я оставляю свой код. Буду рад, если вы поможете.
TYPE-POOLS slis .
TABLES : vbrk, vbrp.
DATA : BEGIN OF gt_table OCCURS 0,
vbeln LIKE vbrk-vbeln,
waerk LIKE vbrk-waerk,
kunag LIKE vbrk-kunag,
fkart LIKE vbrk-fkart,
fktyp LIKE vbrk-fktyp,
vbtyp LIKE vbrk-vbtyp,
vkorg LIKE vbrk-vkorg,
vtweg LIKE vbrk-vtweg,
fkdat LIKE vbrk-fkdat,
posnr LIKE vbrp-posnr,
vrkme LIKE vbrp-vrkme,
matnr LIKE vbrp-matnr,
werks LIKE vbrp-werks,
fkimg LIKE vbrp-fkimg,
ntgew LIKE vbrp-ntgew,
brgew LIKE vbrp-brgew,
gewei LIKE vbrp-gewei,
brtwr LIKE vbrp-brtwr,
name1 LIKE kna1-name1,
END OF gt_table.
SELECT-OPTIONS : so_vbeln FOR vbrk-vbeln,
so_fkart FOR vbrk-fkart,
so_fktyp FOR vbrk-fktyp,
so_vbtyp FOR vbrk-vbtyp,
so_vkorg FOR vbrk-vkorg,
so_vtweg FOR vbrk-vtweg,
so_fkdat FOR vbrk-fkdat,
so_vrkme FOR vbrp-vrkme,
so_matnr FOR vbrp-matnr,
so_werks FOR vbrp-werks.
DATA : i_fcat TYPE slis_t_fieldcat_alv .
DATA : wa_fcat LIKE LINE OF i_fcat .
START-OF-SELECTION .
PERFORM get_data .
PERFORM create_fcat_merge .
END-OF-SELECTION .
PERFORM disp_alv .
FORM get_data .
SELECT a~vbeln a~waerk a~kunag a~fkart a~fktyp a~vbtyp a~vkorg a~vtweg a~fkdat b~posnr b~vrkme
b~matnr b~werks b~fkimg b~ntgew b~brgew b~gewei b~brtwr c~name1
INTO TABLE gt_table
FROM vbrk AS a INNER JOIN vbrp AS b ON a~vbeln = b~vbeln
INNER JOIN kna1 AS c ON c~kunnr = a~kunag
WHERE a~vbeln IN so_vbeln AND
a~fkart IN so_fkart AND
a~fktyp IN so_fktyp AND
a~vbtyp IN so_vbtyp AND
a~vkorg IN so_vkorg AND
a~vtweg IN so_vtweg AND
a~fkdat IN so_fkdat AND
b~vrkme IN so_vrkme AND
b~matnr IN so_matnr AND
b~werks IN so_werks.
ENDFORM.
FORM disp_alv .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = i_fcat
TABLES
t_outtab = gt_table.
ENDFORM.
FORM create_fcat_merge .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'gt_table'
i_inclname = sy-repid
CHANGING
ct_fieldcat = i_fcat.
ENDFORM.