‎2007 Aug 16 9:15 AM
Hi experts
I am using the following query, its working ,but in debug mode it goes to dump(in smartforms).
Can anyone tell me how to change this query.
select SHKZG
ZUONR
from bseg
into (w_shkzg , w_zuonr)
where belnr = w_belnr and
SHKZG = 'S'.
endselect.
if sy-subrc = 0.
v_zuonr = w_zuonr.
endif.
Thanks in advance.
Regards
Rajaram
‎2007 Aug 16 9:20 AM
Hi,
select SHKZG
ZUONR
from bseg
into (w_shkzg , w_zuonr)
where belnr = w_belnr and
SHKZG = 'S'.
endselect.
if sy-subrc = 0. "<< You need to break-point here only and not inside the select endselect statement
v_zuonr = w_zuonr.
endif.
Whenever you are placing a debugger in the select statement you are inturrupting the normal proceeding of a predefined statement.
Generally others are re-written in ABAP but database extractions are used as it from SQL counterparts.
Therefore, system is not able to handle external breakpoint process.
aRs
‎2007 Aug 16 9:20 AM
Hi,
select SHKZG
ZUONR
from bseg
into (w_shkzg , w_zuonr)
where belnr = w_belnr and
SHKZG = 'S'.
endselect.
if sy-subrc = 0. "<< You need to break-point here only and not inside the select endselect statement
v_zuonr = w_zuonr.
endif.
Whenever you are placing a debugger in the select statement you are inturrupting the normal proceeding of a predefined statement.
Generally others are re-written in ABAP but database extractions are used as it from SQL counterparts.
Therefore, system is not able to handle external breakpoint process.
aRs
‎2007 Aug 16 9:35 AM
well since you dont do anything within your Select - Endselect loop, the question opens up why you dont use an array fetch instead or a select single.
‎2007 Aug 16 9:37 AM
Hi ,
their is no problem in ur query . Their could be some pblm in your smartform .
Can u attach the meesage displayed in short dump . With short dump you can identify the problem area .
Regards
‎2007 Aug 16 9:42 AM
Hi Rajaram.
It is better if u declare internal table to fetch the data using array fetch.
Check the code below.
data : begin of itab occurs 100,
SHKZG TYPE BSEG-SHKZG,
ZUONR TYPE BSEG-ZUONR,
end of itab.
select SHKZG
ZUONR
from bseg
into TABLE ITAB
where belnr = w_belnr and
SHKZG = 'S'.
if sy-subrc = 0.
**Here you have to use READ TABLE or LOOP .. Endloop on the ITAB
endif.
Note: Whenever you try to Debug SELECT .. ENDSELECT statement in debugging it will give short dump since it will close the Connection to DB.
<b>Reward if Helpful</b>