i am getting------>>>> "GT_MAKT" is not an internal table or a database table. AT 53 LINE
and Incorrect nesting: Before the end of the program, the control structure introduced by "SELECT" must be closed by "ENDSELECT". AT 55 LINE...
REPORT zmanoj3.
TYPES : BEGIN OF ty,
vbeln TYPE vbeln,
posnr TYPE posnr,
matnr TYPE matnr,
makt TYPE makt,
END OF ty.
DATA : it TYPE TABLE OF ty,
wa TYPE ty.
DATA: num TYPE vbap-vbeln.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS num1 FOR num.
SELECTION-SCREEN END OF BLOCK b.
SELECT vbeln,
posnr,
matnr FROM vbap INTO TABLE @DATA(gt_vbap)
WHERE vbeln IN @num1.
IF sy-subrc EQ 0.
SELECT matnr,
maktx FROM makt INTO @DATA(gt_makt) FOR ALL ENTRIES IN @gt_vbap
WHERE matnr EQ @gt_vbap-matnr.
LOOP AT gt_vbap INTO DATA(wa_vbap).
<<------------------------------IN THIS LINE I AM GETTING
----"GT_MAKT" is not an internal table or a database table.-------------->>
READ TABLE gt_makt INTO DATA(wa_makt) WITH KEY matnr = gt_vbap-matnr.
ENDLOOP.------->>>>