Plz help in object oriented report
Hi experts ,
i have a report in which i am fetching data from som tables and applying some checks to get desired data and finally displaying the data in an ALV .
not i want to convert this whole thing into Object oriented approach .
plz guide me how i can do it .
please give me any example code of this type of report
thanx in advance
hi use this example.
*& Report ZKN_ALV_GRID *
REPORT zkn_alv_grid .
DATA itab_saplane TYPE TABLE OF saplane.
DATA: r_container TYPE REF TO cl_gui_custom_container,
r_grid TYPE REF TO cl_gui_alv_grid.
START-OF-SELECTION.
SELECT * FROM saplane INTO TABLE itab_saplane.
CALL SCREEN 100.
*& Module create_control OUTPUT
text
MODULE create_control OUTPUT.
CHECK r_container IS INITIAL.
CREATE OBJECT r_container
EXPORTING
container_name = 'CONTAINER_1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CREATE OBJECT r_grid
EXPORTING
i_parent = r_container
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL METHOD r_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SAPLANE'
CHANGING
it_outtab = itab_saplane
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " create_control OUTPUT
reward if useful.
Similar Messages
-
Help with object oriented concepts
I am a senior highschool student and although I know Java syntax, I learned with Pascal and other procedural languages so I have a difficult time thinking in OOP concepts (which I will have to learn for college classes). So for practice I went to my college's website and found an assignment on the intro course to programming: [Here are the assignment instructions.|http://www.cs.gsu.edu/knguyen/teaching/2009/spring/csc2010/proj.pdf]
My question is, how can I make my program illustrate more object oriented concepts?
Links:
ode-help.110mb.com/javaproject.java_Just a few comments (not necessarily about OO and in no particular order):
It's probably not worth it to make constants for the letter A or the plus sign. Make constants for values people would not understand:
// Ok
public static final int ANSWER_TO_THE_UNIVERSE = 42;'
// Probably overkill
public static final int FORTY_TWO = 42;
Good job on having DecimalFormat as a regular instance variable rather than static (since it is not thread-safe)
Good job initializing your object in a consistent state (via the ctor). Now, make as many variables final as you can. Immutable objects are good:[www.javapractices.com/topic/TopicAction.do?Id=29]
Not sure why you declared repeat() to return the boxed version of boolean, just use a primitive
You have a run() method but are not implementing Runnable. Not that it is required, but usually when I see run(), I think of threading
This is a matter of style, but you don't need to name the arguments in the ctor differently than the instance variables that get assigned. You can very easily say:
// Note that it is final. Make things immutable when you can.
private final String bar;
public Foo(final String bar) {
// Note: I don't need a different name here. This is purely a matter of personal style.
this.bar = bar;
Consider a while loop in run() rather than a do-loop. What happens if you get no input the first time around?
Java naming conventions dictate that classes start with a capital letter. Generally, an underscore is not used, camel-case is. So, your class should be JavaProject.
Consider making an object for the arguments that are passed into input. Maybe call it GradeCategory, or whatever.
That new object GradeCategory can have the output() method.
For method names, also follow conventions using camel case. So get_double should be getDouble().
Consider reworking such that you use an array or a collection of GradeCategory. You might want to then have an add method in your JavaProject. The add method should ensure the total weight of grades does not exceed 100%.
You can rework the output method of JavaProject to iterate over your GradeCategory objects, calling their own output() methods. Perhaps it also first checks that the weight of all grades equals 100%.Just a few thoughts.
- Saish -
Plz help in calling of reports from Form in browser
Hi!
I am using 9iAS(1.0.2.2.1) + 8.1.7 database on the same machine with Win NT4.When i invoke report from my system's main form(oracle form6i) using parameter list as Run_Product(reports,'..\iReports\glrxx13.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null); against a when-button-pressed trigger error raised
"Error:0110 Unable to open the report '..\iReports\glrxx13.rep"
"Error:...Error while opening or saving a ducument '..\iReports\glrxx13.rep".
My Reports are in folder "iReports" which i put in the 9iAS's report60 folder & also in the report60 folder too. I dont know more about virtual dirves mapping & environment variables setting i.e what & where these should be put.
Kindly help!
Many thankshello,
their are only two ways of passing the report-name: only the name or the complete path (where path is the PHYSICAL path of the file).
the easiest way is, if you add all directories where you have RDFs in that you want to run, to the REPORTS60_PATH of your server environment. then you can simply use REPx.RDF and it will be run as long as it is somewhere along the reports path.
regards,
the oracle reports team -
Plz Help me in converting reports 6.x to 10.x
Hi everyone,
I am new to oracle reports.In our organization we had some some reports which were build on repots 6.x .But now they need to convert to reports 10g.
the old oracle reports 6.x run on oracle database 8.x and they upgraded the database to 10g(with some changes in the database table structures).May be only minor changes.I have .RDF file of the old reports
i have these following question.
1. do i have to build the whole reports from the scratch.
2. Is it possible to take the old .rdf file and do some changes in the datamodel(because there are some changes from the old database tables to the new databasetables).
please give me some suggestion regarding how to start(do i have to build it from the scratch or can i use those old .rdf files).
Thanks in advance
phaniHello,
http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwintro/migrate/mi_upgrd2_5.htm
Upgrading from prior releases
Beginning with Oracle Reports Developer Release 2.5, there is no upgrade necessary: reports can be opened by any later Oracle Reports release.
So, just open the RDF in the Reports Buidler 10g and modify the data model / PL/SQL code if necessary
Regards -
Can anyone give me document to devlop alv report in object oriented
hi
hi i want document how to devlope alv report in object oriented.
i need document .
thanks .HI,
Check these programs and links.
OOPS ALV standard pgms
BCALV_EDIT_01
BCALV_EDIT_02
BCALV_EDIT_03
BCALV_EDIT_04
BCALV_EDIT_05
BCALV_EDIT_06
BCALV_EDIT_07
BCALV_EDIT_08
ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
some helful links.
Go through the below links,
For Materials:
1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
1) http://www.erpgenie.com/sap/abap/OO/index.htm
2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
Regards
Sudheer -
Need to learn abap objects plz help me
hi to all sdners ,
i need to learn oops in abap plz send me material and tutorials for learning it. please help me .you can send all the materials to my mail id [email protected] will rewarded.hi
Object Oriented prg
A programming technique in which solutions reflect real world objects
What are objects ?
An object is an instantiation of a class. E.g. If Animal is a class, A cat
can be an object of that class .
With respect to code, Object refers to a set of services ( methods /
attributes ) and can contain data
What are classes ?
A class defines the properties of an object. A class can be instantiated
as many number of times
Advantages of Object Orientated approach
Easier to understand when the system is complex
Easy to make changes
Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
Polymorphism - Identically named methods behave differently in different classes
Inheritance - You can use an existing class to define a new class
Polymorphism and inheritance lead to code reuse
Have a look at these good links for OO ABAP-
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sapgenie.com/
http://help.sap.com
http://www.sapgenie.com/abap/OO/
http://www.sapgenie.com.
http://www.sapgenie.com/abap/OO/index.htm
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://www.sapgenie.com/abap/OO/index.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
http://www.sapgenie.com/abap/OO/
/people/dirk.feeken/blog/2007/07/06/abap-trial-version-for-newbies-part-17--your-first-abap-object
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/sap-teched-03/why%20use%20abap%20objects
Hope this helps
if it helped, you can acknowledge the same by rewarding
regards
ankit -
Reports are not called from form in browser plz help
Hi,
I have installed 9iAS+8.1.7 database on the same machine with NT4 server.My system's forms(.fmx) are running well but my reports are not running from my main form.i call reports from the
from as,
Run_Product(reports,'..\iReports\xglrxx12.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null);
Actually want to know the report's setting when calling from the from in a browser(environment variables,virtual paths etc.).
My database is installed in drive E:\8idb_home\ and 9iAS is on
G:\9iAS_home\.My systems .fmx & .rep files are in "iforms" and "ireports" folder respectively.
Plz help!
Many thanks!Hi,
First of all thanks to Vincent Botteman for solving the prob.
Yes when i changed my call of run_product by excluding the path i have specified when calling from form it then makes a result.
Also specified the entry of your reports .rep files by giving path in reports60_path registery variable as,
Run regedit-->Hkey_Local_Machine-->Software-->Oracle here give the full path of your .rep files as an first entry in reports60_path variable.And finally not mention the path when calling reports from form as,
Run_Product(reports,'xglrxx13.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null);<--- Correct way.
Run_Product(reports,'..\iReports\xglrxx13.rep',synchronous,RUNTIME,FILESYSTEM,pl_id,null);<--- Wrong way.
Regards! -
DMS-Object link to business partner (ISU-Module) required. Plz help.
Hi all,
I require to give an object link from DMS to Business partner of ISU module t code BP.
So checked up in SPRO- Control data- maintain key feilds, & i found that BUT001 is the transparent table which is used here. so i inserted the same in object link for my document type, but there was no screen no defined to it so i gave the screen no as 500, the tab has appeared under the objectlink tab in DIR, but the screen is not appearing, it is blank, also in the business partner Transaction the DIR table is not appearing.
What should i do? is there any other setting required, or the table which i have found is wrong. Plz help.
Regards
Tushar.Hi,
Have you solved your issue? I want to have the same link. If you have please give me a step by step description.
I saw the screen number for general business partner is 1249, maybe you can use this.
Regards Camilla -
URGENT: Date format in Reports Giving me trouble...plz help me out
Hi guru's Can any one help me out
I
n the front end apps we are getting the date value as
BOM_SRS_DATETIME_STANDARD
Where we are entering the date value as MM/DD/RRRR HH24:MI:SS
The date format set in the company is like RRRR/MM/DD HH24:MI:SS
SO I format masked the date parameter in .RDF to RRRR/MM/DD HH24:MI:SS format.
While the actual date format in the data base is like DD/MM/RRRR HH24:MI:SS.
I checked all the old reports and the date format is like they masked the date format to company format and used the afterparameter trigger like bellow:
if :P_SENT_DATE_FROM is not null and :P_SENT_DATE_TO is null then
:P_SENT_DATE_TO := :P_SENT_DATE_FROM;
end if;
if (:P_SENT_DATE_FROM = :P_SENT_DATE_TO) and (:P_SENT_DATE_FROM is not null) then
:WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE = '||' to_date('''||:P_SENT_DATE_FROM||''''||','||'''DD-MON-RR'')';
else
if :P_SENT_DATE_FROM is not null then
:WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE >= '||' to_date('''||:P_SENT_DATE_FROM ||''''||','||'''DD-MON-RR'')';
end if;
if :P_SENT_DATE_TO is not null then
:WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE <= '||' to_date('''||:P_SENT_DATE_TO ||''''||','||'''DD-MON-RR'')';
end if;
end if;
I tried this but i couldnt get the output either.
I am pretty much confused.
Plz help me out...If you want to use a dynamic where caluse in your report query you can use a Reference Cursor using REF CUR QUERY tool in your report like this :
function QR_1RefCurDS return DEF_CURSORS.CHARACT_REFCUR is
temp_CHARACT DEF_CURSORS.CHARACT_refcur;
begin
IF :FROM_NO IS NULL AND :TO_NO IS NULL THEN
open temp_CHARACT for SELECT ACCT_CODE, ACCT_NAME
FROM CHARACT
ORDER BY ACCT_CODE;
ELSIF :TO_NO IS NULL AND :FROM_NO IS NOT NULL THEN
open temp_CHARACT for select ACCT_CODE, ACCT_NAME
FROM CHARACT
WHERE ACCT_CODE=:FROM_NO
ORDER BY ACCT_CODE;
ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NOT NULL THEN
open temp_CHARACT for select ACCT_CODE, ACCT_NAME
FROM CHARACT
WHERE ACCT_CODE BETWEEN :FROM_NO AND :TO_NO
ORDER BY ACCT_CODE;
ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NULL THEN
open temp_CHARACT for select ACCT_CODE, ACCT_NAME
FROM CHARACT
WHERE ACCT_CODE<=:TO_NO
ORDER BY ACCT_CODE;
END IF;
return temp_CHARACT;
end;
But first you have to declare a cursor type in a package -
Reports Paramters Error, Plz Help me!
Have anybody tried a reports in Web with parameters containing the ' '(space), '&'(and),'?' and other URL special character?
When I passed a paramter with these character from my form, the reports server returned a REP-56033 error, and said that it cannot get job with ID -2.
My reports are rdf/rep files.
My system is 9ias R2. My reports service's version is 9.0.2.0.1
Please help me. This question is urgent.When I use showjobs, I cannot get this job. But if I delete the special char, I can get the job and say it has error.
I guess the report doesn't run with the special char!!!!
I can run other report which without the special char parameter.
For example
add_parameter(pl_id,Text_Parameter,'where deptno=59 and staffno=34');
If my parameter list contain this value, the report cannot run!!!
If I change to
add_parameter(pl_id,Text_Parameter,'wheredeptno=59andstaffno=34');
The report can run, but return error.
Plz help me!! -
Problm with tiledlayer object not showing on screen!! plz help
im making a small chess game my chess board is made of Tiledlayer and my chess elements are also Tiledlayer wheneever a move is made i have to make changes to my chess elements cells. but i make changes and they appear on my tiledlayer object but dont show on screen...
when during game when i press FIRE_KEY first time my code goes to a thread and starts a rectangle which blinks and when i press fire again the tiled_layer is updated such that my chess element is moved from selected position to desired position.... but i dont c the change on screen....
here is the complete code of chess board class...
* @(#)ChessCanvas.java
* @author Aaqib
* @version 1.00 1007/9/19
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
public class ChessCanvas extends GameCanvas implements Runnable{
private final int SCREEN_X = getWidth();
private final int SCREEN_Y = getHeight();
private int boardSize = 128;
// starting point of our chess game
private int startX = (SCREEN_X - boardSize)/2;
private int startY = (SCREEN_Y - boardSize)/2;
// create bounding rectangle to know the end of chess board;
private int endX = startX + boardSize;
private int endY = startY + boardSize;
private static final byte BOARD_COLUMN = 8;
private static final byte BOARD_ROWS = 8;
private static final byte TILE_DIMENSION = 16;
// current X, Y position of cursor
private byte currentCursorRow;
private byte currentCursorColumn;
// the row column which r selected
private byte selectedRow;
private byte selectedColumn;
// the current pixel lcoations
private int currentPixelX;
private int currentPixelY;
// check if selected. convert curser to red
private boolean selected = false;
// background color
private int white = 0xFCFCFC;
// the chess board tiled Layer
private TiledLayer tiledLayer;
// the chess elements
private TiledLayer chessElements;
// layer Manager to add tiles and sprites;
private LayerManager layerManager;
// the cursor which selects and moves the objects
private Sprite cursor;
// matrix representing the chess board;
private final byte chkBoard[][] ={
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
{2,1,2,1,2,1,2,1},
{1,2,1,2,1,2,1,2},
private final byte elements[][] = {
{6,2,5,4,3,5,2,6},
{1,1,1,1,1,1,1,1},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{7,7,7,7,7,7,7,7},
{12,8,11,10,9,11,8,12}
private Graphics g;
// main constructor
public ChessCanvas() {
super(true);
setFullScreenMode(true);
init();
* Initialize all GUI components
public void init(){
try{
Image spriteImg = Image.createImage("/cursor.png");
cursor = new Sprite(spriteImg,15,15);
cursor.setRefPixelPosition(startX - TILE_DIMENSION, startY - TILE_DIMENSION);
Image img = Image.createImage("/board.png");
Image elmt = Image.createImage("/chess.png");
tiledLayer = new TiledLayer(BOARD_COLUMN, BOARD_ROWS, img, TILE_DIMENSION, TILE_DIMENSION);
chessElements = new TiledLayer(BOARD_COLUMN, BOARD_ROWS, elmt,16,16);
layerManager = new LayerManager();
currentCursorRow = 5;
currentCursorColumn = 6;
for (int y = 0; y < BOARD_COLUMN; y++){
for (int x = 0; x < BOARD_ROWS; x++){
int grid = chkBoard[y][x];
int data = elements[y][x];
tiledLayer.setCell(x,y, grid);
chessElements.setCell(x,y,data);
g = getGraphics();
// sets the position of chess board in center
tiledLayer.move(startX, startY);
chessElements.move(startX,startY);
layerManager.append(cursor);
layerManager.append(chessElements);
layerManager.append(tiledLayer);
moveCursor(currentCursorColumn * TILE_DIMENSION, currentCursorRow * TILE_DIMENSION );
catch(Exception exception ){
System.out.println("exception in init method -- "+exception.toString() );
public void start(){
Thread thread = new Thread(this);
thread.start();
public void run(){
while (true){
// check game state;
//checkState();
// check the userinput
checkUserInput();
updateScreen(g);
flushGraphics();
try{
Thread.currentThread().sleep(300);
}catch(Exception exception){}
private void checkUserInput(){
int keyState = getKeyStates();
switch(keyState){
case FIRE_PRESSED:
if (selected){
selected = false;
// make the move
logging ("selected >> row "+selectedRow+" column >> "+selectedColumn +"\n");
logging ("current >> row "+currentCursorRow+" column >> "+currentCursorColumn +"\n");
int selectedItem = chessElements.getCell(selectedRow,selectedColumn);
logging("selected item >> "+selectedItem+"\n");
chessElements.setCell(currentCursorRow,currentCursorColumn,selectedItem);
chessElements.setCell(selectedRow,selectedColumn,0);
chessElements.setCell(6,6,7);
logging ("selected >> row "+selectedRow+" column >> "+selectedColumn +"\n");
moveCursor(0,0);
}else{
selected = true;
selectedRow = currentCursorRow;
selectedColumn = currentCursorColumn;
chessElements.setCell(6,6,7);
animateSelectedItem();
break;
case UP_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorRow == 1){
if (currentCursorColumn == 8){
currentCursorColumn =1;
currentCursorRow = 8;
currentPixelX = -112;
currentPixelY = 112;
//moveCursor(-112,112);
}else{
currentCursorColumn++;
currentCursorRow = 8;
currentPixelX = TILE_DIMENSION;
currentPixelY = 112;
//moveCursor(TILE_DIMENSION,112);
else{
currentCursorRow--;
currentPixelX = 0;
currentPixelY = -TILE_DIMENSION;
//moveCursor(0,-TILE_DIMENSION);
moveCursor(currentPixelX,currentPixelY);
break;
case DOWN_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorRow == 8){
if (currentCursorColumn == 8){
currentCursorColumn =1;
currentCursorRow = 1;
currentPixelX = -112;
currentPixelY = -112;
//moveCursor(-112,-112);
}else{
currentCursorColumn++;
currentCursorRow = 1;
currentPixelX = TILE_DIMENSION;
currentPixelY = -112;
//moveCursor(TILE_DIMENSION,-112);
else{
currentCursorRow++;
currentPixelX = 0;
currentPixelY = TILE_DIMENSION;
//moveCursor(0,TILE_DIMENSION);
moveCursor(currentPixelX, currentPixelY);
break;
case LEFT_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorColumn == 1){
if (currentCursorRow == 1){
currentCursorColumn =8;
currentCursorRow = 8;
currentPixelX = 112;
currentPixelY = 112;
//moveCursor(112,112);
}else{
currentCursorColumn = 8;
currentCursorRow--;
currentPixelX = 112;
currentPixelY = -TILE_DIMENSION;
//moveCursor(112,-TILE_DIMENSION);
else{
currentCursorColumn--;
currentPixelX = -TILE_DIMENSION;
currentPixelY = 0;
//moveCursor(-TILE_DIMENSION,0);
moveCursor(currentPixelX, currentPixelY);
break;
case RIGHT_PRESSED:
if (!cursor.isVisible())
cursor.setVisible(true);
if (currentCursorColumn == 8){
if (currentCursorRow == 8){
currentCursorColumn =1;
currentCursorRow = 1;
currentPixelX = -112;
currentPixelY = -112;
//moveCursor(-112,-112);
}else{
currentCursorColumn = 1;
currentCursorRow++;
currentPixelX = -112;
currentPixelY = TILE_DIMENSION;
//moveCursor(-112,TILE_DIMENSION);
else{
currentCursorColumn++;
currentPixelX = TILE_DIMENSION;
currentPixelY = 0;
//moveCursor(TILE_DIMENSION,0);
moveCursor(currentPixelX,currentPixelY);
break;
public void updateScreen(Graphics g){
g = getGraphics();
// set the background color
g.setColor(white);
g.fillRect(0, 0, getWidth(), getHeight());
// draw the board
tiledLayer.paint(g);
// paint the cursor
cursor.paint(g);
// chess elements
chessElements.paint(g);
private void moveCursor(int x , int y){
//logging(" cursor >> "+cursor.getFrame());
// red cursor selected
if (selected){
//logging("red");
cursor.setFrame(1);
}else{
// normal green cursor moving
//logging("green");
cursor.setFrame(0);
cursor.move(x,y);
* Animate the selected Item. runs a saperate thread;
private void animateSelectedItem(){
cursor.setVisible(false);
new Thread(new Runnable() {
Graphics g = getGraphics();
public void run(){
while(selected){
try{
Thread.currentThread().sleep(600);
}catch(Exception exception){
System.out.println("exception in animating sprite");
g.setColor(0xF71302);
g.drawRect((startX+ (selectedColumn * TILE_DIMENSION))-16,
(startY+ (selectedRow * TILE_DIMENSION))-16, 14, 14 );
flushGraphics();
}).start();
private void logging (String str){
System.out.print(str);
}plz help me....
thanks :({color:#000080}I don't know whether that's the only thing wrong here, but I see 3 calls to getGraphics(). The documentation for javax.microedition.lcdui.game.GameCanvas.getGraphics() says:{color}
A new Graphics object is created and returned each time this method is called; therefore, the needed Graphics object(s) should be obtained before the game starts then re-used while the game is running.
{color:#000080}-- Your call to getGraphics() in updateScreen(Graphics g) will return the reference to the local variable represented by the parameter g, which will be out of scope as soon as the method returns.
-- Your call to getGraphics() in animateSelectedItem() assigns the reference to a newly declared local variable, which too will be out of scope when the method returns. (But this method includes flushGraphics() so just possibly this g is flushed to the display.)
db{color} -
How to change transport request to local object again--plz help
Hi all,
By mistake I saved my FM in transport request.It is not released yet.I want it to be back in local object.Issue is that,when i deleted subrequest and that object from se09,package is not getting changed because the Function group is SAP standard,and not allowing changes.
Plz help.....I am in real problem..
Thanks in advance
MeenaHi,
Goto SE01,
enter the TR number
DISPLAY
Expand the TR object list
Place cursor on the object & right click & select DELETE object
You will get a popup asking the object is locked..do u want to proceed.. say YES
This will remove the object from the TR..
Now you can delete the TR if it doesnt hv any other objects. If you delete the TR then object wud authomatically come under local objects.
else...
Open the object & goto attributes.. change the class & save.
Best regards,
Prashant -
Experts plz help report issue need help
hi experts
plz guide me in this report
i hav a transaction MD4C
when we call this transaction it displays a report showing material numbers with some details for a corresponding sales order number
if any of material is missing or problem arises it creates an icon in front of tha material number
now i will have to create a report which will show all the material numbers which are missing orhave this error icon .
Please guide me how should i proceed
what should be the best approach of my report .hi,
you can analyze that report and find logic used for that icon generation, take the same logic for writeing u r report program. you can see the code of the transaction code
1) type the transaction code, press enter
2) system ---> status
3) double click on program(screen) field.
This will take you to source code, their you do analyzation.
regards,
pavan -
Help! Print OLE object from report builder.
Dear OTN Members,
I would like to know how to print out a OLE object from
report builder, because currently I face problem to print out
the whole contain of the winword document file, because when I
display the OLE on the form it will only display according the
size I declare for it, it seems that it will not automatic
extend the size itself. i.e. if I drag the size to one page in
fact the maximum is one page, then when it display, it will only
display maximum one page eventhough the document file maybe
contain 10 page inside it. So when I print out the report it
will only show me one page, so if you have any solution, pls
share with me, thank you.
nullAs far as I know you have to use OLE Item to work with the information. Unfortunately there is not any standart way to extract a source document from OLE. Some applications such as Word, Excel support OLE Automation, so you could use OLE2 package to save the document as a file, that is the easest way. But others don't, so you may have to use an undocumented way to extract a document.
Take a look at the following thread:
Subj: 6i to 9i Ole to LOB translations, How do you know the App. server?
Re: 6i to 9i Ole to LOB translations, How do you know the App. server?
P.S. If you can't extract some types of your documents, please let me khow.
P.P.S. To extract a document through OLE2 package you could use something like the following. /I'm not sure the code is correct/:
DECLARE
handle ole2.obj_type;
BEGIN
ACTIVATE_SERVER('OLE1');
handle := forms_ole.get_interface_pointer('OLE1');
BEGIN
-- Save a document to disk
Args :=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(Args, 'C:\test.doc'); -- file name
OLE2.INVOKE(handle, 'SaveAs', Args);
OLE2.DESTROY_ARGLIST(Args);
EXCEPTION WHEN OTHERS THEN
Message('Error');
END;
-- OLE2.RELEASE_OBJ(handle);
END; -
Object orientated, serious help needed
Hi all Im very new to java and I would like to know how I could be this object orientated code into java;
Room
-length: int
-width: int
+Room( aLength: int, aWidth:
+getLength(): int
+getWidth(): int
+getArea(): int
Thx, I know its proably simple But I have be struggling to get this code to run, thanks in advanceI know its UML im having trouble turning this UML into java,
If I do
public class Room
private int length;
private int width;
then length and width are underlined. Yup your IDE concluded that those private member variables aren't
used, not set anywhere in that class, that's what those warning/error
lines are all about.
Can I carry on even though they are underlined.And also if someone
could show how I would put;
+Room( aLength: int, aWidth: int)
into java and should be ok from here, thx in advanceThe transformation is almost mechanical:public class Room {
private int length;
private int width;
public Room(int aLength, int aWidth) {
length= aLength;
width = aWidth;
}kind regards,
Jos
Maybe you are looking for
-
Can't acces bios in supervisor mode.
Hello people on the lenovo forums, Someone gave me his old thinkpad T60P, he said that the laptop doesn't work anymore. So when i started the laptop, i got a black screen and the laptop turned itself off after 2 seconds After resetting the bios with
-
Hi, I have a KM iview in which I am displaying some documents in a list along with some properties. The problem is that when I click on any of the Property Column Headers, sorting is not happening. I checked my Collection Renderer. It has the propert
-
hi Expert, i met a problem when I created a single role for displaying billing document, this role only contains one tcode:VF03, and i specify a certain distribution channel in this role , e.g.: E1, i only want the user to display the billing documen
-
Different soap request in 9.2.0.4 linux and windows for same webservice
hi, i deployed a webservice on iis5 (dotnet 1.1). the client for this web service is written in java and is loaded into oracle db (9.2.0.4 linux). and there are errors. the same java code is working fine on 9.2.0.4 windows. description of the error:
-
HI As we enter into ESS Career and job we find Candidate Profile ,Data Overview, Profile release. In jobs we have Applications Apply Directly,Favorites,Search for Jobs.and personal settings. All the services are showing the erroe as Portal runtime e