Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Join

Former Member
0 Kudos
366

Hi All,

Can some one please help me with the join. It is giving me error saying 'Unknown column name "A~WADAT-IST". not determined until runtime, you cannot specify a field list'.

I need to get LIKP-VBELN LIKP-KUNAG LIKP-VSBED LIKP-WADAT-IST LIPS-WERKS LIPS-MATNR LIPS-LFIMG LIPS-VRKME VBFA-VBELN.

Thanks,

Veni.

DATA: BEGIN OF ideli OCCURS 0,

vbeln LIKE likp-vbeln,

kunag LIKE likp-kunag,

vsbed LIKE likp-vsbed,

wadat-ist LIKE likp-wadat_ist,

werks LIKE lips-werks,

matnr LIKE lips-matnr,

lfimg LIKE lips-lfimg,

vrkme LIKE lips-vrkme,

ddeli LIKE vbfa-vbeln,

END OF ideli.

----


  • Output Table

----


DATA: BEGIN OF iout OCCURS 0,

vbeln LIKE likp-vbeln,

wdelno(20) TYPE C,

kunag LIKE likp-kunag,

vsbed LIKE likp-vsbed,

wadat-ist LIKE likp-wadat_ist,

werks LIKE lips-werks,

matnr LIKE lips-matnr,

lfimg LIKE lips-lfimg,

vrkme LIKE lips-vrkme,

END OF iout.

----


  • SELECTION SCREEN

----


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: S_VBELN FOR LIKP-VBELN,

S_ERDAT FOR LIKP-ERDAT,

S_ERNAM FOR LIKP-ERNAM,

S_VSTEL FOR LIKP-VSTEL,

S_VKORG FOR LIKP-VKORG,

S_KUNAG FOR LIKP-KUNAG,

S_VSBED FOR LIKP-VSBED,

S_WADAT FOR LIKP-WADAT_IST,

S_MATNR FOR LIPS-MATNR,

S_WERKS FOR LIPS-WERKS.

SELECTION-SCREEN END OF BLOCK b1.

FORM get_data.

SELECT Avbeln Akunag Avsbed Awadat-ist

Bwerks Bmatnr Blfimg Bvrkme

C~ddeli

INTO TABLE IDELI

FROM LIKP AS A

INNER JOIN LIPS AS B

ON avbeln = bvbeln

INNER JOIN VBFA AS C

ON Bvbeln = Cvbeln

AND BPOSNR = CPOSNV

WHERE A~VBELN IN S_VBELN

AND A~ERDAT IN S-ERDAT

AND A~ERNAM IN S-ERNAM

AND A~VSTEL IN S-VSTEL

AND A~VKORG IN S-VKORG

AND A~KUNAG IN S_KUNAG

AND A~VSBED IN S_VSBED

AND A~WADAT_IST IN S_WADAT

AND B~MATNR IN S_MATNR

AND B~WERKS IN S_WERKS

AND C~VBTYP_N = 'Q'.

ENDFORM. " get_data

1 ACCEPTED SOLUTION

former_member583013
Active Contributor
0 Kudos
101

The field is WADAT_IST and you are writing WADAT-IST Big difference -;)

Greetings,

Blag.

3 REPLIES 3

former_member583013
Active Contributor
0 Kudos
102

The field is WADAT_IST and you are writing WADAT-IST Big difference -;)

Greetings,

Blag.

former_member156446
Active Contributor
0 Kudos
101

Hi Veni


DATA: BEGIN OF iout OCCURS 0,
vbeln LIKE likp-vbeln,
wdelno(20) TYPE c,
kunag LIKE likp-kunag,
vsbed LIKE likp-vsbed,
wadat_ist LIKE likp-wadat_ist,   " <<<<<<<<
werks LIKE lips-werks,
matnr LIKE lips-matnr,
lfimg LIKE lips-lfimg,
vrkme LIKE lips-vrkme,
END OF iout.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR likp-vbeln,
s_erdat FOR likp-erdat,
s_ernam FOR likp-ernam,
s_vstel FOR likp-vstel,
s_vkorg FOR likp-vkorg,
s_kunag FOR likp-kunag,
s_vsbed FOR likp-vsbed,
s_wadat FOR likp-wadat_ist, " <<<<<<<<
s_matnr FOR lips-matnr,
s_werks FOR lips-werks.
SELECTION-SCREEN END OF BLOCK b1.


SELECT a~vbeln a~kunag a~vsbed a~wadat_ist " <<<<<<<<
b~werks b~matnr b~lfimg b~vrkme
INTO TABLE ideli
FROM likp AS a
INNER JOIN lips AS b
ON a~vbeln = b~vbeln
INNER JOIN vbfa AS c
ON b~vbeln = c~vbeln
AND b~posnr = c~posnv
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~ernam IN s_ernam
AND a~vstel IN s_vstel
AND a~vkorg IN s_vkorg
AND a~kunag IN s_kunag
AND a~vsbed IN s_vsbed
AND a~wadat_ist IN s_wadat
AND b~matnr IN s_matnr
AND b~werks IN s_werks

0 Kudos
101

Thank you Blag and Jay.

I missed the typo and thinking of what was wromg with the join. I really appriciate your help.

Thanks,

Veni.