Skip to Content
0
Former Member
Jul 04, 2007 at 07:01 AM

Programming error

15 Views

Hi,

I want to wrie a program using JOIN statement.

I am getting the error.

TYPES:

BEGIN OF TY_OUTPUT,

KUNNR TYPE KNA1-KUNNR,

LAND1 TYPE KNA1-LAND1,

VBELN TYPE VBAK-VBELN,

AUDAT TYPE VBAK-AUDAT,

AUART TYPE VBAK-AUART,

NETWR TYPE VBAK-NETWR,

END OF TY_OUTPUT.

DATA:

ST_OUTPUT TYPE TY_OUTPUT,

IT_OUTPUT TYPE TABLE OF TY_OUTPUT.

SELECT OPTIONS:

SKUNNR FOR ST_OUTPUT-KUNNR.

SELECT KNA1KUNNR KNA1LAND1 VBAKVBELN VBAKAUDAT VBAKAUART VBAKNETWR

FROM KNA1 AS KNA1

JOIN VBAK AS VBAK

WHERE KNA1~KUNNR IN SKUNNR.

IF SY-SUBRC EQ 0.

LOOP AT IT_OUTPUT INTO ST_OUTPUT.

WRITE:/ ST_OUTPUT.KUNNR, ST_OUTPUT.LAND1,

ST_OUTPUT_NAME1, ST_OUTPUT.VBELN,ST_OUTPUT.AUDAT,AT_OUTPUT.AUART,ST_OUTPUT.NETWR.

ENDLOOP.

Statement concluding with "...ST_OUTPUT-KUNNR" ended unexpectedly.

this is the error iam getting.