Skip to Content
0
Former Member
Oct 08, 2009 at 03:54 AM

Issue in submit statement with exporting list to memory optiion

152 Views

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 ,