Skip to Content
author's profile photo Former Member
Former Member

Help with Join

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 11:13 PM

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

    Greetings,

    Blag.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 30, 2008 at 11:19 PM

    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
    
    

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.