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

CX_SY_OPEN_SQL_DB Exception dump

Former Member
0 Likes
8,163

FORM GET_DATA .

  select mard~matnr makt~maktx mard~werks mard~labst mard~insme mard~retme mard~speme mard~einme into table it_mard from mard inner join makt on mard~matnr = makt~matnr where mard~matnr in s_matnr and mard~werks in s_werks and mard~lgort in s_lgort.

ENDFORM



When am trying to retrieve data into internal table it throws the error dump saying the exception was not caught in get_data form


Please let me know how do I overcome this issue.


Thanks.


1 ACCEPTED SOLUTION
Read only

narendar_naidu
Active Participant
0 Likes
3,838

Hi Naveed,

1. Check the order of the fields(as mentioned by DEBOPRIYO)

2. If your ranges or  select-options are empty even this may cause load on the DB

   as empty ranges or select options tries to pull more number of records

3. As an alternate try using FOR ALL ENTRIES.

check the link below

regards,

8 REPLIES 8
Read only

Former Member
0 Likes
3,838

Hi,

Order of fields in select statement and that in internal table should be same. ( Otherwise use into corresponding fields of ).

Regards,

DPM

Read only

narendar_naidu
Active Participant
0 Likes
3,839

Hi Naveed,

1. Check the order of the fields(as mentioned by DEBOPRIYO)

2. If your ranges or  select-options are empty even this may cause load on the DB

   as empty ranges or select options tries to pull more number of records

3. As an alternate try using FOR ALL ENTRIES.

check the link below

regards,

Read only

0 Likes
3,838

The order of fields is correct.

Using For all entries is also causing the dump.

Reducing the range of entries causes the program to execute.

Read only

0 Likes
3,838

Hi,

Please check your types declarations!

Please paste your declarations and code here

Read only

0 Likes
3,838

types:begin of ty_mard,

   matnr type matnr,

   maktx type maktx,

   werks type werks_d,

   labst TYPE labst,

   insme TYPE insme,

   retme TYPE retme,

   speme TYPE speme,

   einme TYPE einme,

   END OF ty_mard.

Read only

0 Likes
3,838

Hi,

I have tried same select, it is working fine for me! just test the report!

tables: mard.
select-options: s_matnr for mard-matnr,
                 s_werks for mard-werks,
                 s_lgort for mard-lgort.

types:begin of ty_mard,

    matnr type matnr,

    maktx type maktx,

    werks type werks_d,

    labst type labst,

    insme type insme,

    retme type retme,

    speme type speme,

    einme type einme,

    end of ty_mard.

    data: it_mard type standard table of ty_mard.

    select mard~matnr

        makt~maktx

         mard~werks

         mard~labst

       mard~insme

         mard~retme

mard~speme

mard~einme

into  table it_mard from mard inner join makt on mard~matnr = makt~matnr where

       mard~matnr in s_matnr and

            mard~werks in s_werks and

               mard~lgort in s_lgort.

Read only

0 Likes
3,838

Include this in your program and it will throw the dump.

data:begin of wa_mara,

   matnr type matnr,

   END OF wa_mara.

   data it_mara like TABLE OF wa_mara.

INITIALIZATION.

select matnr from mara into TABLE it_mara where matnr in s_matnr.

   loop at it_mara into wa_mara.

     s_matnr-low = wa_mara-matnr.

     s_matnr-sign = 'I'.

     s_matnr-option = 'EQ'.

     append s_matnr.

     ENDLOOP.

     at selection-SCREEN output.

       loop at screen.

         if screen-name = 'S_MATNR-LOW' or screen-name = 'S_MATNR-HIGH'.

           screen-input = 0.

           MODIFY SCREEN.

           ENDIF.

         ENDLOOP.

Read only

0 Likes
3,838

Hi,

Initialization event gets triggered before the system recognizes the values of variables on the selection screen. Since values passed to s_matnr is not recognized in initalization,event,  it is fetching all the materials.

Dump is coming because system has some limitations with regards to number of entries while fetching data from database.

Regards,

DPM