Skip to Content
-3

"you cannot use numeric literals as field names" Error

Oct 25, 2017 at 03:51 PM

77

avatar image
Former Member
Hello this is my code when I'm trying to execute this code, it is giving "you cannot use numeric literals as field names" as error.

Can someone please tell me where am I going wrong.



REPORT  ZSPT_LFA1_DETAILS.
DATA :/ BEGIN OF WA_LFA1,
        MANDT TYPE LFA1-MANDT,
        LIFNR TYPE LFA1-LFNR,
        NAME1 TYPE LFA1-NAME1,
        ORT01 TYPE LFA1-ORT01,
        LAND1 TYPE LFA1-LAND1,
END OF WA_LFA1.
DATA IT_LFA1 LIKE TABLE OF WA_LFA1.
SELECT MANDT LIFNR NAME1 ORT01 LAND1 FROM LFA1 INTO TABLE IT_LFA1.
LOOP AT IT_LFA1 INTO WA_LFA1.
        WRITE : / WA_LFA1-MANDT, WA_LFA1-LIFNR, WA_LFA1-NAME1,
                  WA_LFA1-ORT01, WA_LFA1-LAND1.
ENDLOOP.

Thank you

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Keller
Oct 25, 2017 at 04:26 PM
1

Oh my ...

Remove the "/" from

DATA :/ BEGIN OF WA_LFA1,
Show 4 Share
10 |10000 characters needed characters left characters exceeded

Well, to be fair, the message verbiage could use some improvement. :)

3

We improved the message in a future release.

2

At least it tells the line ...

0
Former Member

Hello Thanks for your help.

Yeah I've got it done

0