對於可能的初學者問題,我表示歉意,但我時間不夠。基本上我需要從2個表中將數據拖入1個對象。兩個表共享設備號,我需要從表EQKT和EQUZ的所有者ID獲取相應的說明。sap abap將多個表格中的數據轉換爲1個對象
DATA: BEGIN OF t_report OCCURS 3,
matnr LIKE eqkt-equnr,
mtart LIKE eqkt-eqktx,
maktx LIKE equz-J_3GEIGNER,
END OF t_report.*-
DATA: d_repid LIKE sy-repid.
*-----------------------------------------
*--Selection Screen
SELECT-OPTIONS: s_matnr FOR eqkt-equnr.
*-----------------------------------------
START-OF-SELECTION.
*-Read data
SELECT * FROM eqkt
WHERE equnr IN s_matnr.
CLEAR makt.
SELECT SINGLE *
FROM makt
WHERE matnr = eqkt-equnr AND
spras = sy-langu.
MOVE: eqkt-equnr TO t_report-matnr,
eqkt-eqktx TO t_report-mtart.
APPEND t_report.
ENDSELECT.
*This is where it stops working.
SELECT * FROM EQUZ
WHERE equnr IN s_matnr.
MOVE: EQUZ-J_3GEIGNER TO t_report-maktx.
APPEND t_report.
ENDSELECT.
代碼編譯,並且在其中予其顯示在ALV,它並正確顯示「所有者」在表的頂部,但沒有數據被填充在用於所有者(設備號和說明已正確顯示)