2012 Jul 03 7:51 AM
Hi every one,
i am using SELECT & ENDSELECT statement within LOOP & ENDLOOP.
while debugging, it fetching the data but finally i am getting short dump saying that
Invalid interruption of a database selection
can anyone help me.
Regards,
Venkat
Hi every one,
i am using SELECT & ENDSELECT statement within LOOP & ENDLOOP.
while debugging, it fetching the data but finally i am getting short dump saying that
Invalid interruption of a database selection
can anyone help me.
Regards,
Venkat
2012 Jul 03 7:54 AM
Put your code here.
Are you doing any commit in this loop?
Thanks,
Shambu
2012 Jul 03 8:09 AM
actually i am trying to upload vendor master data using bdc call transaction
and my code follows as
* Fetch all Vendors Based on Selection Critiria
select lifnr adrnr kunnr from lfa1 into table gt_lfa1 where lifnr in s_lifnr.
* Loop at
loop at gt_lfa1.
if v_gen = 'X'.
select single * from adrc where addrnumber = gt_lfa1-addrnumber.
perform refresh_variables.
perform read_general_data.
endif.
* Selecting Vendor Company Code Details
if v_cmp = 'X'.
select * from lfb1 where lifnr = gt_lfa1-lifnr .
perform refresh_variables.
perform read_company_codes.
endselect.
endif.
endloop.
perform read_company_codes.
........
here i am doing recoding to fill company code details
.....
it fetching the data perfectly but when call transaction execute it will going to short dump
regards
venkat
2012 Jul 03 8:14 AM
Instead of selecting inside the LOOP, do the select using FOR ALL ENTRIES in GT_LFA1 and use a READ statement inside the LOOP.
Thanks,
Shambu
2012 Jul 03 8:24 AM
Hi Shamu
i done the same but they require less coding i.e, no types , no internal tables and no work areas
without these how to achive ???
thanks & regards
Venkat
2012 Jul 03 8:35 AM
Hi Venkat,
Instead of writing select...end select first get the data and loop it with in a loop..end loop,while looping use parallel cursor method.For this go through this link,
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP+Code+for+Parallel+Cursor+-+Loop+Processing
2012 Jul 03 7:57 AM
Dear Venkat,
First of all using select .endselect is not recommended and using it inside the loop is not correct way of coding.
Please check the docs on best practices of programming.
With regards,
2012 Jul 03 8:02 AM
Hi there,
Many times within a select - endselect statement, if you set a breakpoint you will get this dump. This is normal to happen in debugging BUT you should be aware that statements such as commit work between select-endselect will trigger the above mentioned error all the time.
Can you avoid the select endselect statement within the loop ?
Can you select * into table and then loop and read the table ? It will be much better and correct.
Regards.
2012 Jul 03 8:09 AM
What is the debugger mode (Exclusive or Non-exclusive) ?. If you have opened the debugger in non-exclusive mode, debugging through select - endselect will generate a short dump.
See the help documentation http://help.sap.com/saphelp_nw70/helpdata/en/b8/e9fda496798f42ae1644318af6d67d/frameset.htm for more details.
Regards, Vinod
2012 Jul 03 8:20 AM
hi Naveen Srinivasa,
thanks for reply, here the thing is, instead of using stuctures,internal tables, looping and all,
he wants the result with less coding such as select and end select
that is what i am trying to do but it is going to short dump
thanks & regards
Venkat
2012 Jul 03 8:03 AM
Hi Venkat,
Can you please paste the exact dump statement you received.
Secondly, you also paste the code loop - endloop along with select endselect....
Did you try it executing again without debugging,, Probably it may occur only first time...
Select endselect many times cretes dumps during debug as it is a single logical unit...
Pleaes post back with your result.
Regards,
Venkat
2012 Jul 03 8:45 AM
hi Venkateswaran K
i tried without debugging also still have the same problem
and my error follows as
Runtime Errors : DBIF_RSQL_INVALID_
Exception : CX_SY_OPEN_SQL_DB
Short text: Invalid interruption of a database selection.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZTST" had to be terminated because it
has
come across a statement that unfortunately cannot be executed.
Unable to perform database selection fully.
2012 Jul 03 8:48 AM
Yes, You do get that dump while debugging.
I guess you would be getting dump at the start of or at the end of below select query.
select * from lfb1 where lifnr = gt_lfa1-lifnr .
perform refresh_variables.
perform read_company_codes.
endselect.
The trick to avoid dump is not to go on SELECT or ENDSELECT statement
So, if you are debugging, write your code as below:
select * from lfb1 where lifnr = gt_lfa1-lifnr .
BREAK-POINT.
perform refresh_variables.
perform read_company_codes.
BREAK-POINT.
endselect.
BREAK-POINT.
I hope you wont get dump with this.