Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

"you cannot use numeric literals as field names" Error

Former Member
0 Kudos
958
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

1 ACCEPTED SOLUTION

retired_member
Product and Topic Expert
Product and Topic Expert
352

Oh my ...

Remove the "/" from

DATA 😕 BEGIN OF WA_LFA1,
5 REPLIES 5

retired_member
Product and Topic Expert
Product and Topic Expert
353

Oh my ...

Remove the "/" from

DATA 😕 BEGIN OF WA_LFA1,

352

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

0 Kudos
352

At least it tells the line ...

352

We improved the message in a future release.

0 Kudos
352

Hello Thanks for your help.

Yeah I've got it done