Skip to Content
author's profile photo Former Member
Former Member

Can I catch the error instead of the DUMP GETWA_NOT_ASSIGNED ???

Hi:

I have the following code:

FIELD-SYMBOLS: . is executed i got a dump GETWA_NOT_ASSIGNED.

Can I catch the error instead of the dump ?

Thank you

Silvia

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2010 at 10:50 PM

    Hi,

    I had exactly the same problem. The cause of the dump is that the exit is called from different environment and the program SAPLKEII is not all time loaded into the memory (I found that it is loaded, when the SD-FI interface is in action).It does not generate a catchable exception, so the nice solution would be to find out which programs are loaded and leave out the

     ASSIGN (campo2) TO <t_accit>.

    if the needed program is not in the memory. Unfortunately I could not find a solution to list the loaded programs. If anyone know how to find out which programs are loaded...

    So I made an ugly workaround: with static variables I count how many times my exit runs and make the assign only when the given programs should be loaded. I figured out in debug mode, when the needed program loaded.

    Hope that it helps a bit...

    Add a comment
    10|10000 characters needed characters exceeded

    • >

      Unfortunately I could not find a solution to list the loaded programs. If anyone know how to find out which programs are loaded...

      I assume that SAP loads program when it calls method/routine/function defined inside this program. Hence you should get all loaded programs from ABAP callstack (FM SYSTEM_CALLSTACK). I haven't tested it.

      Cheers

  • Posted on Feb 25, 2010 at 10:12 AM

    see the following example to avoid DUMP

    PARAMETERS: p_file LIKE rlgrap-filename .
    DATA: v_file TYPE string.
    DATA: BEGIN OF itab OCCURS 0,
          name(23) TYPE  c,
          END OF itab.
    
    DATA: errormessage TYPE char50.
    v_file = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename            = v_file
        filetype            = 'ASC'
        has_field_separator = ' '
      TABLES
        data_tab            = itab.
    RECEIVE RESULTS FROM FUNCTION 'GUI_UPLOAD'
     EXCEPTIONS
       file_open_error               = 1
       file_read_error               = 2
       no_batch                      = 3
       gui_refuse_filetransfer       = 4
       invalid_type                  = 5
       no_authority                  = 6
       unknown_error                 = 7
       bad_data_format               = 8
       header_not_allowed            = 9
       separator_not_allowed         = 10
       header_too_long               = 11
       unknown_dp_error              = 12
       access_denied                 = 13
       dp_out_of_memory              = 14
       disk_full                     = 15
       dp_timeout                    = 16
       OTHERS                        = 17 .
    .
    break developer.
    CASE sy-subrc.
      WHEN 0.
        errormessage     = 'Data Loaded'.
      WHEN 1.
        errormessage     = 'FILE_OPEN_ERROR'.
      WHEN 2.
        errormessage     = 'FILE_READ_ERROR'.
      WHEN 3.
        errormessage     = 'NO_BATCH'.
      WHEN 4.
        errormessage     = 'GUI_REFUSE_FILETRANSFER'.
      WHEN 5.
        errormessage     = 'INVALID_TYPE'.
      WHEN 6.
        errormessage     = 'NO_AUTHORITY'.
      WHEN 7.
        errormessage     = 'UNKNOWN_ERROR'.
      WHEN 8.
        errormessage     = 'BAD_DATA_FORMAT'.
      WHEN 9.
        errormessage     = 'HEADER_NOT_ALLOWED'.
      WHEN 10.
        errormessage     = 'SEPARATOR_NOT_ALLOWED'.
      WHEN 11.
        errormessage     = 'HEADER_TOO_LONG'.
      WHEN 12.
        errormessage     = 'UNKNOWN_DP_ERROR'.
      WHEN 13.
        errormessage     = 'ACCESS_DENIED'.
      WHEN 14.
        errormessage     = 'DP_OUT_OF_MEMORY'.
      WHEN 15.
        errormessage     = 'DISK_FULL'.
      WHEN 16.
        errormessage     = 'DP_TIMEOUT'.
      WHEN 17.
        errormessage     = 'OTHERS'.
    ENDCASE.
    MESSAGE e000(00) WITH errormessage .
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2015 at 12:04 PM

    You can serve them with IF statement.

    IF sy-subrc <> 0.

    STOP.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.