2017 Aug 16 6:14 PM
how to set table enhancement explicitly in program for a table MARA while reading the data from Table ?
Getting ERROR for the below code as.
"The enhancement specification of structure type "LFA1" is not consistent"
Checked the table and the enhancement is set as : "can be enhanced (Deep)".
REPORT ZSAMPLE08.
TYPES: BEGIN OF TY_LFA1,
LIFNR TYPE LIFNR,
LAND1 TYPE LAND1,
NAME1 TYPE NAME1,
NAME2 TYPE NAME2,
END OF TY_LFA1.
data: it_tab TYPE TABLE OF ty_lfa1,
wa_tab type ty_lfa1.
SELECT-OPTIONS: s_lifnr for wa_tab-lifnr.
SELECT lifnr
land1
name1
name2 from lfa1
into TABLE it_tab
WHERE lifnr in s_lifnr.
loop at it_tab INTO wa_tab.
WRITE: / wa_tab-lifnr,
wa_tab-land1,
wa_tab-name1,
wa_tab-name2.
endloop.
how to set table enhancement explicitly in program for a table MARA while reading the data from Table ?
Getting ERROR for the below code as.
"The enhancement specification of structure type "LFA1" is not consistent"
Checked the table and the enhancement is set as : "can be enhanced (Deep)".
REPORT ZSAMPLE08.
TYPES: BEGIN OF TY_LFA1,
LIFNR TYPE LIFNR,
LAND1 TYPE LAND1,
NAME1 TYPE NAME1,
NAME2 TYPE NAME2,
END OF TY_LFA1.
data: it_tab TYPE TABLE OF ty_lfa1,
wa_tab type ty_lfa1.
SELECT-OPTIONS: s_lifnr for wa_tab-lifnr.
SELECT lifnr
land1
name1
name2 from lfa1
into TABLE it_tab
WHERE lifnr in s_lifnr.
loop at it_tab INTO wa_tab.
WRITE: / wa_tab-lifnr,
wa_tab-land1,
wa_tab-name1,
wa_tab-name2.
endloop.
2017 Aug 16 8:12 PM
use 'into corresponding fields of' instead of INTO table and try.
2017 Aug 17 6:59 AM
2017 Aug 17 7:00 AM
Go to SE11, look at table LFA1, check its enhancement category. See if someone has repaired it.
2017 Aug 17 7:18 AM
Try to understand the meaning of Enhancement Category. Check the settings in SE11. This should explain the syntax error.