‎2009 Feb 12 10:57 AM
Hi All.
I have created file in application by using OPEN DATA SET, I need to delete from application server after some validation , how to delete?
Please guide me.
Thanks in Advance.
‎2009 Feb 12 11:00 AM
hi,
DELETE DATASET file.
Check for sy-subrc values for the proper execution of statement
Thanks
Sharath
‎2009 Feb 12 11:00 AM
Hello,
After the validations , use DELETE DATASET statement.
It will delete the file specified in application server folder.
BR,
Suhas
‎2009 Feb 12 11:00 AM
hi,
DELETE DATASET file.
Check for sy-subrc values for the proper execution of statement
Thanks
Sharath
‎2009 Feb 12 11:01 AM
Hi ,
Code -
Delete Dataset w_file.Regards
Pinaki
Edited by: Pinaki Mukherjee on Feb 12, 2009 12:25 PM
‎2009 Feb 12 11:01 AM
hi,
In the above post 'file' is expected to be a character-type data object that contains the platform-specific name of the file.
Thanks
Sharath
‎2009 Feb 12 11:01 AM
hi,
Delete dataset <datasetname>this deletes the dataset in application server
regards
sarvesh
‎2009 Feb 12 11:02 AM
‎2009 Feb 12 11:02 AM
‎2009 Feb 12 11:03 AM
Hi,
DATA FNAME(60) VALUE 'file'.
OPEN DATASET FNAME FOR OUTPUT.
OPEN DATASET FNAME FOR INPUT.
IF SY-SUBRC = 0.
WRITE / 'File found'.
ELSE.
WRITE / 'File not found'.
ENDIF.
DELETE DATASET FNAME.
OPEN DATASET FNAME FOR INPUT.
IF SY-SUBRC = 0.
WRITE / 'File found'.
ELSE.
WRITE / 'File not found'.
ENDIF.
The output appears as follows:
File found
File not found
Use cane Also Use Function Modue: EPS_DELETE_FILE
Regards,
Gurpreet
‎2009 Feb 12 11:20 AM