06-05-2014 11:03 AM
Here is a Dump regarding 'Error in module RSQL of the database interface'.My program runs fine if 100 rows is getting selected from SAP Table.But for mass selection program is giving Dump. The program has dynamic selection of any SAP Table with dynamic selection ranges.I have attached below snippet code for your understanding and analysis.
Looking forward your kind support.
* Select Data from table using field symbol which points to dynamic table with packet size
SELECT *
INTO CORRESPONDING FIELDS OF TABLE <fs_table_tmp>
FROM (p_table) PACKAGE SIZE p_packet.
INSERT LINES OF <fs_table_tmp> INTO TABLE <fs_table> .
UNASSIGN <fs_table_tmp> .
ENDSELECT.
06-05-2014 11:36 AM
Hi,
Once check the fields length in your Internal table with the table from which your picking DATA.
Regards
Mahesh R
06-05-2014 11:09 AM
Hi Salmali,
Can you please attach the Dump ?
It seems that your Basis team has set the parameter so that, mass selection would not be possible. Kindly check once with your Basis team.
06-05-2014 11:14 AM
06-05-2014 11:26 AM
Hi Expert,
I am attaching DUMP.
Looking forward your kind assistance.
Regards
SP
06-05-2014 12:18 PM
Hi Salmali,
Check with basis team, they must have set parameter to restrict number of records fetched from database.
06-05-2014 11:36 AM
Hi,
Once check the fields length in your Internal table with the table from which your picking DATA.
Regards
Mahesh R
06-05-2014 11:58 AM
Hi Mahesh,
As this is dynamic internal table , I have done below steps :-
* Create Field Structure of p_table
* Delete fieldcatelog , where fieldname not matched with input range selection
* Call method cl_alv_table_create=>create_dynamic_table
* Return structure of the table.
ref_table_descr ?= cl_abap_typedescr=>describe_by_name( p_table ).
i_tabdescr[] = ref_table_descr->components[].
LOOP AT i_tabdescr INTO wa_tabdescr.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = wa_tabdescr-name .
wa_fieldcat-datatype = wa_tabdescr-type_kind.
wa_fieldcat-inttype = wa_tabdescr-type_kind.
wa_fieldcat-intlen = wa_tabdescr-length.
wa_fieldcat-decimals = wa_tabdescr-decimals.
APPEND wa_fieldcat TO i_fieldcat.
ENDLOOP.
LOOP AT i_fieldcat INTO wa_fieldcat.
READ TABLE i_field_select INTO wa_field_select WITH KEY fieldname = wa_fieldcat-fieldname.
IF sy-subrc = 0 .
"Do nothing
ELSE.
DELETE i_fieldcat .
ENDIF.
ENDLOOP.
My question is program is running smoothly for any SAP table where records not more than 200 .
WHY?
Thanks for your support
Regards
sp
06-05-2014 12:11 PM
06-05-2014 12:11 PM
Hello SP,
Try entering more than 200 records through SE16 same table.
In one of the issue I worked, the basis team restricted to max entries upto 9999.The dump was occurred if more than 9999 entries in the selection criteria.
Thanks
06-05-2014 12:24 PM
Hi Pavan,
As there might be issue regarding memory shortage ,packet size logic has been incorporated.
Regards
sp
06-05-2014 12:28 PM
Does your program dumps when reading second package ?
SELECT *
INTO CORRESPONDING FIELDS OF TABLE <fs_table_tmp>
FROM (p_table) PACKAGE SIZE p_packet.
INSERT LINES OF <fs_table_tmp> INTO TABLE <fs_table> .
UNASSIGN <fs_table_tmp>. " use REFRESH ?
ENDSELECT.
You unassigned the internal table before reading a second package of data, I suppose you wanted to refresh the temporary internal table
Regards,
Raymond
06-05-2014 12:29 PM
Hello,
As per my understanding the fields selected from the select query are not able to set in the Internal table beacuse of the type mismatch if the field structure.
Can you please check on that.
Thanks
Gaurav
06-05-2014 1:04 PM
Hi Gaurav,
I have changes the code as following . But still getting DUMP where SAP table contain records <500.For less records it's working fine.
Please help..
SELECT (i_field_select)
FROM (p_table)
APPENDING CORRESPONDING FIELDS OF TABLE <fs_table_tmp>
PACKAGE SIZE p_packet.
INSERT LINES OF <fs_table_tmp> INTO TABLE <fs_table> .
UNASSIGN <fs_table_tmp> .
ENDSELECT.
Regards
sp
06-05-2014 1:22 PM
Hello Salmali,
I think the packet size you are specifying is 500 or less.
the select query selects all the record and will place into the internal table for the first select.
You are using
UNASSIGN <fs_table_tmp> so you can not use the <fs_table_tmp>.
insetad of UNASSIGN <fs_table_tmp> i think you want to use refresh <fs_table_tmp> .
In short can you please check the following statment,
SELECT (i_field_select)
FROM (p_table)
APPENDING CORRESPONDING FIELDS OF TABLE <fs_table_tmp>
PACKAGE SIZE p_packet.
append LINES OF <fs_table_tmp> INTO TABLE <fs_table> .
Refresh <fs_table_tmp> .
ENDSELECT.
Thanks
Gaurav
06-05-2014 1:35 PM
Hi Gaurav,
Thanks for your advise. But same dump has been come . :-<
Regards
sp
06-05-2014 1:45 PM
Hello Salmali,
Are you checking in the debugger mode?
Error CX_SY_OPEN_SQL_DB comes when there is any pause between select and endselect.
one more thing use INTO in place of APPENDING.
SELECT (i_field_select)
FROM (p_table)
into CORRESPONDING FIELDS OF TABLE <fs_table_tmp>
PACKAGE SIZE p_packet.
append LINES OF <fs_table_tmp> INTO TABLE <fs_table> .
Refresh <fs_table_tmp> .
ENDSELECT.
Please let me know what is the value of p_packet.
also have you created the table <fs_table_tmp> and <fs_table> of same type . Please check
Thanks,
Gaurav
06-05-2014 2:15 PM
thats what exactly i had in mind. Why use 2 tables when 1 is good enough.
SELECT (i_field_select)
FROM (p_table)
APPENDING CORRESPONDING FIELDS OF TABLE <fs_table>
PACKAGE SIZE p_packet.
ENDSELECT.
?
06-05-2014 2:20 PM
Hello Gaurab,
If we are using the APPENDING while fetching the data from the database, if the size of selcted reocrd is large then also the statment can go into the dump, with "NO STORAGE SAPCE AVAILABLE".
Thanks
Gaurav
06-05-2014 2:29 PM
If we dont have enough memory we will get the same dump in the line "append LINES OF <fs_table_tmp> INTO TABLE <fs_table> ."
it could result in the error MEMORY_NO_MORE_PAGING because 32bit architecture has a limit of 2GB. 64bit systems dont have that limit.
06-06-2014 10:44 AM
Hello Everybody,
Thank you all so much for your support and co-operation.
I got my answer from the above discussion.Hence Closing the thread.
Regards
SP