‎2014 Feb 01 9:12 AM
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.
‎2014 Feb 01 11:10 AM
‎2014 Feb 01 9:45 AM
Hi,
Order of fields in select statement and that in internal table should be same. ( Otherwise use into corresponding fields of ).
Regards,
DPM
‎2014 Feb 01 11:10 AM
‎2014 Feb 01 1:44 PM
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.
‎2014 Feb 01 1:54 PM
Hi,
Please check your types declarations!
Please paste your declarations and code here
‎2014 Feb 01 1:57 PM
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.
‎2014 Feb 01 2:11 PM
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.
‎2014 Feb 01 3:09 PM
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.
‎2014 Feb 02 3:07 AM
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