Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

i get short dump, please help~

Former Member
0 Likes
1,569

Hi!

I get the short dump , for the code below.

Since I have exported to memory, why i get this short dump when i try to list it from the memory?


SUBMIT (prog) with SELECTION-TABLE (seltab)
                      EXPORTING LIST TO MEMORY
                      AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = abaplist.


and the short dump is as follows
A RAISE statement in the program "SAPLSLST" raised the exception
condition "NOT_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.

Short description of exception condition:

No list found in memory

For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.

you have to handle the exception. call the FM in the following way and you wont have dump

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject       = itab
 EXCEPTIONS
   NOT_FOUND        = 1
   OTHERS           = 2
          .
IF sy-subrc <> 0.
message i398(00) with 'List not Found' .
ENDIF.

Raja

8 REPLIES 8
Read only

Former Member
0 Likes
1,214

hi Tan,

Use this FM before the submit statement ..

    call function <b>'LIST_FREE_MEMORY</b>'     
       tables                            
         listobject       = abaplist.  

SUBMIT (prog) with SELECTION-TABLE (seltab)
                      EXPORTING LIST TO MEMORY
                      AND RETURN.
 
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = abaplist.

Regards,

Santosh

Read only

0 Likes
1,214

Hi Santosh,

I have tried the FM you suggested, but I still get the same error.

Read only

0 Likes
1,214

Hi Huai,

After submit statement you please check sy-subrc and see whether it is

successfully writing the list to memory or not.

if sy-subrc = 0 then try to read it.

Thanks & Regards,

Siri.

Read only

0 Likes
1,214

you have to handle the exception. call the FM in the following way and you wont have dump

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject       = itab
 EXCEPTIONS
   NOT_FOUND        = 1
   OTHERS           = 2
          .
IF sy-subrc <> 0.
message i398(00) with 'List not Found' .
ENDIF.

Raja

Read only

Former Member
0 Likes
1,214

Hi,

I have given a saple code for SUBMIT

SUBMIT RMCB0300 WITH SL_WERKS-LOW EQ SO_WERKS-LOW

WITH SL_MATNR IN SO_MATNR

WITH VA EQ 'X'

WITH SL_SPMON-LOW EQ W_BUDAT1

WITH SL_SPMON-HIGH EQ W_BUDAT1

WITH SL_MTART-LOW EQ 'ROH'

WITH SLV_NO EQ 'STOCK'

EXPORTING LIST TO MEMORY AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = LISTTAB

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

LISTASCI = I_LISTASCI

LISTOBJECT = LISTTAB

EXCEPTIONS

EMPTY_LIST = 1

LIST_INDEX_INVALID = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

ENDIF.

Which im using currently .PLease reward points if solved

Thanks

Shankar S

Read only

Former Member
0 Likes
1,214

Hi Huai,

Whichever the program you are submitting pls. check whether it is active or not.

Read only

Former Member
0 Likes
1,214

add this statement before calling that function module and try out

clear : abaplist[] , abaplist.

CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = abaplist.

chandrasekhar jagarlamudi

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,214

Hi,

Use the exception for the FM.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject =

EXCEPTIONS

NOT_FOUND = 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.

endif.