Skip to Content
0
Former Member
Sep 20, 2007 at 09:27 AM

Error in program of join two tables

26 Views

I have written following code:

TABLES: lfa1, lfbk.

TYPES: BEGIN OF str1_lfa1_lfbk,

lifnr LIKE lfa1-lifnr,

sortl LIKE lfa1-sortl,

pstlz LIKE lfa1-pstlz,

ort01 LIKE lfa1-ort01,

name1 LIKE lfbk-bankn,

stras LIKE lfbk-banks,

adrnr LIKE lfbk-bankl,

END OF str1_lfa1_lfbk.

DATA: wa1_lfa1_lfbk TYPE str1_lfa1_lfbk,

it1_lfa1_lfbk TYPE STANDARD TABLE OF str1_lfa1_lfbk.

SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr DEFAULT 1.

SELECT a~lifnr

a~sortl

a~pstlz

a~ort01

b~bankn

b~banks

b~bankl

INTO wa1_lfa1_lfbk

FROM lfa1 AS a INNER JOIN lfbk AS b

ON alifnr = blifnr

WHERE a~lifnr IN s_lifnr.

APPEND wa1_lfa1_lfbk TO it1_lfa1_lfbk.

ENDSELECT.

LOOP AT it1_lfa1_lfbk INTO wa1_lfa1_lfbk.

ULINE.

WRITE: /5 wa1_lfa1_lfbk-lifnr,

20 wa1_lfa1_lfbk-sortl,

35 wa1_lfa1_lfbk-pstlz,

50 wa1_lfa1_lfbk-ort01.

SKIP.

WRITE: /5 text-001 wa1_lfa1_lfbk-bankn,

/5 text-002 wa1_lfa1_lfbk-banks,

/5 text-003 wa1_lfa1_lfbk-bankl.

ENDLOOP.

and getting following error:

Unable to interpret "WA1_LFA1_LFBK-BANKN". Possible causes of error:

Incorrect spelling or comma error.

plz help me i m new in ABAP