Passing ABAP internal memory data to lets say an internal table defined by DATA statement is used very often in ABAP programming. There are different techniques which differs according to architecture of your ABAP program, data size that you want to pass, visibility of your variables(same session or new session) etc.
For instance when you call an ABAP program with SUBMIT statement you can pass your values by selection-screen parameters or select-options. But as you know selection-screen parameters have size limitations, which prevent us from passing more than 10.000 records.
Recently i was caught up to that limitation and searched a workaround. It leaded me to use EXPORT/IMPORT TO/FROM SHARED BUFFER command. This command helps SAP cross memory to be used by ABAP program and provides different session data to be transferred. On the other hand, there was a trick point for my case, I was starting many background job with SUBMIT statement, therefore i needed to find a way to distinguish each EXPORT/IMPORT parameters for each background job. I have used system date, system time and a literal which makes EXPORT/IMPORT parameter unique in overall system. Below you can see code snippets belong to calling/called programs.
Calling ABAP program
lv_datum = sy-datum.
LV_UZEIT = SY-UZEIT.
concatenate 'Z_SHARED' lv_datum LV_UZEIT into LV_MEMORY.
export GT_TABLE = LT_TABLE to shared buffer INDX(ST) id LV_MEMORY.
submit (lv_JOBNAME) via job lv_JOBNAME
with P_datum eq lv_datum
with P_UZEIT eq lv_uzeit.
Called ABAP program
concatenate 'Z_SHARED' p_Datum p_uzeit into lv_memory.
import gt_final = lt_final from shared buffer indx(st) id lv_memory.