Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dump regarding 'Error in module RSQL 'in dynamic internal table

Former Member
0 Likes
2,625

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,523

Hi,

   Once check the fields length in your Internal table  with the table from which your picking DATA.

Regards

Mahesh R

19 REPLIES 19
Read only

shah_viraj
Active Participant
0 Likes
2,523

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.

Read only

pavanm592
Contributor
0 Likes
2,523

Hi Salmali,

Could plase give some more dump deatils.

Regards,

Pavan

Read only

Former Member
0 Likes
2,523

Hi Expert,

I am attaching DUMP.

Looking forward your kind assistance.

Regards

SP

Read only

0 Likes
2,523

Hi Salmali,

Check with basis team, they must have set parameter to restrict number of records fetched from database.

Read only

Former Member
0 Likes
2,524

Hi,

   Once check the fields length in your Internal table  with the table from which your picking DATA.

Regards

Mahesh R

Read only

0 Likes
2,523

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

Read only

0 Likes
2,523

This message was moderated.

Read only

0 Likes
2,523

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

Read only

0 Likes
2,523

Hi Pavan,

As there might be issue regarding memory shortage ,packet size logic has been incorporated.

Regards

sp

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,523

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

Read only

Former Member
0 Likes
2,523

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

Read only

0 Likes
2,523

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

Read only

Former Member
0 Likes
2,523

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

Read only

0 Likes
2,523

Hi Gaurav,

Thanks for your advise. But same dump has been come . :-<

Regards

sp

Read only

0 Likes
2,523

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

Read only

0 Likes
2,523

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.

?

Read only

0 Likes
2,523

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

Read only

0 Likes
2,523

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.

Read only

Former Member
0 Likes
2,523

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