How to replace obsolete download function module in ECC6.0?

Hi Experts,
How to replace obsolete download function module in ECC6.0?
Thanks,
Adi.

Hi,
DOWNLOAD is obsolete FM in ECC 6. To get the same functionality , we need to use
CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG  method (It provides the File selection feature)
and
GUI_DOWNLOAD function module.(It downloads the internal table from program to presentation server)
Please see the example below:
Example:
*CALL FUNCTION 'DOWNLOAD'
          EXPORTING
               FILENAME            = p_filename
               FILETYPE            = ‘DAT’
          TABLES
               DATA_TAB            = T_DOWNL
          EXCEPTIONS
               INVALID_FILESIZE    = 1
               INVALID_TABLE_WIDTH = 2
               INVALID_TYPE        = 3
               NO_BATCH            = 4
               UNKNOWN_ERROR       = 5
               OTHERS              = 6.
*End of deletion CH01-
Replacement Method for above code:
DATA: l_filename    TYPE string,
       l_filen       TYPE string,
       l_path        TYPE string,
       l_fullpath    TYPE string,
       l_usr_act     TYPE I.
l_filename = P_filename.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
  EXPORTING
    DEFAULT_FILE_NAME    = l_filename
  CHANGING
    FILENAME             = l_filen
    PATH                 = l_path
    FULLPATH             = l_fullpath
    USER_ACTION          = l_usr_act
  EXCEPTIONS
    CNTL_ERROR           = 1
    ERROR_NO_GUI         = 2
    NOT_SUPPORTED_BY_GUI = 3
    others               = 4.
IF sy-subrc = 0
      AND l_usr_act <>
      CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    FILENAME                        = l_fullpath
   FILETYPE                        = 'DAT'
  TABLES
    DATA_TAB                        = T_DOWNL
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.

Similar Messages

  • Replacement of  CALL FUNCTION 'WWW_USER_AUTHORITY' in ECC6.O

    Hi,
        Can any one share the function module for replacement of  below function modules in ECC6.O
    1) CALL FUNCTION 'WWW_USER_AUTHORITY'
    2)   CALL FUNCTION 'VALUES_DISPLAY'.
    Thanks & Regards
    Kiran

    ISA_INTERNET_USER should be a replacement for WWW_USER_AUTHORITY???
    Just kidding?
    Have a smart look into the replacement - what do you see?:
    FUNCTION ISA_INTERNET_USER.
    *"*"Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(USERID) LIKE  BAPIUSW01-OBJID
    *"             VALUE(NEW_USERID) LIKE  BAPIUSW01-OBJID OPTIONAL
    *"             VALUE(OBJTYPE) LIKE  BAPIUSW01-OBJTYPE
    *"             VALUE(PASSWORD) LIKE  BAPIUID-PASSWORD OPTIONAL
    *"             VALUE(NEWPASSWORD) LIKE  BAPIUID-PASSWORD OPTIONAL
    *"             VALUE(VERIPASSWORD) LIKE  BAPIUID-PASSWORD OPTIONAL
    *"             VALUE(ACTION) LIKE  BAPIUID-ACTION
    *"             VALUE(NEWVALIDTO) LIKE  BAPIUSW01-VALIDTO OPTIONAL
    *"       EXPORTING
    *"             VALUE(RETURN) LIKE  BAPIRETURN STRUCTURE  BAPIRETURN
    *"             VALUE(INITPASSWORD) LIKE  BAPIUID-PASSWORD
    *"       TABLES
    *"              STATUSINFO STRUCTURE  BAPIUSWSTA OPTIONAL
      CONSTANTS: C_MSG_ID LIKE SY-MSGID VALUE 'ISA'.
      DATA: RET LIKE BAPIUID-RCODE.
      CALL FUNCTION 'WWW_USER_AUTHORITY'
           EXPORTING
                ID           = USERID
                NID          = NEW_USERID
                IDTYPE       = OBJTYPE
                PASSWORD     = PASSWORD
                NEWPASSWORD  = NEWPASSWORD
                VERIPASSWORD = VERIPASSWORD
                ACTION       = ACTION
           IMPORTING
                RET          = RET
                INITPASSWORD = INITPASSWORD
           TABLES
                STATUSINFO   = STATUSINFO
           EXCEPTIONS
                OTHERS       = 1.
    RIGHT! The replacement calls the function module to be replaced...

  • Download function module is obsolute

    How to handle importing parameters of Download Function module in unicode conversion.
    If i am converting my SAP from Non unicode to unicode environment how should i handle the importing parameters od download Function module in Cl_gui_frontend_services=> gui_download because there is only one importing paramter in that , where as in download function module i have 3 importing parameters

    Hi,
    Please see the below code .
    Function module u2018DOWNLOADu2019
          CALL FUNCTION 'DOWNLOAD'
            EXPORTING
              filename = p_file
              filetype = 'WK1'
            TABLES
              data_tab = i_table.
    would be replaced with:
    data: gd_file type string.
    DATA: ld_filename TYPE string,
          ld_path TYPE string,
          ld_fullpath TYPE string,
          ld_result TYPE i.
    types: t_uctable like line of i_table.
    data:  it_uctable type standard table of t_uctable.
      gd_file = p_file.
      shift gd_file RIGHT DELETING TRAILING '\'.
      shift gd_file RIGHT DELETING TRAILING '/'.
      shift gd_file left DELETING LEADING space.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
          DEFAULT_EXTENSION = 'WK1'
          default_file_name = gd_file
          INITIAL_DIRECTORY = gd_file
        CHANGING
          filename          = ld_filename
          path              = ld_path
          fullpath          = ld_fullpath
          user_action       = ld_result.
      check ld_result eq 0.
      gd_file = ld_fullpath.
      gd_file = p_file.
      it_uctable[] = i_table[].
      CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename = gd_file
        filetype = 'ASC' " DAT,WK1
        Append   = ' '   "if mode = A then this would be X
      CHANGING
        data_tab = it_uctable
      EXCEPTIONS
        OTHERS   = 1.

  • Download function module

    Hi all,
    My requirement is to replace download function module with cl_gui_frontend_services=>file_save_dialog.
    When i give the window title it is not getting reflected in the save dialog box.how am i to get it ?
    thanks in advance.

    class cl_gui_frontend_services definition load.
    <b>data : l_title type string value 'FILE SAVE',</b>
           l_fname type string,
           l_path type string,
           l_fpath type string,
           l_enc type abap_bool value 'X',
           l_ini type string value 'C:\',
           l_usr type i ,
           l_dname type string . " value 'C:\abc.xls'.
    data :begin of idata_tab occurs 10,
          a1 type c value 'A',
          b1 type c value 'B',
          c1 type c value 'C',
          end of idata_tab.
    move p_fname to l_dname.
    call method cl_gui_frontend_services=>file_save_dialog
       exporting
         <b>window_title = l_title</b>
         default_file_name =  l_dname
         with_encoding   = l_enc
        INITIAL_DIRECTORY = L_INI
       changing
          filename = l_fname
          path     = l_path
          fullpath = l_fpath
          user_action = l_usr
       exceptions
          cntl_error = 1
          error_no_gui = 2
          not_supported_by_gui = 3 .

  • Replaced version of Function Module PFL_COPY_OS_FILE in ECC 6.0

    Hi everybody,
                          Can anybody tell me what is the replaced name of function module PFL_COPY_OS_FILE in ECC 6.0. This function module was used in 4.6C version and become obsolete in ECC 6.0. It is basically used for copying OS files.

    check CL_GUI_FRONTEND_SERVICES=>FILE_COPY
    new_file = P_FILE.
        app_full_name = R_FILE.
        CALL METHOD cl_gui_frontend_services=>file_copy
          EXPORTING
            SOURCE             = new_file
            DESTINATION        = app_full_name
            overwrite          = 'X'
          EXCEPTIONS
            cntl_error         = 1
            error_no_gui       = 2   
            wrong_parameter    = 3
            disk_full          = 4   
            file_not_found     = 5
            destination_exists = 6
            unknown_error      = 7
            path_not_found     = 8
            disk_write_protect = 9.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.

  • Replacement  for a function module in  6.0

    Hi
       I  am in the process of upgrading from 4.7 to 6.0 . The function module SAPWL_STATREC_READ_FILE is flagged as obsolete . Am unable to find a documentation for this function module . So which is the replacement for this function module . ?
    Please help . .

    hi,
    the replacement is SAPWL_STATREC_DIRECT_READ
    next time check the source code of the FM, probably you'll find the answer...
    hope this helps
    ec

  • Replacement  function modules in ECC6

    Hi,
    We are working Upgrade project in Ecc6.
    We found that function module 1. TABLE_COMPRESS and
                                                       2. STRING_MOVE_RIGHT                                                                               
    3. STRING_LENGHT is obsolete
    Please suggest the Replacement for these Function Modules
    Thanks
    Vanamali

    Check
    for TABLE_COMPRESS
    [Fm TABLE_COMPRESS]
    for STRING_MOVE_RIGHT
    [replacement for obsolete function module STRING_MOVE_RIGHT]
    for STRING_LENGHT
    DATA: lv_length TYPE i,
          var(10) TYPE c VALUE 'Sathar'.
    lv_length = STRLEN( var ).
    WRITE lv_length.

  • How to create a callback function module

    Hi all,
    I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
    I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
    looks like i am going in wrong way ... can any one please help ??

    Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
    Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
    IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
    Take care,
    Stephen

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • How to go into a function module through SE80 t - code

    Hi All , 
                 How to go into a function module through SE80 t - code.
    Thanks in advance.

    >
    Balaji Krishnamoorthy wrote:
    > Hi All , 
    >              How to go into a function module through SE80 t - code.
    >
    > Thanks in advance.
    Hi,
    With  help of  function group
    Thanks & Regards
    Edited by: Always Learner on Oct 16, 2008 2:31 PM

  • How to config Check Digits function module for Student Number Validation

    Hi SLCM Experts,
    In the SAP-SLCM, How to use check digits function module for validate student number.  Just only config it or need to customizing program.
    *Any idea to student number validation in SLCM?*
    Best Regards,
    Suvatchai K.

    Hi ,
    Can you expalin it further ?
    You configure the St. no in piq_matr . And set it  as external or internal no. range which suits your business .
    What is the validation you are looking for ?
    Regards
    Gajalakshmi

  • How to connect our outbound function module to the message type

    how to connect our outbound function module to the message type any transcation code exits to assign the message type with the function module .
    Thank in advance .
    A. Thiru

    Hi Thiru,
    Standard Transaction Codes, have their own Function Modules for generating Outbound/Indbound Idocs. Where these Function Modules will be configured to a particular Process Codes.
    For E.g for PO's
    Process code : ME10 - IDOC_OUTPUT_ORDERS - for creation
    In case if its a Z Function Module, It depends on the case how you use IDOC types. either directly through Z Program or through Inbound/Outbound Process  codes with respective Function modules.
    Regards,
    Anbalagan

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • How to code a predifined function module in sap ,in se37.

    can any one tell me how to code a predifined function module in sap ,in se37.it's an immediate requirement.if u give a brief description it'll do.

    Hi Henry,
    There are two possible ways in which I can interpret your question.
    1. You want to create a new Function Module in SE37. you will have to refer to the <a href="http://help.sap.com/saphelp_47x200/helpdata/en/d1/801e9a454211d189710000e8322d00/frameset.htm">Function Builder</a> tutorial for that.
    2. You want to use an existing function module in your program. In the code of your program in SE38, click the button <i>Pattern</i>. On the pop-up, give the name of the function module that you wish to use in your program.
    Regards,
    Anand Mandalika.

  • How can i use reuse_alv_fieldcatalog_merge function module

    I am using below steps for populating the final internal table.How can I use reuse_alv_fieldcatalog_merge function module in the place of declaring all these fields.How canI put title of the report in reuse_alv_fieldcatalog_merge function module.
    FORM BUILD_FIELDCATALOG .
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'KUNNR'.
      FIELDCAT-SELTEXT_M = 'Customer Name'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-KEY       = 'X'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'VBELN'.
      FIELDCAT-SELTEXT_M = 'Invoice Reference'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-KEY       = 'X'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'VKBUR'.
      FIELDCAT-SELTEXT_M = 'Sales Office'.
      FIELDCAT-JUST      = 'L'.
    FIELDCAT-KEY       = 'X'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'VKGRP'.
      FIELDCAT-SELTEXT_M = 'Sales Person'.
      FIELDCAT-JUST      = 'L'.
    FIELDCAT-KEY       = 'X'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FINAL'.
      FIELDCAT-FIELDNAME = 'POSNR'.
      FIELDCAT-SELTEXT_M = 'Item No'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-KEY       = 'X'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.
      FIELDCAT-TABNAME   = 'IT_FIANL'.
      FIELDCAT-FIELDNAME = 'ARKTX'.
      FIELDCAT-SELTEXT_M = 'Item Description'.
      FIELDCAT-JUST      = 'L'.
      FIELDCAT-DATATYPE  = 'C'.
      APPEND FIELDCAT TO I_FIELDCAT.
      CLEAR FIELDCAT.

    Hello,
    It is very easy to use reuse_alv_fieldcatalog_merge.
    You try this it will work.
    example
    data:
    DATA : gv_repid        TYPE syrepid VALUE sy-repid .  " Report id
      PERFORM set_field_catalog USING gst_struct CHANGING lst_fieldcat.
    FORM set_field_catalog  USING uv_tab TYPE slis_tabname
                         CHANGING  xt_fieldcatalog TYPE slis_t_fieldcat_alv.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = gv_repid
          i_internal_tabname     = uv_tab
          i_inclname             = gv_repid
        CHANGING
          ct_fieldcat            = xt_fieldcatalog
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " set_field_catalog_spec

Maybe you are looking for

  • New-AzureDeployment - Error while copying content to a stream

    Hi All, I am trying to deploy a packages using the Azure Powershell Cmdlets. Each time I try to deploy a particular package, I get the following error message.. New-AzureDeployment : Error while copying content to a stream. At line:1 char:1 + New-Azu

  • Time Machine backup error message

    I am making a second backup with a new HD. It made the first Time Machine backup, but ever since, I get the error message "unable to complete backup". The Time Machine buddy gives me this message: Starting standard backup Backing up to: /Volumes/DIAN

  • Connecting to MySQL from Sun One Studio

    Hi, I am trying to connect to the MySQL from the Sun One Studio 5. I followed these steps. 1. I downloaded the MySQL software and installed on my local computer, it was successful. 2. I got the drivers [b][b][b]mysql-connector-java-3.0.8-stable-bin.j

  • Sort issues in solaris 10 based on Locale settings

    Hi All - When Locale is set to en_GB.ISO8859-1 and sort done, the output does not match the sort done on the same file with Locale set to en_US.ISO8859-1. Please note that both are using the ISO8859-1 char set. Why is the difference? Your input will

  • Problem Addition Reporting Client tools for Hyperion System 9.3.1

    Hi, I'm using Hyperion System 9.3.1 (on SQL Srv). I had no Reporting tools installed. Then Reporting Client 9 products has been installed and configured successfully. After that I logged into Workspace, system lost any apps and tools. Nothing except