2007 May 09 7:20 AM
Hi,
Iam getting dump when my select statement is fetching lots of records.
iam selection from PA0105 which contains some lakhs of records.
and all the records needs to be selected from this table.
so how do i avoid dump.
if i use packet size of 10,000 records then how will i seelct the rest of the records.
can some please give me some sample code for this .
iam sending my code which i have written.
LOOP AT t_dd03l INTO w_dd03l.
REFRESH T_FIELDCAT[].
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = w_dd03l-tabname
CHANGING
ct_fieldcat = t_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fieldcat
IMPORTING
ep_table = t_new_table.
ASSIGN t_new_table->* TO <l_fs_dyn_table>.
Create dynamic work area and assign to FS
CREATE DATA w_newline LIKE LINE OF <l_fs_dyn_table>.
ASSIGN w_newline->* TO <l_fs_dyn_wa>.
*Select data from the dynamic table
g_table = w_dd03l-tabname .
IF NOT t_pa0001[] IS INITIAL.
SELECT * FROM (g_table)
INTO CORRESPONDING FIELDS OF TABLE <l_fs_dyn_table>
package size 10,000
FOR ALL ENTRIES IN t_pa0001
WHERE pernr = t_pa0001-pernr.
*Download data in infotype
PERFORM download_infotype_data USING <l_fs_dyn_table>.
ENDLOOP.
2007 May 09 9:39 AM
hi neha.
just in select statement , u have to use packet size multiple times.
so that what ever datas necessary u can store under package.
try this. if any problem u face then again contact us.
Hi,
Iam getting dump when my select statement is fetching lots of records.
iam selection from PA0105 which contains some lakhs of records.
and all the records needs to be selected from this table.
so how do i avoid dump.
if i use packet size of 10,000 records then how will i seelct the rest of the records.
can some please give me some sample code for this .
iam sending my code which i have written.
LOOP AT t_dd03l INTO w_dd03l.
REFRESH T_FIELDCAT[].
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = w_dd03l-tabname
CHANGING
ct_fieldcat = t_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fieldcat
IMPORTING
ep_table = t_new_table.
ASSIGN t_new_table->* TO <l_fs_dyn_table>.
Create dynamic work area and assign to FS
CREATE DATA w_newline LIKE LINE OF <l_fs_dyn_table>.
ASSIGN w_newline->* TO <l_fs_dyn_wa>.
*Select data from the dynamic table
g_table = w_dd03l-tabname .
IF NOT t_pa0001[] IS INITIAL.
SELECT * FROM (g_table)
INTO CORRESPONDING FIELDS OF TABLE <l_fs_dyn_table>
package size 10,000
FOR ALL ENTRIES IN t_pa0001
WHERE pernr = t_pa0001-pernr.
*Download data in infotype
PERFORM download_infotype_data USING <l_fs_dyn_table>.
ENDLOOP.
2007 May 09 9:39 AM
hi neha.
just in select statement , u have to use packet size multiple times.
so that what ever datas necessary u can store under package.
try this. if any problem u face then again contact us.
2007 May 09 10:00 AM
Hello Neha
Try to use the following version of the SELECT statement:
SELECT * FROM (g_table)
APPENDING INTO CORRESPONDING FIELDS OF TABLE <l_fs_dyn_table>
PACKAGE SIZE 1000 " perhaps reduce this number
FOR ALL ENTRIES IN t_pa0001
WHERE pernr = t_pa0001-pernr.
ENDSELECT.Regards
Uwe
2007 May 09 10:00 AM
HI Neha ,
You can divide data selection part from SQL query into smaller modules .
First select 1000 entries and store it into internal table .
Inthe next 1000 entries are fetched again and appended to this internal table.
so on..
I thinks this helps
Note: Reward if it helps
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |