Skip to Content
-4

whats wrong in the below code, code executing but output is not displaying

REPORT zmanoj3.

TABLES mara.

TYPES: BEGIN OF manoj,

         a TYPE mara-mandt,

         b TYPE mara-matnr,

         c TYPE mara-mtart,

         d TYPE mara-bstme,

         e TYPE mara-matkl,

       END OF manoj.

DATA: it_manoj TYPE TABLE OF manoj,
      wa_manoj TYPE manoj.


SELECT-OPTIONS smanoj FOR mara-matnr.
SELECT mandt matnr mtart bstme matkl FROM mara INTO TABLE it_manoj WHERE matnr EQ smanoj.

LOOP AT it_manoj INTO wa_manoj.
  WRITE : wa_manoj.
  WRITE: / wa_manoj-a, 20 wa_manoj-b, 30 wa_manoj-c, 40 wa_manoj-d, 50 wa_manoj-e.
ENDLOOP.
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Aug 07, 2019 at 05:47 AM

    SELECT-OPTIONS is not a simple value, it is a range

    and a range in a SELECT statement must uses the operator IN

    WHERE MATNR IN SMANOJ

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 07, 2019 at 06:12 AM
    -5

    thank you, but how should i specify range in select statement?

    Add a comment
    10|10000 characters needed characters exceeded