Application Development 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: 

Issue in submit statement with exporting list to memory optiion

Former Member
0 Kudos

Hi ,

I am using submit statment to call program RABEST01 twice in my program with the option exporting list to memory .

Below is the piece of code I have used twice in my prg with diff values in selection screen table (i_seltab)

Submit rabest01 with SELECTION-TABLE i_seltab EXPORTING LIST TO MEMORY

and return .

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = i_lt

EXCEPTIONS

NOT_FOUND = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

MESSAGE E003 WITH TEXT-033. "No data exists

ENDIF.

Free memory ID '%_LIST' .

clear: i_lt .

refresh i_lt .

After the second submit the internal table i_lt contains both the first list as well as the second list .I used free statment so that this doesnot occur .But the strange part is this code works fine in assurance system . However in sandbox the free stmt doesnot seem to work . i_lt contains both the first and second list .

Could someone suggest a better way to use submit statement in program twice withou t any side effect .

thanks ,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello ,

Use this function module LIST_FREE_MEMORY

6 REPLIES 6

venkat_o
Active Contributor
0 Kudos

Hi Lalitha, Instead of FREE MEMORY statement, you can use below statement to do the same .

DELETE FROM MEMORY ID '%_LIST'.
Thanks Venkat.O

Former Member
0 Kudos

hi ,

DELETE FROM MEMORY ID '%_LIST' is giving an syntax error "DELETE FROM dbtab" must be followed by "WHERE".

venkat_o
Active Contributor
0 Kudos

<li>Which version you are in ECC 6.0 ? <li>No syntax error for that code provided. Thanks Venkat.O

Former Member
0 Kudos

Hi.

Clear and refresh the internal table before submitting to the program.

Regards,

Usha.

Former Member
0 Kudos

Hello ,

Use this function module LIST_FREE_MEMORY

Former Member
0 Kudos

Hi Lalitha ,

Request to refresh the internal table .

Regards,

Kavitha