Skip to Content
avatar image
-3
Former Member

"you cannot use numeric literals as field names" Error

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 25, 2017 at 04:26 PM

    Oh my ...

    Remove the "/" from

    DATA :/ BEGIN OF WA_LFA1,
    Add comment
    10|10000 characters needed characters exceeded