Shared Top Border

Enterprise Resource
Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM ABAP Tips and Tricks Database

THE ultimate
ERP website

 

Forums | Vote for us |

Google    Other Search Options

Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Related Items

Home arrow Sample Code arrow ABAP Reports arrow Transfer file from Unix to NT
Transfer file from Unix to NT PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Anon.   
Saturday, 24 February 2007
This program transfer a file from Unix /usr/sap/custom /tmp/filename.txt to NT Box \\ntsapftp\ftpin where you can copy and works with this in windows. REPORT ZSYFTP00  LINE-SIZE 132.
PARAMETERS : FILE(40) LOWER CASE OBLIGATORY
                      DEFAULT '/usr/sap/custom/tmp/filename.txt'.

DATA : C1(80) VALUE '/usr/sap/custom/bin/sapxfer'.

DATA : BEGIN OF TAB OCCURS 5,
         LINE(132),
       END OF TAB.

*- check batch
IF SY-BATCH <> SPACE.
  MESSAGE A398(00) WITH 'No batch running allowed'.
ENDIF.

*- generate UNIX command
WRITE FILE TO C1+30(40).
MESSAGE S398(00) WITH 'Processing ...'.
CALL 'SYSTEM' ID 'COMMAND' FIELD C1
              ID 'TAB'     FIELD TAB-*SYS*.
IF SY-SUBRC <> 0.
  MESSAGE I398(00) WITH 'FTP Error'.
ELSE.
  READ TABLE TAB INDEX 1.
  IF SY-SUBRC <> 0.
    MESSAGE I398(00) WITH 'FTP Error'.
  ELSE.
    MESSAGE I398(00) WITH FILE
                     'Transfered into NT Box \\ntsapftp\ftpin'.
  ENDIF.
ENDIF.

Related Items:

 
< Prev   Next >

Google Search

Google Ads

Shared Bottom Border

Contact Us | Polls | Add URL | Contribute | Privacy | Terms | Feedback

Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
GenieHoldings.COM, Inc. | Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks | SAP Solutions Database

EDIGenie | Searching Survivor