‎2008 Jan 10 11:10 PM
hi experts,
how to import and export the internal table between programs...
Nice solutins with maximum points.....
‎2008 Jan 11 12:13 AM
Example of a program exporting an internal table to ABAP memory.
Prog 1
parameters: pa_vbeln like vbak-vbeln.
data: itab type standard table of vbak.
* get data to fill the table
select * from vbak into table itab
where vbeln = pa_vbeln.
* now store the internal table to ABAP memory
export itab to Memory ID 'table''.
* here we call another program, prog 2
submit prog2 and return.
Prog 2 -> This imports the internal table exported by prog 1 and writes the content of the internal table to a list
data: jtab type standard table of vbak,
wa_vbak type vbak.
* importing the itab that was exported by prog1
import itab to jtab from memory id 'table'.
loop at jtab into wa_vbak.
write:/ wa_vbak-vbeln,
wa_vbak-erdat.
endloop.
* clear the specific memory id after required processing is complete
free memory id 'table'
Hope this solves your problem.
Cheers,
Sougata.
Subas,
Copy/paste your code, I'll have a look. First check if data is being selected before Export command.
Edited by: Sougata Chatterjee on Jan 11, 2008 12:31 PM
Also make sure you create prog2 as an executable program. Then, run prog1 with a valid Sales Order number. To understand it more clearly run it in debugging mode and step through. It should work fine in any system.
Edited by: Sougata Chatterjee on Jan 11, 2008 12:42 PM
‎2008 Jan 11 1:17 AM
i use the same code what u given above but still
no data is exporting between the programs.
‎2008 Jan 11 2:41 AM
Are those Type 1 programs ? Since SUBMIT will work only for those programs.
regards,
Satya