How to call a shell script from ABAP program?
This question is to SANDEEP KULKARNI. If he is still with this website then please respond to this question, if not, requesting other users to provide real time solution. Also, requesting this forum owner to pass the SANDEEP KULKARNI's email ID/contact number.

Question is:

I have a shell script written for moving the flat file from FTP server(Windows Operating System) to SAP Application server (Linux Operating System). I donot have a access to execute that script at linux level but i can write a ABAP program to execute the same so that the script will move the flat file from remote server(FTP) to local server (App server). I requesting, could you plz provide me the ABAP code to call the script? Also i have a no.of questions to ask. i will come one by one.

Why only asking sandeep means. He posted a newsletter that how to move a file from one folder to another folder. i am expecting the similar answers. also, i beleive somebody also could do. hope its not hurting anybody. sorry. 



Software/Hardware used:
Linux, ABAP
ASKED: June 21, 2011  8:44 PM
UPDATED: August 30, 2011  7:03 PM

Answer Wiki:
<b>OPEN DATASET l_oldfile FOR INPUT IN TEXT MODE ENCODING DEFAULT. IF sy-subrc EQ . OPEN DATASET l_newfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. IF sy-subrc EQ 0. DO. READ DATASET l_oldfile INTO l_newline. "Variable l_newline is for holding the read line from l_oldfile IF sy-subrc EQ 0. TRANSFER l_newline TO l_newfile. ELSE. EXIT. ENDIF. ENDDO. WRITE 'Data transferred successfully'. ELSE. WRITE 'Failure in transferring data'. ENDIF. CLOSE DATASET l_oldfile. CLOSE DATASET l_newfile. DELETE DATASET l_oldfile.</b>
Last Wiki Answer Submitted:  June 30, 2011  8:00 pm  by  400MYEYE   230 pts.
All Answer Wiki Contributors:  400MYEYE   230 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I think you have to realise that if you do not have personal contact information, then we can not, and should not pass it on without permission.

Your question will be answered by anyone willing to respond.

 4,625 pts.

 

provided a personal information. Thanks


 

For privacy purposes, we do not give out user email/contact information to other users. If you wish to ask a specific member a question, you can email me at enichols [at] techtarget [dot] com and I will be happy to pass the question along to the member (please provide the member username).

Thanks,
Em

 3,235 pts.

 

se38 rsbdcos0 2>1 <ENTER> Path/program/script

 155 pts.