Skip to Content
avatar image
Former Member

Write a line to a file already existing in the presention server.

Hi all,

I need help in insert a line to a file already existing in the presention server.

For example if i have 20 lines in the file i have to insert a line at the postion "14" and after done with inserting i have overwrite the file (resave) with the same file name and in the same path.

the file types is .Vbs (vb script file )

How can i acheive this ?

Please do the need full....

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 12, 2011 at 07:03 PM

    Hi

    I think you got 2 options:

    1. BPM.

    2. Call ABAP proxy and deal with the appending data into existing file with ABAP.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 12, 2011 at 08:09 PM

    Hi ,

    Are you sure you want to write the records to Presentation server?

    If it is just for your practice , then i can understand, but this cannot be a real business requirement.

    Best Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 13, 2011 at 12:25 AM

    Ideally the file should be writtern on the application server rather than the presentation server.

    One option you can explore is a post processing operating system command ( which a BAT or a Shell script based on your OS)

    You can do the following

    1. Have the updates written to the file on the application server.

    2. Have an post operating system command to adjust the line postions on the file and rename.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sandeep,

      Could you please kindly provide the following information

      1. what is the scenario? Does this involvs SAP-PI?

      2. If this is SAP-PI server, What is the version of PI you are working on?

      3. what is the operating system of the server where the file is residing?

      If you are using SAP-PI and the file is getting produced as part of some scenario then you need a script to do the changes after it is getting produced or alternatively a java mapping code can fix this before file is formed. So if you would provide answers to above queries forum members will be able to help you in this regard.

      Regards

      Anupam