2008 May 09 12:06 PM
Hi all,
How can I get the data of an internal table by submitting another program into the present program. Please help me. this is urgent.
Thanks,
srinivas.
2008 May 09 2:18 PM
REPORT ZREP1 .
DATA: BEGIN OF i_makt occurs 0,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF i_makt.
select matnr
maktx
from makt
into table i_makt
up to 10 rows.
export i_makt to memory id 'BAC'.
-
REPORT ZREP2 .
DATA: BEGIN OF i_makt OCCURS 0,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF i_makt.
submit ZREP1 and return .
IMPORT I_MAKT FROM MEMORY ID 'BAC'.
LOOP AT I_MAKT.
ENDLOOP.
<USE WRITE STATEMENTS>.........
EXECUTE THE ZREP2.
you will get the output....
reward points if useful.
regards
srinivas
Hi all,
How can I get the data of an internal table by submitting another program into the present program. Please help me. this is urgent.
Thanks,
srinivas.
2008 May 09 12:19 PM
hi
Use submit statement .
submit program name (from which u want the internal table).
submit <program name>EXPORTING LIST TO MEMORY
Effect
This addition stores the basic list for the program accessed in the ABAP Memory. It can only be used together with the addition AND RETURN.
The list is stored in the ABAP Memory as an internal table of the row type ABAPLIST, ABAPLIST being a structured data type in the ABAP Dictionary.
The calling program can access the list stored once program access is completed, using function modules belonging to the function group SLST.
The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.
reward points if useful.
deepa
2008 May 09 12:20 PM
Hello,
Try this in the called program:
CONSTANTS:
C_ITAB_NAME TYPE C LENGTH 72 VALUE '(PROGRAM_NAME)ITAB_NAME[]'.
FIELD-SYMBOLS: <FS_ITAB> TYPE ANY TABLE.
ASSIGN (C_ITAB_NAME) TO <FS_ITAB>.
Regards,
2008 May 09 12:39 PM
Export the selected rows to the next program
EXPORT itab TO MEMORY ID 'MID'.
CALL TRANSACTION 'ZAB'.
ZAB is the tcode for the other program where u want to import the values.
In the second program
INITIALIZATION.
IMPORT the internal table from the first program
IMPORT itab FROM MEMORY ID 'MID'.
2008 May 09 12:40 PM
Hi,
1) You have to export the internal table to memeory like this:
EXPORT itab TO MEMORY ID 'ABC'.
2) And then submit to another program.
SUBMIT zreport2 USING SELECTION-SCREEN '1000'
AND RETURN.
3) And in zreport2 ypu have to import that table from same memory Id.
IMPORT itab FROM MEMORY ID 'ABC'.
The internal table itab should be of same type and should be declared in both the programs.
Regards,
Pooja Bajaj.
2008 May 09 2:18 PM
REPORT ZREP1 .
DATA: BEGIN OF i_makt occurs 0,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF i_makt.
select matnr
maktx
from makt
into table i_makt
up to 10 rows.
export i_makt to memory id 'BAC'.
-
REPORT ZREP2 .
DATA: BEGIN OF i_makt OCCURS 0,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF i_makt.
submit ZREP1 and return .
IMPORT I_MAKT FROM MEMORY ID 'BAC'.
LOOP AT I_MAKT.
ENDLOOP.
<USE WRITE STATEMENTS>.........
EXECUTE THE ZREP2.
you will get the output....
reward points if useful.
regards
srinivas
2015 Oct 01 5:20 AM
Guys...
This code works exactly perfect well...Try this...
Thanks Srinivasa ravva ...
2023 Mar 09 12:29 PM
please code abap for submit and get a internal table of other program