Fetching the records of table using select options in the selection screen
REPORT ZFLIGHT.
TABLES: SPFLI.
SELECT-OPTIONS: FLIGHTS FOR SPFLI-CARRID
NO-EXTENSION
NO INTERVALS.
TYPES: BEGIN OF ST,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
COUNTRYFR TYPE SPFLI-COUNTRYFR,
CITYFROM TYPE SPFLI-CITYFROM,
END OF ST.
DATA: WA TYPE ST.
DATA: ITAB LIKE STANDARD TABLE OF WA.
SELECT CARRID CONNID COUNTRYFR CITYFROM FROM SPFLI
INTO CORRESPONDING FIELDS OF WA WHERE CARRID IN FLIGHTS .
APPEND WA TO ITAB.
ENDSELECT.
LOOP AT ITAB INTO WA.
WRITE: / WA-CARRID,
WA-CONNID,
WA-COUNTRYFR,
WA-CITYFROM.
ENDLOOP.
TABLES: SPFLI.
SELECT-OPTIONS: FLIGHTS FOR SPFLI-CARRID
NO-EXTENSION
NO INTERVALS.
TYPES: BEGIN OF ST,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
COUNTRYFR TYPE SPFLI-COUNTRYFR,
CITYFROM TYPE SPFLI-CITYFROM,
END OF ST.
DATA: WA TYPE ST.
DATA: ITAB LIKE STANDARD TABLE OF WA.
SELECT CARRID CONNID COUNTRYFR CITYFROM FROM SPFLI
INTO CORRESPONDING FIELDS OF WA WHERE CARRID IN FLIGHTS .
APPEND WA TO ITAB.
ENDSELECT.
LOOP AT ITAB INTO WA.
WRITE: / WA-CARRID,
WA-CONNID,
WA-COUNTRYFR,
WA-CITYFROM.
ENDLOOP.
Intelligent SAP ABAP development with ChatGPT is transforming the way developers work within the SAP ecosystem. This comprehensive guide explores the multifaceted role of ChatGPT in SAP ABAP development and provides insights into how this AI-driven tool can revolutionize the development process.
ReplyDelete