Oops: Sort Dump
Dear All,
i have created one program which is Oops based.
Program is based on Tree Diagram with container.
program is running successfuly, but in some cases dump is occured.
i have sending the Error Analysis:
plz. help me, i m new in Oops
**Error analysis**
Short text of error message:
Control Framework : Error processing control
Long text of error message:
Diagnosis
An error occurred when the system tried to process the commands
from the Automation Queue on the presentation server.
There are several possible reasons for this:
- The installation of the SAP GUI on the presentation server is
faulty or obsolete.
- There is an error in the application program
- There is an error in the SAPGUI or an integrated control
Procedure
1. Make sure that you have imported the appropriate Support
Package, the current kernel, and GUI patch for the release of your
system
2. Check whether the error occurs locally on one or a few PCs, or
generally on all PCs. Note whether the error only occurs for some
users, for example because of a specific Customizing setting.
If it only occurs locally, this suggests an installation problem
with the PC. Check the installation; if necessary, reinstall the
software. In the dump, search for the SY-MSGLI field, since it may
point to the cause of the error.
3. Activate the Automation Trace (in accordance with SAP Note
158985).
4.Start the transaction and continue until the screen immediately
before the dump.
5. From the System -> Utilities menu, choose Autom. Queue,
Synchronous Processing.
The status bar of the GUI displays the text:
"Automation synchron flush mode on"
6. If you now proceed with the application, the short dump will
display the ABAP call that caused the error; the Automation Trace
will contain the error on the presentation server.
7. If necessary, load the short dump and trace files on to
sapservX, so that SAP can analyze them.
Technical information about the message:
Message class....... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"SAPLOLEA" or "LOLEAU02"
"AC_SYSTEM_FLUSH"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
FUNCTION AC_SYSTEM_FLUSH .
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(CALLED_BY_SYSTEM) TYPE C OPTIONAL
*" EXCEPTIONS
*" CNTL_SYSTEM_ERROR
*" CNTL_ERROR
data: sysubrc like sy-subrc.
CALL FUNCTION 'AC_FLUSH_CALL'
EXPORTING
SYSTEM_FLUSH = 'X'
CALLED_BY_SYSTEM = CALLED_BY_SYSTEM
IMPORTING
MESSAGE_NR = sysubrc
MESSAGE_TEXT = SY-MSGLI.
sy-subrc = sysubrc.
CASE SY-SUBRC.
WHEN 0.
WHEN 1.
system_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 007 RAISING CNTL_SYSTEM_ERROR.
WHEN 2.
method_call_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
WHEN 3.
property_set_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
WHEN 4.
property_get_error
MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
WHEN OTHERS.
RAISE CNTL_ERROR.
ENDCASE.
ENDFUNCTION.
Edited by: Anshuman Singh on Nov 13, 2008 9:57 AM
Edited by: Anshuman Singh on Nov 13, 2008 9:58 AM
Hi,
ya i solved this problem.
Due to unique key for tree not generated correctly or duplicate Unique Key is Generated.
Plz check with debugger where u generate the unique key for tree.
Bye.
Similar Messages
-
Sort Dumps All Over in DEV and QAS While Applying Patches - Help Pls
Applying about 80 patches on DEV and QAS over the weekend with the "Minimize Downtime" option. I got failure at the "TEST_IMPORT" phase and tried to backout and ignore the error but now I keep getting short dumps for any tcode that I use. I can't get past short dumps.
Here is a sample of short dump that I got when I try to execute SPAM and reapply just one patch. I does not load the patch, it just generates a short dump. I opened an OSS note with SAP and they refused to consider that as high priority. Since my DEV and QAS systems are down, the developers will not have any system to work on today and there will be a lot pressure on me today. Please help.
Short Dump text below
The following syntax error occurred in the program SAPLKKBL :
"The field "GFLG_NESTED_PRINT_ON" is unknown, but there is a field with"
Error in ABAP application program.
The current ABAP program "CL_GUI_ALV_GRID===============CP" had to be
terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Please eliminate the error by performing a syntax check
(or an extended program check) on the program "SAPLKKBL ".
You can also perform the syntax check from the ABAP/4 Editor.
If the problem persists, proceed as follows:
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletionHi
Please check the following link, it may help you:
Re: Can not lanche workflow with event
Can you give me some more details like whether the patch application is complete or its hung in between? Did u tried to restart the patch application? Can you tell me what error you got while patch application in import_proper phase?
Regards
Sumit -
Getting sort Dump on select Query
Hi expert,
I m new in abap i m getting short dump on
*& Report ZREAD_ITAB *
REPORT ZREAD_ITAB .
TABLES : MARC,MARA,MAKT.
SELECT-OPTIONS S_MATNR FOR MARC-MATNR .
PARAMETER P_WERKS LIKE MARC-WERKS.
DATA T_MARC LIKE MARC OCCURS 0 WITH HEADER LINE.
DATA T_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
DATA T_MAKT LIKE MAKT OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
MBRSH LIKE MARA-MBRSH,
MEINS LIKE MARA-MEINS,
MATKL LIKE MARA-MATKL,
MAKTX LIKE MAKT-MAKTX,
SPRAS LIKE MAKT-SPRAS,
END OF ITAB.
SELECT MATNR WERKS LVORM FROM MARC INTO CORRESPONDING FIELDS OF TABLE
T_MARC WHERE MATNR IN
S_MATNR AND WERKS = P_WERKS.
IF T_MARC[] IS NOT INITIAL.
*this line)- SELECT MATNR MBRSH MEINS MATKL FROM MARA INTO T_MARA
FOR ALL ENTRIES IN T_MARC WHERE MATNR = T_MARC-MATNR.
endselect.
SELECT MATNR MAKTX SPRAS FROM MAKT INTO CORRESPONDING FIELDS OF
T_MAKT FOR ALL ENTRIES IN T_MARC WHERE MATNR =
T_MARC-MATNR.
endselect.
LOOP AT T_MARC.
READ TABLE T_MARA WITH KEY MATNR = T_MARC-MATNR.
MOVE :
T_MARC-MATNR TO ITAB-MATNR,
T_MARC-WERKS TO ITAB-WERKS.
READ TABLE T_MAKT WITH KEY MATNR = T_MARC-MATNR.
MOVE :
T_MARA-MBRSH TO ITAB-MBRSH,
T_MARA-MEINS TO ITAB-MEINS,
T_MARA-MATKL TO ITAB-MATKL,
T_MAKT-MAKTX TO ITAB-MAKTX,
T_MAKT-SPRAS TO ITAB-SPRAS.
ENDLOOP.
ELSE .
WRITE:/ 'NO DATA FOUND'.
ENDIF.
Please solve.
Regards ,
AshishHi,
In addition to above code, you need to place the mandatory check when using for all entries for checking the driver table is initial or not. If T_MARC[] IS INITIAL, all the entries from MARA will be selected.
IF NOT T_MARC[] IS INITIAL. "Mandatory check
SELECT MATNR MBRSH MEINS MATKL FROM MARA INTO CORRESPONDING FIELDS OF TABLE T_MARA
FOR ALL ENTRIES IN T_MARC WHERE MATNR = T_MARC-MATNR.
SELECT MATNR MAKTX SPRAS FROM MAKT INTO CORRESPONDING FIELDS OF TABLE T_MAKT
FOR ALL ENTRIES IN T_MARC WHERE MATNR = T_MARC-MATNR AND SPRAS = SY-LANGU.
ENDIF.
Thanks,
Vinod. -
Hi Experts
I am trying to create a sales order using BAPI FM BAPI_SALESORDER_CREATEFROMDAT1. After executing the program it shows in output screen that the sales order created and also displays the newly created sales order number. But when I want to check the order from VA03 it shows Express document "Update was terminated" received by author AAA, where AAA is login name.
I also analysis the sort dump for which the update process was terminated. I give the error details
Runtime Errors DBIF_RSQL_INVALID_REQUES
Error analysis
An invalid request was made to the SAP database interface in a statement
in which the table "KONV " was accessed.
Below are the module name and report from where the error is coming.
Function Module name RV_SALES_DOCUMENT_ADD
Program Name SAPLV45U
Include LV45UF0K
Row 26
Source code from Rruntime Error
Line SourceCde
1 *****************************************************************
2 * Unterroutinen RV-Auftragsabwicklung alphabetisch sortiert:
3 * ----------------------------------------------------------
4 * Buchstabe K:
5 *
6 *****************************************************************
7
8 *----------------------------------------------------------------
9 * FORM KONV_BEARBEITEN
10 *----------------------------------------------------------------
11 FORM KONV_BEARBEITEN.
12
13 CHECK: FKONV_GEAENDERT NE SPACE OR
14 VORGANG = CHARH.
15
16 IF VORGANG NE 'H'.
17 DELETE FROM KONV WHERE KNUMV = VBAK-KNUMV.
18 ENHANCEMENT-POINT KONV_BEARBEITEN_10 SPOTS ES_SAPLV45U.
19 ENDIF.
20
21 LOOP AT FXKOMV.
22 FXKOMV-MANDT = VBAK-MANDT.
23 FXKOMV-KNUMV = VBAK-KNUMV.
24 MODIFY FXKOMV.
25 ENDLOOP.
>>>>> INSERT KONV FROM TABLE FXKOMV.
27 IF SY-SUBRC NE 0.
28 MESSAGE A100 WITH
29 ENDIF.
30
31 ENHANCEMENT-POINT KONV
32 ENDFORM.
33 *eject
Below is my source code.
*& Report Z_BAPI_SALESORDER
REPORT z_bapi_salesorder.
* Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
* Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr.
SELECTION-SCREEN END OF LINE.
SKIP 1.
* Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE dzmengc OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF LINE.
* Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapiitemin OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapireturn1 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapisdhedu
WITH HEADER LINE.
* Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
* Start-of-selection.
START-OF-SELECTION.
* Header data
* Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
* Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
* Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
* Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
* Partner data
* Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
* Ship to
partner-partn_role = 'WB'.
partner-partn_numb = p_ship.
APPEND partner.
* ITEM DATA
itemx-updateflag = 'I'.
* Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
* Material
item-material = p_matnr.
itemx-material = 'X'.
* Plant
item-plant = p_plant.
itemx-plant = 'X'.
* Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
* Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
* Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
order_header_in = header
* WITHOUT_COMMIT = ' '
* CONVERT_PARVW_AUART = ' '
IMPORTING
salesdocument = v_vbeln
* SOLD_TO_PARTY =
* SHIP_TO_PARTY =
* BILLING_PARTY =
* RETURN =
TABLES
order_items_in = item
order_partners = partner
* ORDER_ITEMS_OUT =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CCARD =
* ORDER_CFGS_BLOB =
order_schedule_ex = lt_schedules_in
* Check the return table.
IF v_vbeln <> space.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'Document ', v_vbeln, ' created'.
ELSE.
WRITE: / 'Error in creating document'.
ENDIF.
I am unable to trace the exact reason. Please help and thanks in advance.
Edited by: Joy Banerjee on Oct 12, 2009 7:47 AMHi Prashant,
Set the profile parameter abap/buffersize value to maximum.Get the virtual memory increased.
If it doesn't work, see in transaction db02 if there is sufficient tablespace.
Let me knoe the status of tablespaces.
Regards,
Sabita -
Runtime error SAPSQL_ARRAY_INSERT_DUPREC during migo
Hi Friends,
When I try doing MIGO with reference to a PO and save the document it gives me runtime error SAPSQL_ARRAY_INSERT_DUPREC.
I have check the buffer, and the no. range everything is perfect, but still i am getting this error.
Can anyone please give me the possible solution for this. Is there any SAP note that I need to apply.
Regards,
Wasim.Hello Wasim,
The common cause of this termination is the material document
number range as per note 31793 - SAPSQL_ARRAY_INSERT_DUPREC.
So please check if the current numbers are synchronized with the
database tables:
OMBT trx x MKPF table
OMH6 trx x EKKO table
If it has the same number range the sort dump should not be raised
anymore.
The main root causes are:
-> when you are transporting number ranges from one client to another;
-> when you face a shut down in your system and you have defined a
buffer application server tolerance in transaction SNRO;
-> when you are doing the posting by using BAPI's and for some reason
the BAPI failed.
I hope it helps you.
Best Regards,
Fábio Almeida
MM Consultant -
Slow execution, flickering graphics, and too many threads, oh my!
i wrote a little game called Aim, Fire! just to screw around.
its immense complexity involves shooting little targets that fly across the screen.
you can see it at http://www.brianmaissy.com/applets/aimfire
i made a class representing a target that paints itself and is its own thread.
its kinda nifty in a OOP sort of way: all i have to do is instantiate a target; and it takes care of the rest, notifying the driver program of anything important (like it getting shot)
the problem, however, is the speed changes significantly depending on how many targets are active, and the graphics are very flickery.
i think the problem may be that having multiple threads is slow.
i also tried buffering my graphics but it didnt work very well.
however that may just be because i did it wrong.
in fact i probably did a lot of things wrong - please notify me of anything you see that i did badly
so tell me what you think about the design of the program, and any suggestions you have to restructure it. would i do better just to stick everything in one thread, or even all in one class?
thanks very much!
here is the code: (also found at http://www.brianmaissy.com/applets/aimfire/aimFire/AimFire.java and http://www.brianmaissy.com/applets/aimfire/aimFire/Target.java)
package aimFire;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Event;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Random;
public class AimFire extends Applet{
public static final int SPEED_CONSTANT = 500;
public static final int MIN_X = 0;
public static final int MIN_Y = 21;
public static final int MAX_X = 399;
public static final int MAX_Y = 399;
Image ammoImage;
private Random rand;
private static final int CLIP = 10;
private static final int TOTAL_TARGETS = 20;
private int toBeAdded;
private ArrayList<Target> targets;
private int targetsKilled;
private int ammo;
private int score;
private boolean gameActive;
public void init(){
setSize(400, 400);
setBackground(Color.black);
setCursor(getToolkit().createCustomCursor(getImage(this.getClass().getResource("crosshair.gif")), new Point(16, 16), "crosshair"));
ammoImage = getImage(this.getClass().getResource("ammo.gif"));
rand = new Random();
ammo = CLIP;
score = 0;
gameActive = true;
targetsKilled = 0;
toBeAdded = TOTAL_TARGETS;
targets = new ArrayList<Target>();
sendRandom();
sendRandom();
public boolean mouseDown(Event e, int x, int y){
if(gameActive && ammo > 0){
ammo--;
for(int count = 0; count < targets.size(); count++){
score += targets.get(count).hit(x, y);
repaint();
return true;
public boolean keyDown(Event e, int key){
if((char)key == ' ' && gameActive){
ammo = CLIP;
repaint();
return true;
private void sendRandom(){
toBeAdded--;
Target t = new Target(this, getGraphics(), rand);
targets.add(t);
new Thread(t).start();
repaint();
public void notifyOfDeath(Target t){
targetsKilled++;
targets.remove(t);
if(toBeAdded > 0){
sendRandom();
if(targets.size()==0){
gameActive = false;
repaint();
public void paint(Graphics g){
g.setColor(Color.gray);
g.drawLine(0, 20, 399, 20);
for(int count = 0; count < ammo; count++){
g.drawImage(ammoImage, count*10 + 3, 3, this);
if(ammo == 0){
g.drawString("press space to reload", 3, 13);
g.drawString("Targets: " + targetsKilled + "/" + TOTAL_TARGETS, 230, 13);
g.drawString("Score: " + score, 340, 13);
if(!gameActive){
g.setColor(Color.gray);
g.drawString("Game Over", 170, 200);
g.drawString("Score: " + score, 170, 230);
package aimFire;
import java.awt.Color;
import java.awt.Graphics;
import java.util.Random;
public class Target implements Runnable{
private AimFire a;
private Graphics g;
private int radius;
private int xLocation;
private int yLocation;
private int xDirection;
private int yDirection;
private int xSpeed;
private int ySpeed;
public Target(AimFire driver, Graphics graphics, Random rand){
this(driver, graphics, 3*(rand.nextInt(9)+ 2), rand.nextInt(1 + AimFire.MAX_X - 60) + 30 + AimFire.MIN_X, rand.nextInt(1 + AimFire.MAX_Y - 60 - AimFire.MIN_Y) + 30 + AimFire.MIN_Y, rand.nextInt(3)-1, rand.nextInt(3)-1, rand.nextInt(5)+1, rand.nextInt(5)+1);
if(xDirection == 0 && yDirection == 0){
if(rand.nextInt(2)==0){
if(rand.nextInt(2)==0){
xDirection = 1;
}else{
xDirection = -1;
}else{
if(rand.nextInt(2)==0){
yDirection = 1;
}else{
yDirection = -1;
public Target(AimFire driver, Graphics graphics, int r, int x, int y, int xDir, int yDir, int xSp, int ySp){
a = driver;
g = graphics;
radius = r;
xLocation = x;
yLocation = y;
xDirection = xDir;
yDirection = yDir;
xSpeed = xSp;
ySpeed = ySp;
public void run() {
if(g!=null){
paint();
int count = 1;
while(xLocation >= AimFire.MIN_X && xLocation <= AimFire.MAX_X && yLocation >= AimFire.MIN_Y && yLocation <= AimFire.MAX_Y){
unpaint();
if(count % (AimFire.SPEED_CONSTANT/xSpeed) == 0){
xLocation += xDirection;
if(count % (AimFire.SPEED_CONSTANT/ySpeed) == 0){
yLocation += yDirection;
paint();
count++;
unpaint();
a.notifyOfDeath(this);
public int hit(int x, int y){
if(Math.abs(x - xLocation) < radius/3 && Math.abs(y - yLocation) < radius/3){
xLocation = -99;
return 3;
}else if(Math.abs(x - xLocation) < 2*radius/3 && Math.abs(y - yLocation) < 2*radius/3){
xLocation = -99;
return 2;
}else if(Math.abs(x - xLocation) < radius && Math.abs(y - yLocation) < radius){
xLocation = -99;
return 1;
}else{
return 0;
private void paint(){
g.setColor(Color.red);
g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
g.setColor(Color.white);
g.fillOval(xLocation-2*radius/3, yLocation-2*radius/3, 4*radius/3, 4*radius/3);
g.setColor(Color.red);
g.fillOval(xLocation-radius/3, yLocation-radius/3, 2*radius/3, 2*radius/3);
private void unpaint(){
g.setColor(Color.black);
g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
}i wrote a little game called Aim, Fire! just to screw around.
its immense complexity involves shooting little targets that fly across the screen.
you can see it at http://www.brianmaissy.com/applets/aimfire
i made a class representing a target that paints itself and is its own thread.
its kinda nifty in a OOP sort of way: all i have to do is instantiate a target; and it takes care of the rest, notifying the driver program of anything important (like it getting shot)
the problem, however, is the speed changes significantly depending on how many targets are active, and the graphics are very flickery.
i think the problem may be that having multiple threads is slow.
i also tried buffering my graphics but it didnt work very well.
however that may just be because i did it wrong.
in fact i probably did a lot of things wrong - please notify me of anything you see that i did badly
so tell me what you think about the design of the program, and any suggestions you have to restructure it. would i do better just to stick everything in one thread, or even all in one class?
thanks very much!
here is the code: (also found at http://www.brianmaissy.com/applets/aimfire/aimFire/AimFire.java and http://www.brianmaissy.com/applets/aimfire/aimFire/Target.java)
package aimFire;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Event;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Random;
public class AimFire extends Applet{
public static final int SPEED_CONSTANT = 500;
public static final int MIN_X = 0;
public static final int MIN_Y = 21;
public static final int MAX_X = 399;
public static final int MAX_Y = 399;
Image ammoImage;
private Random rand;
private static final int CLIP = 10;
private static final int TOTAL_TARGETS = 20;
private int toBeAdded;
private ArrayList<Target> targets;
private int targetsKilled;
private int ammo;
private int score;
private boolean gameActive;
public void init(){
setSize(400, 400);
setBackground(Color.black);
setCursor(getToolkit().createCustomCursor(getImage(this.getClass().getResource("crosshair.gif")), new Point(16, 16), "crosshair"));
ammoImage = getImage(this.getClass().getResource("ammo.gif"));
rand = new Random();
ammo = CLIP;
score = 0;
gameActive = true;
targetsKilled = 0;
toBeAdded = TOTAL_TARGETS;
targets = new ArrayList<Target>();
sendRandom();
sendRandom();
public boolean mouseDown(Event e, int x, int y){
if(gameActive && ammo > 0){
ammo--;
for(int count = 0; count < targets.size(); count++){
score += targets.get(count).hit(x, y);
repaint();
return true;
public boolean keyDown(Event e, int key){
if((char)key == ' ' && gameActive){
ammo = CLIP;
repaint();
return true;
private void sendRandom(){
toBeAdded--;
Target t = new Target(this, getGraphics(), rand);
targets.add(t);
new Thread(t).start();
repaint();
public void notifyOfDeath(Target t){
targetsKilled++;
targets.remove(t);
if(toBeAdded > 0){
sendRandom();
if(targets.size()==0){
gameActive = false;
repaint();
public void paint(Graphics g){
g.setColor(Color.gray);
g.drawLine(0, 20, 399, 20);
for(int count = 0; count < ammo; count++){
g.drawImage(ammoImage, count*10 + 3, 3, this);
if(ammo == 0){
g.drawString("press space to reload", 3, 13);
g.drawString("Targets: " + targetsKilled + "/" + TOTAL_TARGETS, 230, 13);
g.drawString("Score: " + score, 340, 13);
if(!gameActive){
g.setColor(Color.gray);
g.drawString("Game Over", 170, 200);
g.drawString("Score: " + score, 170, 230);
package aimFire;
import java.awt.Color;
import java.awt.Graphics;
import java.util.Random;
public class Target implements Runnable{
private AimFire a;
private Graphics g;
private int radius;
private int xLocation;
private int yLocation;
private int xDirection;
private int yDirection;
private int xSpeed;
private int ySpeed;
public Target(AimFire driver, Graphics graphics, Random rand){
this(driver, graphics, 3*(rand.nextInt(9)+ 2), rand.nextInt(1 + AimFire.MAX_X - 60) + 30 + AimFire.MIN_X, rand.nextInt(1 + AimFire.MAX_Y - 60 - AimFire.MIN_Y) + 30 + AimFire.MIN_Y, rand.nextInt(3)-1, rand.nextInt(3)-1, rand.nextInt(5)+1, rand.nextInt(5)+1);
if(xDirection == 0 && yDirection == 0){
if(rand.nextInt(2)==0){
if(rand.nextInt(2)==0){
xDirection = 1;
}else{
xDirection = -1;
}else{
if(rand.nextInt(2)==0){
yDirection = 1;
}else{
yDirection = -1;
public Target(AimFire driver, Graphics graphics, int r, int x, int y, int xDir, int yDir, int xSp, int ySp){
a = driver;
g = graphics;
radius = r;
xLocation = x;
yLocation = y;
xDirection = xDir;
yDirection = yDir;
xSpeed = xSp;
ySpeed = ySp;
public void run() {
if(g!=null){
paint();
int count = 1;
while(xLocation >= AimFire.MIN_X && xLocation <= AimFire.MAX_X && yLocation >= AimFire.MIN_Y && yLocation <= AimFire.MAX_Y){
unpaint();
if(count % (AimFire.SPEED_CONSTANT/xSpeed) == 0){
xLocation += xDirection;
if(count % (AimFire.SPEED_CONSTANT/ySpeed) == 0){
yLocation += yDirection;
paint();
count++;
unpaint();
a.notifyOfDeath(this);
public int hit(int x, int y){
if(Math.abs(x - xLocation) < radius/3 && Math.abs(y - yLocation) < radius/3){
xLocation = -99;
return 3;
}else if(Math.abs(x - xLocation) < 2*radius/3 && Math.abs(y - yLocation) < 2*radius/3){
xLocation = -99;
return 2;
}else if(Math.abs(x - xLocation) < radius && Math.abs(y - yLocation) < radius){
xLocation = -99;
return 1;
}else{
return 0;
private void paint(){
g.setColor(Color.red);
g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
g.setColor(Color.white);
g.fillOval(xLocation-2*radius/3, yLocation-2*radius/3, 4*radius/3, 4*radius/3);
g.setColor(Color.red);
g.fillOval(xLocation-radius/3, yLocation-radius/3, 2*radius/3, 2*radius/3);
private void unpaint(){
g.setColor(Color.black);
g.fillOval(xLocation-radius, yLocation-radius, 2*radius, 2*radius);
} -
Info IDoc : sent, not arrived ; Error passing data to port
Hi Folks,
While I am loading the data from R/3 I am facing the following error in Production..
Info IDoc 2 : sent, not arrived ; Error passing data to port
when I checked in SM59 every thing seems fine like RFC test connection and authorization check
In BW is check the Source system saying it is Ok.
Only the thing I found here is in TRFC, it is error when opening RFC Connection.
but it is different in SM59 saying every thing is ok, as said above..
Please help me in this regard
thanks masters
DJSrinivas,
Thanks for your prompt reply..
user : ALEREMOTE and password are fine..
As told I check st22 and sm21 in both sytems, no sort dumps I found..
Please help me its an urgent..
thanks
DJ
Message was edited by:
Jangareddy dasari -
IMPORT_DECOMPRESS_FAILED
Hi When I try to run PPOCW its giving Dump. So based on
Debugging I have change LTDX table entry for my id means I have copy
from other system. Now Problem is that I am unable to run PPO** transction. I also modified
table again but its not solving plz check sort dump text.
Runtime Errors IMPORT_DECOMPRESS_FAILED
Exception CX_SY_COMPRESSION_ERROR
Date and Time 18.03.2011 14:42:04
Error when decompressing during IMPORT.
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_HROM_FAVORITE_MANAGER======CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
METHOD recover.
DATA: ltdxkey TYPE ltdxkey.
CALL METHOD me->combine_favorites_key
IMPORTING ltdxkey = ltdxkey.
CATCH SYSTEM-EXCEPTIONS import_mismatch_errors = 4
others = 8.
IMPORT my_oo_favorites = me->favorites
FROM DATABASE ltdx(rh) ID ltdxkey.
ENDCATCH.
IF sy-subrc 0.
EXIT.
ENDIF.
>>>>>SORT me->favorites BY favorite_text AS TEXT seqnr.
ENDMETHOD.Thinking the monikeys are getting duplicated in your system. what version you are on?
take a look at OSS 1064524
Cheers
Amit -
MD Attribute Data Loading Issue.
Hi Experts,
I am trying to load a Master data Attribute and it is giving a peculiar error msg:[Data Package 1 : arrived in BW ; Processing : Selected number does not agree with transferred n].
The data source is a business Content data source (0CACONT_ACC_ATTR)
Recently I made a few changes to the data source we added a few more fields. The load was successful in the Development system. But is giving an error in BWQ. I followed the steps of correctly transporting the data source first and then replicating the data source in BW and then transporting the new objects tansfer rules and communication structure etc. Could anyone help me with this issue.
Thanks
Sandhya.Hi Sidhartha,
This only a Master data Attribute Data Source. I checked the Data source and Info Source and Info Package mapping is okay.
The Details Tab of the MOnitor shows this under the option: Transfer (IDocs and TRFC): Missing messages or warnings
Data Package 1 : arrived in BW ; Processing : Selected number does not agree with transferred n
When I check SM21. This is the error msg I get.
TCode: RSA1
MNo: Q01
Text:Operating system call gethostbyaddr failed (error no. 0 )
Reading:
Number of Records Read: 2777
Number of Records Selected: 1
When I double click on Q01. I can see user name, task, terminal etc.
and also
Module name......... niuxi.c
Line................ 437#
Error text.......... gethostbyaddr 0
Caller.............. NiPGetH
Reason/called....... gethost
There is no Sort Dumps in ST22 in my user name. -
Short Dump While Changing Non-KeyField of Sorted Table
Hello,
A short dump occurs while trying to change a field of a sorted table item passed as CHANGING parameter. Are non-key fields in a sorted structure protected? The error message does not explicitely say so. Can anyone link to documentation explaining this behavior?
best regards,
JNNYou are passing by reference with CHANGING.
It looks like read-only stuff can't be passed to method CHANGING.
When I pass a literal or constant, there is a syntax error.
System could have given you a syntax error instead of dump.
Have a look at this snippet. Both method calls throw syntax error.
CLASS mainclass DEFINITION.
PUBLIC SECTION.
CLASS-METHODS main.
PRIVATE SECTION.
CLASS-METHODS passref CHANGING cv_test TYPE i.
ENDCLASS. "mainclass DEFINITION
CLASS mainclass IMPLEMENTATION.
METHOD main.
"pass literal by ref
passref(
CHANGING
cv_test = '2'
"pass constant by ref
CONSTANTS lc_test TYPE i VALUE 1.
passref(
CHANGING
cv_test = lc_test
ENDMETHOD. "main
METHOD passref.
"nothing
ENDMETHOD. "passref
ENDCLASS. "mainclass IMPLEMENTATION
START-OF-SELECTION.
mainclass=>main( ). -
In alv , dump occurs , while sorting the alv .
Hi,
In Alv , sorting is working fine before we selecting a row . After seleting the row , if we are sorting it is going to dump .
Dump Message:
The following error text was processed in the system xxx : Adapter error in &VIEW_ELEMENT_TYPE& "OJTXP" of view "Zzzzz.VW_TEST": Context binding of property TEXT cannot be resolved: Lead selection not set for context node VW_TEST.1.ALV_TRF_DET
The error occurred on the application server plmdev_PLD_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP
Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
How to resolve this error ?.
Regars,
Rani.Do you have child node under the context node that is bound to the ALV? This is generally the most common cause of such an error. Structures such as this are not supported for the reasons supplied in this help link:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/42/b9ea094f4a3118e10000000a1553f7/frameset.htm
Be sure and read the section "Important Exception: Sorting" -
Hi All,
Greetings for the Day!!!
am using alv oops for displaying output..
BEFORE sorting my internal table looks like below in the output.....
for example
A
B
C
D
E
F
AFTER sorting the internal table in the output .display.,, the internal table shows like below
F
E
D
C
B
A
but when i call the method set_table_for_first_display ,after sorting the in the output display ....,the internal table remains as like before
A
B
C
D
E
F....
it should be lke
F
E
D
C
B
A .....
kindly suggest me the alternatives.pls
Regards
JackFor example....
DATA: lo_alv_grid TYPE REF TO cl_gui_alv_grid.
DATA: lo_form_alv_container TYPE REF TO cl_gui_custom_container.
* Create Controls
IF lo_form_alv_container IS INITIAL. "<-- Check if already created
CREATE OBJECT lo_form_alv_container
EXPORTING
container_name = 'FORMULA_CONTAINER'.
* Create control based ALV grid
CREATE OBJECT lo_alv_grid
EXPORTING
i_parent = lo_form_alv_container.
* set for first display
lo_alv_grid->set_table_for_first_display(
EXPORTING
is_layout = ls_layout
it_toolbar_excluding = lt_exclude
CHANGING
it_outtab = lt_formulas[]
it_fieldcatalog = lt_fieldcat[] ).
ELSE.
lo_alv_grid->refresh_table_display( ). "<-- If so, just refresh
ENDIF.
Regards,
Rich Heilman -
If i run oops alv in background, its going dump
If I run oops alv in background its going dump?
can any one suggest me to do this or to overcome
thanks and regards
settyALV's can be run in background if you use a docking container instead of a custom container.
Please search the forum for "ALV in background". You will find tons of threads with solutions.
Re: How to run ALV reports in batch
Sample code to have ALV Grid in Background -
Hi,
While i create a report with grid display with oops ALV using custom container, its giving short dump..
DUMP: CNTL ERROR ouccured..Hi Phani,
Make sure you have done below things correctly.
While creating a container control in SE51, make sure you have given a name to it in the attributes & use the same name in the ABAP code with data declaration as below:
Suppose you have named the container control in SE51 as CC_CONTAINER
DATA :
g_Container TYPE scrfname VALUE 'CC_CONTAINER',
g_Custom_Container TYPE REF TO CL_GUI_CUSTOM_CONTAINER
g_Grid TYPE REF TO CL_GUI_ALV_GRID.
Also first create a CONTAINER object with reference to container name in the screen & then Create GRID object with reference to parent name
IF g_Custom_Container IS INITIAL.
CREATE OBJECT g_Custom_Container EXPORTING CONTAINER_NAME = g_Container.
CREATE OBJECT g_Grid EXPORTING I_PARENT = g_Custom_Container.
& Finally called method Set table for display for Grid as below :
" SET_TABLE_FOR_FIRST_DISPLAY
CALL METHOD g_Grid->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
Also make sure that you have activated the code in PBO & PAI in SE51.
With these it shouldnt give the above error.
Hope this helps.
Regards
Abhii -
Hi
Can you have 'selective sorting' in a single ALV OOPS grid?
like i want only some specific rows to be sorted based on a condition.
Any ideas?
Thanks
PushprajProblem Solved.
Thanks
Pushpraj
Maybe you are looking for
-
Is it possible to swap the JServ engine (supports Java Servlet 1.1) that comes with 9iAS with Apache's Tomcat v3.1.2 (which supports Java Servlet 2.2 and JSP 1.1)? Has this been tested or certified by Oracle?
-
people who i know who have webcams, have the icons. other people, have the webcam icon, and say they don't have one. is this possible, or just bs? lol. just seeking a little clarification on this topic. thanks. macbook Mac OS X (10.4.3)
-
Hello All. i am a functional guy but my abaper is having trouble to fix this so i am asking this here if anyone had done this. We have developed a Pension report which Picks /102 for CRT and RT table like Reconcilliation report but, when u ran recon
-
Varchar to Datetime conversion and selecting latest datead records
Hi: I've a table as below: ActionDate|Status|Name 23/10/2012|Block|James 24/10/2012|Open|James 25/10/2012|Block|James 20/09/2012|Block|Tanya 17/09/2012|Block|Fox 18/09/2012|Open|Fox 27/08/2012|Block|Martin 27/08/2012|Open|Martin Desired Output is as
-
Scroll gesture moves drawbars with no effect?
After using Mainstage 2 for a while and then installing Mainstage 3 I was frustrated to find that the 2 finger scrolling gesture will move the drawbars in the Vintage B3 interface without changing the setting. This is not the case in the original EB3