Skip to Content
0
Former Member
Jul 09, 2012 at 07:57 AM

Please tell me why use the "~" in the select steatment??

25 Views

Hi, all

I have a poor question about abap report programing.

Please tell me why use the "~" in the select steatment??

AND which case we should use the "~" in the select steatment??

>> AND countryto = dv_flights~countryfr.


report name:Y_33_BC405_SSCS_1AE01

SELECT * FROM dv_flights INTO wa_flight
WHERE carrid IN so_car
AND connid IN so_con
AND fldate IN so_fdt
AND countryto = dv_flights~countryfr.

======================================

*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Event INITIALIZATION
*&---------------------------------------------------------------------*
INITIALIZATION.
* Initialize select-options for CARRID" OPTIONAL
MOVE: 'AA' TO so_car-low,
'QF' TO so_car-high,
'BT' TO so_car-option,
'I' TO so_car-sign.
APPEND so_car.
CLEAR so_car.

MOVE: 'AZ' TO so_car-low,
'EQ' TO so_car-option,
'E' TO so_car-sign.
APPEND so_car.


*&---------------------------------------------------------------------*
*& Event START-OF-SELECTION
*&---------------------------------------------------------------------*
START-OF-SELECTION.

* Checking the output parameters
CASE mark.
WHEN pa_all.
* Radiobutton ALL is marked
SELECT * FROM dv_flights INTO wa_flight
WHERE carrid IN so_car
AND connid IN so_con
AND fldate IN so_fdt.

WRITE: / wa_flight-carrid,
wa_flight-connid,
wa_flight-fldate,
wa_flight-countryfr,
wa_flight-cityfrom,
wa_flight-airpfrom,
wa_flight-countryto,
wa_flight-cityto,
wa_flight-airpto,
wa_flight-seatsmax,
wa_flight-seatsocc.
ENDSELECT.

WHEN pa_nat.
* Radiobutton NATIONAL is marked
SELECT * FROM dv_flights INTO wa_flight
WHERE carrid IN so_car
AND connid IN so_con
AND fldate IN so_fdt
AND countryto = dv_flights~countryfr.

WRITE: / wa_flight-carrid,
wa_flight-connid,
wa_flight-fldate,
wa_flight-countryfr,
wa_flight-cityfrom,
wa_flight-airpfrom,
wa_flight-countryto,
wa_flight-cityto,
wa_flight-airpto,
wa_flight-seatsmax,
wa_flight-seatsocc.
ENDSELECT.


WHEN pa_int.
* Radiobutton INTERNATIONAL is marked
SELECT * FROM dv_flights INTO wa_flight
WHERE carrid IN so_car
AND connid IN so_con
AND fldate IN so_fdt
AND countryto <> dv_flights~countryfr.
* AND countryto <> countryfr.

WRITE: / wa_flight-carrid,
wa_flight-connid,
wa_flight-fldate,
wa_flight-countryfr,
wa_flight-cityfrom,
wa_flight-airpfrom,
wa_flight-countryto,
wa_flight-cityto,
wa_flight-airpto,
wa_flight-seatsmax,
wa_flight-seatsocc.
ENDSELECT.


ENDCASE.

Thanks a lot in advance

and Best regards.

Akihiro.

Moderator message: please read ABAP documentation before posting.



Message was edited by: Thomas Zloch