Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

using a perform in open dataset

Former Member
0 Kudos

hi friends.

The following code is showing as an obsolete statament. It is used native SQL. So i replaced that using open SQL. but in native sql thery r calling one form . My doubt is where i call the perform statment in open sql.

EXEC SQL PERFORMING MAIN_LINE.

SELECT * INTO :WA_CHKDAT FROM R3P01QGPL/CHECKDATA

EXEC SQL.

data lv_file like rlgrp-filename.

lv_file = 'R3P01QGPL/CHECKDATA'

open dataset lv_file for input in text mode encoding default.

if sy-subrc eq 0.

do.

read dataset lv_file into wa_chkdat.

if sy-subrc ne 0.

exit.

else.

append wa_chkdat to i_chkdat.

perform main_line.

endif.

enddo.

endif.

close dataset lv_file.

or i used perform after close dataset using loop statment

loop at i_chkdat into ewa_chkdat.

perform main_line.

endloop.

Please suugest

regards

3 REPLIES 3

Former Member
0 Kudos

Hi Sapna,

I don't see why the perform would not work. Have you tested the first option and what was the result.

Regards

Gareth

Former Member
0 Kudos

Hi Gareth,

It is showing as an obsolete statment in ECC 6.0 as Exce SQL performing is not used.

Former Member
0 Kudos

Hi,

Try,

data lv_file like rlgrp-filename.

lv_file = 'R3P01QGPL/CHECKDATA'.

EXEC SQL PERFORMING MAIN_LINE.

SELECT * INTO :WA_CHKDAT FROM <b>:lv_file</b>

EXEC SQL.

Regards

Subramanian