How To Fix PC045 - WS_UPLOAD is obsolete, use GUI_UPLOAD


SAP Error Message - Details

  • Message type: E = Error

  • Message class: PC - Graphics interface messages

  • Message number: 045

  • Message text: WS_UPLOAD is obsolete, use GUI_UPLOAD

  • Show details Hide details


  • Self-Explanatory Message

    Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.

    To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.

    Unfortunately, there isn't any extra information in this error notice.



    What else can you do?

    First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).

    Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.

    You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.


Smart SAP Assistant

  • What is the cause and solution for SAP error message PC045 - WS_UPLOAD is obsolete, use GUI_UPLOAD ?

    The SAP error message PC045 indicates that the function module WS_UPLOAD is obsolete and suggests using GUI_UPLOAD instead. This error typically arises when a program or report is trying to use the outdated WS_UPLOAD function for uploading files.

    Cause:

    The cause of this error is that the WS_UPLOAD function module has been deprecated in favor of GUI_UPLOAD. This change is part of SAP's efforts to improve the functionality and performance of file upload processes in the SAP GUI environment.

    Solution:

    To resolve this error, you need to replace any calls to the WS_UPLOAD function module in your ABAP code with calls to the GUI_UPLOAD function module. Here’s how you can do that:

    1. Identify the Code: Locate the part of your ABAP program where WS_UPLOAD is being called.

    2. Replace the Function Call: Change the function call from WS_UPLOAD to GUI_UPLOAD. The parameters for GUI_UPLOAD may differ slightly, so you will need to adjust them accordingly.

    3. Adjust Parameters: Ensure that you are passing the correct parameters to GUI_UPLOAD. The typical parameters include:

      • FILENAME: The name of the file to be uploaded.
      • FILETYPE: The type of the file (e.g., 'ASC' for ASCII files).
      • DATA: A table to hold the uploaded data.
    4. Test the Changes: After making the changes, test the program to ensure that the file upload functionality works as expected.

    Example Code Change:

    Here’s a simple example of how you might change the code:

    Old Code Using WS_UPLOAD:

    DATA: lt_data TYPE TABLE OF string,
          lv_filename TYPE string.
    
    lv_filename = 'C:\path\to\your\file.txt'.
    
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        FILENAME = lv_filename
        FILETYPE = 'ASC'
      TABLES
        DATA = lt_data
      EXCEPTIONS
        OTHERS = 1.

    New Code Using GUI_UPLOAD:

    DATA: lt_data TYPE TABLE OF string,
          lv_filename TYPE string.
    
    lv_filename = 'C:\path\to\your\file.txt'.
    
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME = lv_filename
        FILETYPE = 'ASC'
      TABLES
        DATA = lt_data
      EXCEPTIONS
        OTHERS = 1.

    Related Information:

    • Documentation: Refer to the SAP documentation for GUI_UPLOAD to understand all the parameters and options available.
    • SAP Notes: Check for any relevant SAP Notes that might provide additional context or updates regarding the deprecation of WS_UPLOAD.
    • Testing: After making changes, ensure thorough testing in a development or quality assurance environment before moving to production.

    By following these steps, you should be able to resolve the PC045 error and successfully implement file uploads using the GUI_UPLOAD function module.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:
  • PC044 No authorization to access file
    Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...

  • PC043 File does not exist
    Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...

  • PC046 WS_DOWNLOAD is obsolete, use GUI_DOWNLOAD
    Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...

  • PC047 File &1 already exists
    Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...

Click on this link to search all SAP messages.


Rating
ERPlingo's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker