Application Development and Automation 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: 
Read only

How to delete the data set

Former Member
0 Likes
646

HI all,

I am trying to delete the dataset . but the sy-subrc is showing as 4.

Here is the code.

CONCATENATE w_f_i wa_data-uid '.txt' INTO w_f_in.

OPEN DATASET w_f_i FOR INPUT IN TEXT MODE ENCODING DEFAULT.

CLOSE DATASET w_f_i.

IF SY-SUBRC = 0.

DELETE DATASET w_f_i.

ENDIF.

ENDLOOP.

in the above code w_f_i contains the file path like :\CMR_Interface\BP\I\48058.txt.

Can anybody provide me the suggestion.

thanks in advance

KP

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
624

hi KP,

the syntax is correct. But check whether the path from which you are trying to delete the file is correct or not .

Regards,

Santosh

HI all,

I am trying to delete the dataset . but the sy-subrc is showing as 4.

Here is the code.

CONCATENATE w_f_i wa_data-uid '.txt' INTO w_f_in.

OPEN DATASET w_f_i FOR INPUT IN TEXT MODE ENCODING DEFAULT.

CLOSE DATASET w_f_i.

IF SY-SUBRC = 0.

DELETE DATASET w_f_i.

ENDIF.

ENDLOOP.

in the above code w_f_i contains the file path like :\CMR_Interface\BP\I\48058.txt.

Can anybody provide me the suggestion.

thanks in advance

KP

2 REPLIES 2
Read only

Former Member
0 Likes
624

CONCATENATE w_f_i wa_data-uid '.txt' INTO w_f_in.

OPEN DATASET w_f_i FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF SY-SUBRC = 0.

DELETE DATASET w_f_i.

ENDIF.

CLOSE DATASET w_f_i.

see the above code

Read only

Former Member
0 Likes
625

hi KP,

the syntax is correct. But check whether the path from which you are trying to delete the file is correct or not .

Regards,

Santosh