Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from R. N. Wilhite on Apr 19 at 8:13 AM It is better not to leave clear text passwords laying around. Even in your code. Neal
| | | ---------------Original Message--------------- From: Avadhesh Chandra Sent: Friday, April 19, 2013 6:30 AM Subject: Secure FTP from ABAP *CALL FUNCTION 'HTTP_SCRAMBLE' * EXPORTING * SOURCE = 'P@ssw0rd@123' * sourcelen = 12 * key = 26101957 * IMPORTING * destination = pwd. * * CALL FUNCTION 'FTP_CONNECT' * EXPORTING * user = 'RND-BANG' * password = pwd * host = '192.168.1.30' * rfc_destination = 'SAPFTPA' * IMPORTING * handle = hdl * EXCEPTIONS * not_connected = 1 * OTHERS = 2. * IF sy-subrc <> 0. * MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno * WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. * ENDIF. * * * CALL FUNCTION 'FTP_COMMAND' * EXPORTING * handle = hdl * command = 'cd RND-BANG' * TABLES * data = ftp_data * 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. * ENDIF. * * CALL FUNCTION 'FTP_COMMAND' * EXPORTING * handle = hdl * command = 'cd Leads' * TABLES * data = ftp_data * 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. * ENDIF. * * CALL FUNCTION 'FTP_COMMAND' * EXPORTING * handle = hdl * command = 'ascii' * TABLES * data = ftp_data * 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. * ENDIF. * * CALL FUNCTION 'FTP_COMMAND' * EXPORTING * handle = hdl * command = 'dir' * TABLES * data = ftp_data1 * 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. * ENDIF. * | | Reply to this email to post your response. __.____._ | _.____.__ |