Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

regarding to perform in select query

could any tell the select query in this piece of code would affect the performance of the programe

DATA: BEGIN OF OUTREC,

BANKS LIKE BNKA-BANKS,

BANKL LIKE BNKA-BANKL,

BANKA LIKE BNKA-BANKA,

PROVZ LIKE BNKA-PROVZ, "Region (State, Province, County)

BRNCH LIKE BNKA-BRNCH,

STRAS LIKE BNKA-STRAS,

ORT01 LIKE BNKA-ORT01,

SWIFT LIKE BNKA-SWIFT,

END OF OUTREC.

OPEN DATASET P_OUTPUT FOR OUTPUT IN TEXT MODE.

IF SY-SUBRC NE 0. EXIT. ENDIF.

SELECT * FROM BNKA

WHERE BANKS EQ P_BANKS

AND LOEVM NE 'X'

AND XPGRO NE 'X'

ORDER BY BANKS BANKL.

PERFORM TRANSFER_DATA.

ENDSELECT.

CLOSE DATASET P_OUTPUT.

&----


*& Transfer the data to the output file

&----


FORM TRANSFER_DATA.

OUTREC-BANKS = BNKA-BANKS.

OUTREC-BANKL = BNKA-BANKL.

OUTREC-BANKA = BNKA-BANKA.

OUTREC-PROVZ = BNKA-PROVZ.

OUTREC-BRNCH = BNKA-BRNCH.

OUTREC-STRAS = BNKA-STRAS.

OUTREC-ORT01 = BNKA-ORT01.

OUTREC-SWIFT = BNKA-SWIFT.

TRANSFER OUTREC TO P_OUTPUT.

ENDFORM. " READ_IN_DATA

Former Member
Not what you were looking for? View more on this topic or Ask a question