ABAP to FTP connect to non SAP UNIX system

Greetings~
I'm looking for a way (via function modules and/or BAPI) to transfer data in flat files from an SAP UNIX system to a non-SAP UNIX system using an ABAP program. I see FM's FTP_CONNECT and FTP_COMMAND however these seem to only work with UNIX systems running SAP as they require RFC_DESTINATION information. Anybody know which (if any) FM's can be used without the necessity of the target system running SAP/RFC?
Thanks!

Hi Joseph,
Please refer the below program.
REPORT  ZHR_T777A_FEED.
tables: t777a.                        "Building Addresses
Internal Table for  Building table.
data: begin of it_t777a occurs 0,
        build like t777a-build,       "Building
        stext like t777a-stext,       "Object Name
        cname like t777a-cname,       "Address Supplement (c/o)
        ort01 like t777a-ort01,       "City
        pstlz like t777a-pstlz,       "Postal Code
        regio like t777a-regio,       "Region (State, Province, County)
      end of it_t777a.
Internal Table for taking all fields of the above table in one line
separated by ‘|’(pipe).
data: begin of it_text occurs 0,
      text(131),
      end of it_text.
Constants: c_key  type i value 26101957,
           c_dest   type rfcdes-rfcdest value 'SAPFTPA'.
data: g_dhdl type i,      "Handle
      g_dlen type i,      "pass word length
      g_dpwd(30).         "For storing password
Selection Screen Starts
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001.
parameters: p_user(30) default 'XXXXXXX'          obligatory,
            p_pwd(30)  default 'XXXXXXX'          obligatory,
            p_host(64) default 'XXX.XXX.XX.XXX'   obligatory.
SELECTION-SCREEN END OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE TEXT-002.
parameters: p_file like rlgrap-filename default 't777a_feed.txt'.
SELECTION-SCREEN END OF BLOCK blk2.
Password not visible.
at Selection-screen output.
  loop at screen.
    if screen-name = 'P_PWD'.
      screen-invisible = '1'.
      modify screen.
    endif.
  endloop.
g_dpwd  = p_pwd.
Start of selection
start-of-selection.
To fetch the data records from the table T777A.
  select build stext cname ort01 pstlz regio
         from t777a
         into table it_t777a.
Sort the internal table by build.
  if not it_t777a[] is initial.
    sort it_t777a by build.
  endif.
Concatenate all the fields of above internal table records in one line
separated by ‘|’(pipe).
  loop at it_t777a.
    concatenate it_t777a-build it_t777a-stext it_t777a-cname
                it_t777a-ort01 it_t777a-pstlz it_t777a-regio
                into it_text-text separated by '|'.
    append it_text.
    clear it_text.
  endloop.
To get the length of the password.
  g_dlen = strlen( g_dpwd ).
Below Function module is used to Encrypt the Password.
  CALL FUNCTION 'HTTP_SCRAMBLE'
    EXPORTING
      SOURCE      = g_dpwd          "Actual password
      SOURCELEN   = g_dlen
      KEY         = c_key
    IMPORTING
      DESTINATION = g_dpwd.         "Encyrpted Password
*Connects to the FTP Server as specified by user.
  Call function 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      text = 'Connecting to FTP Server'.
Below function module is used to connect the FTP Server.
It Accepts only Encrypted Passwords.
This Function module will provide a handle to perform different
operations on the FTP Server via FTP Commands.
  call function 'FTP_CONNECT'
    EXPORTING
      user            = p_user
      password        = g_dpwd
      host            = p_host
      rfc_destination = c_dest
    IMPORTING
      handle          = g_dhdl
     EXCEPTIONS
        NOT_CONNECTED.
  if sy-subrc ne 0.
    format color col_negative.
    write:/ 'Error in Connection'.
  else.
    write:/ 'FTP Connection is opened '.
  endif.
**Transferring the data from internal table to FTP Server.
  CALL FUNCTION 'FTP_R3_TO_SERVER'
    EXPORTING
      HANDLE         = g_dhdl
      FNAME          = p_file
      CHARACTER_MODE = 'X'
    TABLES
      TEXT           = it_text
    EXCEPTIONS
      TCPIP_ERROR    = 1
      COMMAND_ERROR  = 2
      DATA_ERROR     = 3
      OTHERS         = 4.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
    write:/ 'File has created on FTP Server'.
  ENDIF.
Call function 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      text = 'File has created on FTP Server'.
To Disconnect the FTP Server.
  CALL FUNCTION 'FTP_DISCONNECT'
    EXPORTING
      HANDLE = g_dhdl.
To Disconnect the Destination.
  CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
      destination = c_dest
    EXCEPTIONS
      others      = 1.
Regards,
Kumar Bandanadham.

Similar Messages

  • What is best way to connect a non-sap sys sending  xml idocs to SAP system

    Hi Can some one please guide as to what will be the best approach in connecting a NON SAP system to a SAP system.
    The non sap system should not be connected to access real time data,it does not support RFC,it can send data in IDOC xml format and i think in teaxt files also.Also I dont think there is any EDI subsystem in place.
    There has to be a periodic upload of material data from SAP /stock status/
    then there will be incoming data into SAP for sales order/purchase order etc
    What would be the best way to connect the two systems,IDOCs with partial EDI looks the best way ,but I am confused as to how will the XML IDOC be converted to normal IDOC and viceversa,how to handle the event triggering mechanism.
    If someone has experience in such a scenario ,please help.
    There is a option to update the database of the application through SQL also...

    Hi,
    Check this link.
    Web Services from Function Module
    it might help u.
    Thanks.

  • Non-SAP Source systems for gas and power trading operations

    Hi Experts, I have this client who has no R/3 systems. They have few MS Access databases, Oracle systems annd MS SQL DB. I have seen some of the most commonly used tables in all the databases and doesn't look like there are not even a single InfoObject that is similar to any one in Business Content. Now this makes me feel that I need create everything from scratch. Can anybosy guide me on the best way to go about extracting data from this non-SAP systems. Right from connecting to these systems to extracting data in BI to creating some meaningful reports.
    They do not have the concept of Master data here. All they have is Data in the MS Access databases.I need some assistance from experts here in how do I go about organizing this.

    hi,
    The BW can be connected to Non-SAP data using DB or UD connect.
    The data in Non-SAP source system is staged in form of tables.
    You can extract the data using Data Source based on DB or UD connection.you can define new info objects and data flow which extracts the data. In DS description you can mention the Non-SAP source system tables from where you want to extract the data, after that u can mention the fields to be extracted in BW.
    regards,
    Arvind.

  • Lots of tables in the non-SAP source systems

    Hi All,
    Earlier I asked a question on SDN about having about 50 tables in non-SAP source systems like SQL, Oracle, etc. According to the functional/business folks here, I'm supposed to be extracting only 1 or 2 fields from many tables. So I got a reply from SDN that I should recommened creating Views and client also agreed. Now I do not see any official documentation from SAP that that says that I should create Views in the source ysystem wherever it is possible. Any help in getting this information is very helpful.

    Hi,
    1. authorization: normally the database admin create you a new user. It's easier to get read authoriziation for your own views.
    2. a problem is the naming convension of tables and fields - the BW/database connector supported not all. create the fields
    - in upper case and
    - a length of ... (16 characteristcis?)
    - without special signs.
    => looking in service.sap.com/notes for "DB connect"
    3. changing of data source: when you need a second table for the data extraction, then you have to create a new datasource.
    => create a view directly (its the same to multiprovider. Don't work with the object directly - create a view).
    Sven

  • FICA -IDOC for posting the billing data from NON-SAP ISU system

    Hi,
    Kindly note we are implementing NON-SAP ISU with SAP FICA for the finance implementation. In this context, we ahve identified BAPI for BP and CA. We have decided to go for transaction posting through the transaction FPE1. For this, we are looking for the transaction data IDOC which is CTRACDOCUMENT_ACCOUNT (FICA Posting)  in the WEDI. But it seems that it is not yet released. Can anybody help me out for this to either identify the equivalent IDOC or other method to post the data from Banner system (NON-SAP ISU ) system. We are presently not implmenting billing system in SAP ISU, but only FI system

    Hi,
    you can create the same...
    but normal practice what we do is create swc for each system so that it is easy to maintain and easy to extend in the future..
    or else follow some conventions if you are just starting the things..
    HTH
    Rajesh

  • Master Data cleansing and transformation from non-SAP source systems

    Hi all,
    Our client (Media)wants to cleanse and transform his master data from non-SAP source system to be uploaded into BW (no R/3 yet). If anybody has a document regarding this topic that i could use, i will appreciate if u sent it to me.
    thanks.

    Hi,
    https://websmp203.sap-ag.de/~sapidb/011000358700001965262003
    https://websmp203.sap-ag.de/~sapidb/011000358700006591612001
    https://websmp203.sap-ag.de/~sapidb/011000358700001971392004
    https://websmp203.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000471477&_OBJECT=011000358700008927932002E
    /manfred

  • SSO with Logon Ticket to non-SAP Unix based application

    Hi all,
    Anyone has implemented SSO with Logon Ticket to a Unix box ?
    We need to achieve Single Sign On between our EP5.0 SP5 Portal and a third-party web application with a front-end on a Unix AIX machine with Apache.
    We achieved SSO with non-SAP applications with Logon Tickets, but one was to an IIS system in another domain (we therefore used the standard Web Filter for IIS and declared it in usermanagement for cross-domain support) and another one running on Windows platform (we used the C libraries provided in the "Logon Ticket Toolkit": NT or Linux only).
    From what we understand and found on the web sites, we cannot reuse any standard web filter (none for Unix, am I correct ???) and want to implement custom code using SAP libraries, if possible using Java
    -> Are there any Java libraries that are available to both:
    . verify the logon ticket with the deployed Portal public key
    . decrypt/extract the authenticated username from this ticket ??
    I've seen a mention of Java libraries, and Unix, in a SAP EP 6.0 document but I'm not sure where to find them...
    Is the SAP Logon Ticket issued the same way in EP 5.0 and EP 6.0 ?
    I managed to find something called SAPSSOEXT, for AIX, which contains some partial library and a sample, but it is dated 2000 !! Anyone has more information about this ?
    Any hint is very much appreciated.
    Thanks a lot
    Olivier

    Check these links for reference regarding AIX and Apache using X.509 certificates:
    http://publib16.boulder.ibm.com/pseries/en_US/aixbman/security/cas_pki.htm
    And just using cookies -
    http://forums.devshed.com/archive/t-105611 (perl based)
    You can also use mod_ssl built into your Apache to facilitate both certificate based authentication as well as encryption.
    The mod_ssl route is most secure (because of the encryption), the IBM link is comprehensive but requires extra infrastructure (LDAP).
    Nick
    Nick

  • Activating WebService on R/3 to connect a non-SAP system (XML)

    Hi Experts,
    Apologize if my thread is not on the right category. I'm not sure where to put this.
    Is there any steps on how to activate webService to connect to a non-SAP system without using middleware like XI/PI. I'm trying to connect to a non-SAP system that sends an xml format message and then directly connect to an R/3 system. Is this possible? thanks!

    Hi,
    Check this link.
    Web Services from Function Module
    it might help u.
    Thanks.

  • RFC Adapter to connect to Non SAP System

    Hi,
    I have a scenario to connect to a non SAP system using RFC adapter. I am not used to the same. I need to know whether this is possible and what are the steps to be done.
    Thanks and regards
    Siji

    Hi,
    These links should help.
    Non-SAP application connecting to PI via Sender RFC Adapter
    Error by setup RFC Interface with non SAP system
    SAP PI to Third Party system through RFC Connectivity ??
    Regards,
    Jannus Botha

  • BW connecting to NON SAP OR ETL Tools

    Hi ,
    I am new to SAP BI . Can any one tell me ,how we can get data from Non-SAP databases  like Oracle or any ETL Databases to BW. Any URL links  or documents provided would be appreciated .
    Points will be given to apprioprate answers. Thanks,
    Andrew-

    check this out:
    http://help.sap.com/saphelp_bw33/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/bcdce1dcaf56a3e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm

  • Monitoring a non-SAP satellite system in Solution Manager

    Hi Folks,
    I have two quick questions.
    1.) What is the proper procedure/tool for monitoring a non-NW system in Solution Manager? Should I be able to use sapccmsr and saposcol on these systems?
    2.)  What is the proper way to connect a non-NW system to the SLD? Should I be able to use saposol and sldreg for these?
    Background:
    - My Solution Manager system is a NW70 EHP1
    - Solution Manager Diagnostics is installed and monitoring my ABAP and Java systems
    - I have my CCMS agents registered back to my CEN for the ABAP and Java systems
    Satellite systems:
    - Multiple Wintel servers (both IA32 and x64) that are running;
      o standalone SQL server databases
      o BOE/BOBJ
      o BPC for Microsoft
    Section 4.8 of the Monitoring Setup Guide (CEN SAP Netweaver 7.0 SPS18) states that I should be able to monitor a standalone database.
    My confusion isu2026 in the absence of an SAP filesystem (kernel) and the standard SAP environment variables that get set during an install, how do I register the agents? The executables do not want to launch.
    Thank you,
    Bill

    Dear William,
    Monitoring of NON-SAP systems is not actually done on the solution manager system itself. The solution manager system gets its feed of alert information from the satellite, specifically CCMS. For SAP systems, alerts from CCMS are set up and activated by default. For Third-Party systems you have to be ablke to set up the interface to feed monitoring information from your non-SAP software to SAP's CCMS infrastructure.
    You can get more information on CCMS agents via the website at http://service.sap.com/monitoring.
    Go to "system Monitoring and Alert Management" > "Monitoring in Detail".
    I hope this information is helpful.
    Regards,
    Paul

  • Connect of 2 SAP BW systems to  one SAP Enterprise Portal

    Hi!
    I have 2 SAP BW systems that should be integrated into SAP Enterprise Portal.
    I currently have already one SAP system entry "SAP_BW" within SAP EP.
    Questions
    Is it possible to define second entry for second SAP BW system in order to use 2 SAP BW systems with one SAP EP in parallel?
    Where can I find appropriate documentation?
    Thank you very much!
    regards

    Hi,
    We have a pilot portal with BW DEV, QAS and PRD connected to it.  So it is possible.
    It may be more appropriate to post this in the portal forum to get expert advice.
    Mathew.

  • 2 BI systems are connected to one SAP ECC-system

    HI,
    I have the following situation: we have one SAP ECC-system, and there is already one BI-system for one company code connected. I would like to connect now a second BI-system for another company code. Both BI-system uses more or less the same infocubes in controlling. I would like to copy all data sources in the ECC, so that I have every datasource twice, one for the first BI-system and 2 for the second BI-system.
    I thougth I could use transacioin code ROS2 for this. I created the datasource Z_CO_OM_CCA_1 and would like to use the function module BWOM_RS_GET_CTRCST and the extract structure ICCTRCST like the standard datasource 0CO_OM_CCA_1. During saving I get the error message TABLES-parameter E_T_DATA is missing - what does this mean?
    Is there another solution for my problem?
    I appreciate any kind of help!
    Thank's a lot
    Christine

    Christine,
    I would recommend to have a, lets say, maximum number of selection fields available and nothing BW-system specific. So as I mentioned before, no need to have the same datasources twice. In case of some, e.g. the logistics datasources, this might also be a enhancement/development that might be totally out of your budget. (Think about the setup tables, the processes to fill them....)
    regards
    Siggi

  • Doing proper NAT to FTP connections on non-standard port

    Router 1712, IOS 12.3
    There is an article from Cisco, "Using Non-Standard FTP Port Numbers with NAT".
    http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094e76.shtml
    It explains how to enable NATting router to perform proper translation of NAT-sensitive protocols, in this case FTP.
    The article assumes that the FTP server in question is on the inside interface of the router.
    The configuration proposed by the article is as follows:
    interface Ethernet0
    ip address 10.1.1.2 255.255.255.0
    ip nat inside
    interface Serial0
    ip address 192.168.10.1 255.255.255.252
    ip nat outside
    ip nat service list 10 ftp tcp port 2021
    ip nat inside source static 10.1.1.1 20.20.20.1
    access-list 10 permit 10.1.1.1
    In my case, the FTP server in question is on the outside interface. The router is performing source NAT for outbound connections. An example of my config is below:
    interface Ethernet0
    ip address 12.34.56.1 255.255.255.0
    ip nat outside
    interface Vlan324
    ip address 10.1.1.2 255.255.255.0
    ip nat inside
    ip nat service list 10 ftp tcp port 2021
    ip nat inside source static 10.1.1.100 12.34.56.100
    access-list 10 permit 12.34.56.200
    With this configuration, Layer 3 NAT is working. I'm able to establish an FTP control channel and issue FTP commands. However, I think that the IP addresses inside FTP control channel are not translated properly (to 12.34.56.100). Therefore, the FTP data channel is not working.
    I tried to enable the following debug, however didn't see any entries related to FTP control channel translation:
    debug ip nat
    debug ip nat detailed
    debug ip snat
    debug ip snat detailed
    debug ip ftp
    debug ftpserver
    My question is:
    Is the "ip nat service list <acl> ftp tcp <port>" command supposed to work when the FTP server in question is on the outside interface of the translating router ?

    Hi,
    I see that this question was asked quite some time ago but I have come across the same issue, i.e when the server is on the outside interface the ip in the "PORT" command from the client is not translated.
    Did you ever get a fix for it?
    Thanks

  • SSL FTP Transfer to non SAP system

    Hi all. My company is sending an eForex interface to a bank that does not use SAP but requires our message to be sent using the FTP protocol we have but with SSL protection. There was an external tool doing the SSL encryption on our side but we want to do it directly from PI though i doubt the bank has any PCK etc on their side.
    I see the option use this in the message interface (FTP with SSL for data etc.) but i would like to know if theres more technical configuration to be done to do the connection with the bank.
    Any help would be appreciated.
    Regards,
    Darren.

    Hi Stefan thanks for noting that. This is not with Citi btw, a bank in SA. But let me get this correct. You're saying if we do the FTP/S in our interface and the bank does not use SAP or a PCK at least, it is possible to to do the transaction if we technically enable SSL on our PI system here and request that the bank allow for reverse DNS lookups to find us as well?
    Just those steps on our side and them enabling the lookup means we dont need them to implement any PCK (but perhaps continue with their existing method of dealing with SSL on their side) and request that 1 technical change of allowing reverse lookups for us.
    Thank you again for your response.
    Regards,
    Darren.

Maybe you are looking for

  • Help in group by query

    Hi, Please help me in the following query. SELECT a.bcast_id , a.bcast_file_nm , a.clickthru_url_cd , a.list_id , a.prs_id , a.resp_cd , a.run_seq , COUNT(a.resp_cd) , c.src_grp_cd , b.site_cd FROM gca_cbx_response_test a , gca_program_run_hist b , c

  • P45D3 Platinum boot error

    Can't boot my computer. MemoryDetectionTest - error message. Components: Corsair Powersupply 550W Black, ATX/EPS, 120mm Fan, 4xSATA, SLI, WxHxL Corsair TWIN3X 1333MHz DDR3, 4GB, DHX, Kit w/two 2GB XMS3 modules, CL9-9-9-24 HIS Radeon HD 4850 512MB GDD

  • [ADF-11.1.2] Link on adf tabel does not select row before navigation

    Hi, I have a List of Contries displayed in table with a view button on panel collection toolbar. User Select the country row, which makes changes current row of country View Iterator binding on page, and click on view button, which navigates to detai

  • My MacBook Pro is all of sudden having issues with pop up ads.  I am running OSX 10.5.8.  Any suggestions for fixing the problem?

    All of a sudden I am getting TONS of pop up ads.  I am on a Macbook Pro running OSX 10.5.8.  Anyone have any suggestions for fixing the problem?

  • Bug in scheduling Jobs

    I have 5 Protectiongroups which have shortterm and longterm Protection. Longterm Protection is going to tape every 2 weeks. after initial Setup of my protectiongroups, every 2 weeks, all 5 Protectiongroups will save the Backups to Tape, thats fine. A