2008 Feb 19 5:37 AM
Hi all.
I want to know is it possible to read internal table from report without modifying the report. is there any function module by which we can run the report and read data from internal table?
Thanks.
Hi all.
I want to know is it possible to read internal table from report without modifying the report. is there any function module by which we can run the report and read data from internal table?
Thanks.
2008 Feb 19 5:42 AM
hi
hope it will help you.
<REMOVED BY MODERATOR>
Read table doesn't allow ne operator.
It reads only one record...Either by index or key.
READ TABLE MY_TAB INDEX 1.
READ TABLE MY_TAB WITH KEY CODE = 'ATG'.
these are the results for SY-SUBRC checks after read table
SY-SUBRC = 0:
An entry was read.
SY-TABIX is set to the index of the entry.
SY-SUBRC = 2:
An entry was read.
SY-TABIX is set to the index of the entry. This return code can only occur when you use the COMPARING addition. For further detauls, refer to the COMPARING section of the additions
SY-SUBRC = 4:
No entry was read.
The value of SY-TABIX depends on the table type and whether the BINARY SEARCH addition was specified.
If the table is a SORTED TABLE or a table sorted in ascending order of the type STANDARD TABLE with the BINARY SEARCH addition, SY-TABIX refers to the next-highest index.
Otherwise, SY-TABIX is undefined.
SY-SUBRC = 8:
No entry was read.
This return code only occurs with a SORTED TABLE or a STANDARD TABLE with the BINARY SEARCH addition. SY-TABIX is set to the number of all entries plus 1.
Reading records with keys
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
Reading lines with Index
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3730358411d1829f0000e829fbfe/content.htm
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:43 PM
2008 Feb 19 5:55 AM
hi
actually i know this..but i want to read data from suppose report ZREP1 by executing it through report ZREP2. i want to read internal table from ZREP1 into ZREP2.
2008 Feb 19 11:06 AM
Export the selected rows to the next program
EXPORT final TO MEMORY ID 'ABC'.
CALL TRANSACTION 'XXX'.XXX 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 final FROM MEMORY ID 'ABC'.Dont refesh the internal table final.
2008 Feb 19 10:17 AM
Hi,
May be ur problem will be solved by using the below syntax.
READ REPORT prog INTO itab [MAXIMUM WIDTH INTO wid] .
u can get the report into the internal table.
2008 Feb 19 10:51 AM
Hai,
Hope it'l b useful for u..
do a subroutine program in ur Zrep01 which has module called Reading Internal table Contents.. like Read table it_tab using key.. in your Second program Call the subroutine (Externally)
by mentioning it's program name..
2008 Feb 19 11:46 AM
Hi,
I know what are you pointing to.
the report from which you want to take out values must be an sap report which you cannot change without access key.
Am i right.
If yes then in this case you have to use user Exist or badi to fulfill your requirement.
through this you are still modifying the progam indirectly.
You add an include which you can modify urself and extract out or insert any data you need.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:44 PM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |