2023 Mar 16 8:27 PM
Hi,
I am quite new in this query stuff from SAP and I wanted to ask for help regarding the following error, when I try to execute I get this:
1) Incorrect table name or table alias name "LIKP". "LIKP". table alias name "LIKP". table alias name "LIKP". table alias name
and
2) "LIKP". table alias name "LIKP". table "".
The query is this:
select distinct
LIPS~VBELN AS DELIVERY_NOTE_NUMBER,
LIPS~VGBEL AS ORDER_NUMBER,
LIKP~BOLNR AS TRACKING_NUMBER,
VBKD~BSTKD AS PURCHASE_ORDER_NUMBER,
VBAK~AUART,
VBAK~VSBED,
VBAK~ERDAT AS ERDAT_ORDER,
VBAK~ERZET AS ERZET_ORDER,
LIPS~WERKS,
T001W~KUNNR,
T001W~NAME1 AS FROM_NAME,
T001W~STRAS AS FROM_STREET,
T001W~PSTLZ AS FROM_ZIP_CODE,
T001W~ORT01 AS FROM_CITY,
T001W~LAND1 AS FROM_COUNTRY
from LIPS
join VBAK on LIPS~VGBEL = VBAK~VBELN and LIPS~VTWEG = VBAK~VTWEG and LIPS~SPART = VBAK~SPART
join VBAP on VBAK~VBELN = VBAP~VBELN and LIPS~VGPOS = VBAP~POSNR
join VBKD on VBKD~VBELN = VBAK~VBELN
join T001W on LIPS~WERKS = T001W~WERKS
where VBAK~AUART in ('ZV90','ZV9H','ZV9F')
and VBAK~VSBED = 'L4'
and VBAK~ERDAT >= '20220901'
and LIPS~WERKS not in ('0201','0202')
Thanks in advance
2023 Mar 16 8:27 PM
Thank you for visiting SAP Community to get answers to your questions.
As you're looking to get most out of your community membership, please consider include a profile picture to increase user engagement & additional resources to your reference that can really benefit you:
I hope you find this advice useful, and we're happy to have you as part of SAP Community!
All the best,
Alex
2023 Mar 17 4:01 PM
Hello,
Your question is tagged with "SAP IQ". I assume that you are not using SAP IQ, but SAP HANA database.
If you want to execute the statement in the SQL Editor (transaction DBACOCKPIT, DB02 or ST04), you should replace all "~" with ".". If it is not working you should provide more information and screenshots.
Example:
select distinct LIPS~VBELN AS DELIVERY_NOTE_NUMBER from LIPS
select distinct LIPS.VBELN AS DELIVERY_NOTE_NUMBER from LIPS
Best regards,
Andreas
2023 Mar 20 12:40 PM
Table LIKP is missing in FROM clause.
So, you can
2023 Mar 20 12:46 PM
With a proper label like ABAP Development, you would have gotten an answer faster.