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: 

delete

Former Member
0 Kudos

In BDC

how to delete a particular record in a file in application server.

and also i want to find the file in application server..

it is fbb1 transaction.

3 REPLIES 3

Former Member
0 Kudos

hi Priya,

WELCOME TO SDN..

go to <b>AL11</b> Transaction and check for the record there i.,e, the path where u have passed the file on application server...

Reg the deletion of a record from a file in application layer is possible only by uploading the file data in to internal table delete the record and then resend to application server

i.e,

1. Read file with OPEN DATASET / READ DATASET / CLOSE DATASET

2. Delete the file that you want to delete

3. Transfer the file with the deleted record OPEN DATASET / TRANSFER DATASET / CLOSE DATASET

Regards,

Santosh

Note: Reward Points if helpful

Former Member
0 Kudos

Priya,

1. You will read the file into a internal table

OPEN DATASET / READ DATASET / CLOSE DATASET

2. Delete the row that you don't want in the internal table.

3. Now write the data back to the file

OPEN DATASET / TRANSFER DATASET / CLOSE DATASET

However, if this is a one time activity, just open the file and do the edit.

Regards,

Ravi

Note : Please mark the helpful answers

former_member181962
Active Contributor
0 Kudos

Hi Priya,

For deletein a particular record in a file on appl server,

1) Read the file into an internal table

open dataset file for input in text mode.

DO.

READ DATASET file INTO itab.

IF sy-subrc = 0.

append itab.

ELSE.

EXIT.

ENDIF.

ENDDO.

CLOSE DATASET file.

Delete the record in the itab.

delete table itab where <condition>.

again open the file in output mode and rewrite the file.

open dataset file for output in text mode.

loop at itab.

transfer itab to file.

ENDLOOP.

CLOSE DATASET file.

Regards,

Ravi