Skip to Content

How to delete the record in the file present in the application server?

Hi,

I have two questions.

i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?

ii) How can I lock the users whiel one user is accessing the file on the application server?

Thanks in advance.

Suvan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2005 at 11:28 AM

    try to study the material which i have given its mattter 30 minutes.I hope it will help you

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2005 at 02:24 PM

    Whay not convert the file to a table? Then you can load and manipulate any record you want. You can also use standard SAP locking functionality.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2005 at 11:03 AM

    hi,

    There is no statement to delete records from an application file. Check the below logic to solve your problem.

    (1) Assume FILE1 contains the actual data.

    (2) Copy the contents of FILE1 to FILE2.

    (3) Delete FILE1 from the application server ( optional)

    (4) Read the records from FILE2 except those you want to delete

    (5) Write these records into FILE1.

    When the file is already opened, SAP triggers an exception of the type CX_SY_FILE_OPEN.

    Best Regards,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Vijay,

      Thanks for your suggestion. I have a solution of downloading the entire data into internal table and again writing the file with filtered data. But why I am asking is if the contents of the file is very big, then performance will be degraded. Any way thanks for your suggestion.

      Do you have any idea of locking the file as in presentation server(if one user opens a file others cant modify the same).

      Thanks,

      Suvan

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2005 at 11:04 AM

    http://cma.zdnet.com/book/abap/ch03/ch03.htm

    in this book he has explained clearly about your problem.i didn't remember. so sorry for not explaining to u .with in day 7 u will get the topic which u have stated above how to block the buffer etc....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.