Choose path to download file .

"Definition of data for get download path
DATA : fullpath       TYPE                   string,
        filename       TYPE                   string,
        path           TYPE                   string,
        user_action    TYPE                   i,
        encoding       TYPE                   abap_encoding.
 
IF p_file IS INITIAL.
   CALL METHOD cl_gui_frontend_services=>file_save_dialog
     EXPORTING
       window_title         = 'Gui_Download Demo'
       with_encoding        = 'X'
       initial_directory    = 'D:\SAP'
     CHANGING
       filename             = filename
       path                 = path
       fullpath             = fullpath
       user_action          = user_action
       file_encoding        = encoding
     EXCEPTIONS
       cntl_error           = 1
       error_no_gui         = 2
       not_supported_by_gui = 3
       OTHERS               = 4.
 
   IF sy-subrc <> 0.
     EXIT.
   ENDIF.
 
   IF user_action <> cl_gui_frontend_services=>action_ok.
     EXIT.
   ENDIF.
 
ELSE.
   fullpath = p_file.
 
ENDIF.
 
CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
     filename                = fullpath
     filetype                = 'DAT'
   TABLES
     data_tab                = it_top             " download internal table
   EXCEPTIONS
     file_write_error        = 1
     no_batch                = 2
     gui_refuse_filetransfer = 3
     invalid_type            = 4
     no_authority            = 5
     unknown_error           = 6
     header_not_allowed      = 7
     separator_not_allowed   = 8
     filesize_not_allowed    = 9
     header_too_long         = 10
     dp_error_create         = 11
     dp_error_send           = 12
     dp_error_write          = 13
     unknown_dp_error        = 14
     access_denied           = 15
     dp_out_of_memory        = 16
     disk_full               = 17
     dp_timeout              = 18
     file_not_found          = 19
     dataprovider_exception  = 20
     control_flush_error     = 21
     OTHERS                  = 22.
IF sy-subrc <> 0.
   MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
           WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF .
Sure! Here's a step-by-step guide to deploying Sqoop on Ubuntu: 1. Install Java Development Kit (JDK): - Open Terminal and run the command: `sudo apt update` - Install OpenJDK by running: `sudo apt install openjdk-8-jdk` 2. Verify Java installation: - Run the command: `java -version` - You should see java version information printed on the console. 3. Download and install Sqoop: - Visit the Apache Sqoop website (https://sqoop.apache.org/) and navigate to the "Downloads" section. - Choose the latest stable release and copy the download link for the binary package (e.g., sqoop-x.x.x.bin__hadoop-x.x.x.tar.gz). - In Terminal, navigate to the directory where you want to install Sqoop. - Download the package using the command: `wget [download_link]` (replace [download_link] with the actual download link). - Extract the downloaded package using: `tar -xvf sqoop-x.x.x.bin__hadoop-x.x.x.tar.gz` (replace x.x.x with the version number). 4. Configure Sqoop: - Open the Sqoop configuration file using a text editor: `sudo nano sqoop-x.x.x.bin__hadoop-x.x.x/conf/sqoop-env.sh` - Set the JAVA_HOME variable to your JDK installation path. For example: `export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64` - Save and close the file. 5. Set up environment variables: - Open the ~/.bashrc file in a text editor: `nano ~/.bashrc` - Add the following lines at the end of the file: ``` export SQOOP_HOME=/path/to/sqoop export PATH=$PATH:$SQOOP_HOME/bin ``` - Save and close the file. - Run `source ~/.bashrc` to apply the changes. 6. Test Sqoop installation: - Run the command: `sqoop version` - You should see the Sqoop version information printed on the console without any errors. Congratulations! You have successfully deployed Sqoop on Ubuntu. You can now use Sqoop for data transfer between Hadoop and relational databases.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值