cancel
Showing results for 
Search instead for 
Did you mean: 

A very strange SQL requirement

ekekakos
Participant
0 Kudos
949

Hello, we have the following 2 tables: ZEK_SBOOK & ZEK_SCARR with the following data:

CARRIDFLDATENAMESEATS
AA30.05.2024ELIAS5
AB30.05.2024MARIA2
AA31.05.2024JOHN3

 

CARRIDAIR_NAME
AAAIRLINE1
ABAIRLINE2
AFAIRLINE3
BEAIRLINE4

What the customer is asking is to have the following ALV.

CARRIDFLDATENAME
AA30.05.2024ELIAS
AB30.05.2024MARIA
AF30.05.2024 
BE30.05.2024 
AA31.05.2024JOHN
AB31.05.2024 
AF31.05.2024 
BE31.05.2024 

In a few words they want to have all airlines for each date with the data of the table ZEK_SBOOK having or not.

Is it possible to do it in a query?

Thanks

Elias

 

View Entire Topic
flachlaender
Explorer
0 Kudos

Are you sure your requirement is correct?

There is no AF or BE flight on 30.05.2024, so what is the logic a line for these show up in the ALV? Just because another airline has a flight on that day?

 

 

ekekakos
Participant
0 Kudos
Imagine that these airlines are werks and the customer wants to know which have movements and which haven't. And this must be per day. This customer has this in his old system and he want it in SAP. I told you strange requirement.
flachlaender
Explorer

According to the data in ZEK_SBOOK there is no movement of AR or BE on 30.05.24.

And: No, there is no SQL statement which invents data which is not in the table.

For hallucinating data I am afraid you have to use a LLM.