cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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....

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

xinjiang_li
Active Participant
0 Kudos

Hi,

If it is in the presentation server, then I think no need to solve your case by using PI. Since it will be run manually, you can write a simple ABAP program or JAVA program to make it work.

Former Member
0 Kudos

Hi all,

Thank you for reply .

can you any body give me some sample code...

Regards

Sandeep

anupam_ghosh2
Active Contributor
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.