Skip to Content
0
Former Member
May 03, 2012 at 07:05 AM

SELECT fdl1 fld2* FROM TAB1 APPENDING TABLE itab WHERE fld3 = SFLD1

69 Views

Hi,

I have used the below code and is giving an error " GDT_TAB1 IS NOT DEFINED IN DICTIONARY"

Please help me to solve this

TABLES: LIPS.
PARAMETER: SFLD1 TYPE LIPS-VBELN.
TYPES: BEGIN OF GTS_TAB1,
FLD1 TYPE LIPS-WERKS,
FLD2 TYPE LIPS-MATNR,
END OF GTS_TAB1,

BEGIN OF GTS_ITAB,
FLD3 TYPE MAKT-MAKTX,
FLD4 TYPE MAKT-MAKTG,
END OF GTS_ITAB.

DATA: GDT_TAB1 TYPE TABLE OF GTS_TAB1,
GDS_TAB1 TYPE GTS_TAB1,
GDT_ITAB TYPE TABLE OF GTS_ITAB,
GDS_ITAB TYPE GTS_ITAB.

SELECT WERKS MATNR FROM LIPS INTO TABLE GDT_TAB1 WHERE VBELN = SFLD1.
LOOP AT GDT_TAB1 INTO GDS_TAB1.
SELECT MAKTX MAKTG FROM MAKT INTO TABLE GDT_ITAB WHERE MATNR = GDS_TAB1-FLD2.
ENDLOOP.

SELECT MAKTX MAKTG FROM GDT_TAB1 APPENDING TABLE gdt_itab
WHERE vbeln = SFLD1.

Moderator Message: Basic question. Thread locked & all points unassigned.

Message was edited by: Suhas Saha