10-08-2009 4:54 AM
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 ,
10-08-2009 6:42 AM
10-08-2009 5:11 AM
Hi Lalitha,
Instead of FREE MEMORY statement, you can use below statement to do the same .
Thanks
Venkat.ODELETE FROM MEMORY ID '%_LIST'.
10-08-2009 5:38 AM
hi ,
DELETE FROM MEMORY ID '%_LIST' is giving an syntax error "DELETE FROM dbtab" must be followed by "WHERE".
10-08-2009 6:32 AM
<li>Which version you are in ECC 6.0 ? <li>No syntax error for that code provided. Thanks Venkat.O
10-08-2009 5:17 AM
Hi.
Clear and refresh the internal table before submitting to the program.
Regards,
Usha.
10-08-2009 6:42 AM
10-08-2009 8:59 AM
Hi Lalitha ,
Request to refresh the internal table .
Regards,
Kavitha