Skip to Content
-1

how to set table enhancement explicitly in program ?

Aug 16, 2017 at 05:14 PM

90

avatar image

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.

10 |10000 characters needed characters left characters exceeded

Why do you talk about MARA when MARA isn't in your program?

1
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Matthew Billingham
Aug 17, 2017 at 06:00 AM
1

Go to SE11, look at table LFA1, check its enhancement category. See if someone has repaired it.

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Aug 17, 2017 at 06:18 AM
1

Try to understand the meaning of Enhancement Category. Check the settings in SE11. This should explain the syntax error.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 16, 2017 at 07:12 PM
-2

use 'into corresponding fields of' instead of INTO table and try.

Share
10 |10000 characters needed characters left characters exceeded